summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig8
-rw-r--r--init/main.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/init/Kconfig b/init/Kconfig
index d0404f9351b5..8164863a4b24 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -55,6 +55,14 @@ config LOCK_KERNEL
depends on SMP || PREEMPT
default y
+config INIT_ENV_ARG_LIMIT
+ int
+ default 32 if !USERMODE
+ default 128 if USERMODE
+ help
+ This is the value of the two limits on the number of argument and of
+ env.var passed to init from the kernel command line.
+
endmenu
menu "General setup"
diff --git a/init/main.c b/init/main.c
index dfa5cc66b3d9..40bf367ffdf1 100644
--- a/init/main.c
+++ b/init/main.c
@@ -110,8 +110,8 @@ EXPORT_SYMBOL(system_state);
/*
* Boot command-line arguments
*/
-#define MAX_INIT_ARGS 32
-#define MAX_INIT_ENVS 32
+#define MAX_INIT_ARGS CONFIG_INIT_ENV_ARG_LIMIT
+#define MAX_INIT_ENVS CONFIG_INIT_ENV_ARG_LIMIT
extern void time_init(void);
/* Default late time init is NULL. archs can override this later. */