summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorPaolo \'Blaisorblade\' Giarrusso <blaisorblade@yahoo.it>2005-03-28 03:45:58 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-28 03:45:58 -0800
commitd97a403d7b9d0496326100ff8a84c78a172f5b98 (patch)
tree4ca946567481289e6961ec279607356783b3ffea /init
parent166ee920cffc3ea3ecf136f0dca49ff759e80350 (diff)
[PATCH] uml: extend cmd line limits
From: "Catalin(ux aka Dino) BOIE" <util@deuroconsult.ro>, Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>, Jeff Dike <jdike@addtoit.com> Increase UML command line size. And fix a crash from passing an overly-long command line to UML. XXX: check that init can handle 128 params and 128 env. var. The original patch set this limit to 256, but it seems me too much. Think! Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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. */