diff options
author | Ollie Wild <aaw@google.com> | 2007-07-19 04:48:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:45 -0400 |
commit | b6a2fea39318e43fee84fa7b0b90d68bed92d2ba (patch) | |
tree | c9c3619cb2730b5c10c7427b837146bce3d69156 /fs/binfmt_misc.c | |
parent | bdf4c48af20a3b0f01671799ace345e3d49576da (diff) |
mm: variable length argument support
Remove the arg+env limit of MAX_ARG_PAGES by copying the strings directly from
the old mm into the new mm.
We create the new mm before the binfmt code runs, and place the new stack at
the very top of the address space. Once the binfmt code runs and figures out
where the stack should be, we move it downwards.
It is a bit peculiar in that we have one task with two mm's, one of which is
inactive.
[a.p.zijlstra@chello.nl: limit stack size]
Signed-off-by: Ollie Wild <aaw@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: <linux-arch@vger.kernel.org>
Cc: Hugh Dickins <hugh@veritas.com>
[bunk@stusta.de: unexport bprm_mm_init]
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/binfmt_misc.c')
-rw-r--r-- | fs/binfmt_misc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 330fd3fe8546..42e94b3ab7be 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -126,7 +126,9 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
126 | goto _ret; | 126 | goto _ret; |
127 | 127 | ||
128 | if (!(fmt->flags & MISC_FMT_PRESERVE_ARGV0)) { | 128 | if (!(fmt->flags & MISC_FMT_PRESERVE_ARGV0)) { |
129 | remove_arg_zero(bprm); | 129 | retval = remove_arg_zero(bprm); |
130 | if (retval) | ||
131 | goto _ret; | ||
130 | } | 132 | } |
131 | 133 | ||
132 | if (fmt->flags & MISC_FMT_OPEN_BINARY) { | 134 | if (fmt->flags & MISC_FMT_OPEN_BINARY) { |