Re: [PATCH] binfmt: turn MAX_ARG_PAGES into a sysctl tunable

Ingo Molnar
2006-06-27T12:19:06Z

* Arjan van de Ven <arjan@linux.intel.com> wrote:

> Ingo Molnar wrote:
> >at copy_strings_kernel() time we dont yet know where in the target VM to
> >install the pages. A binformat might want to install all sorts of stuff
> >on the stack first, before it constructs the envp and copies the strings
> >themselves. So we dont know the precise alignment needed.
> >
> >delaying the copying to setup_arg_pages() time does not seem to work
> >either, because that gets called after the old MM has been destroyed.
> >
> >[ delaying the copying will also change behavior in error cases -
> > instead of returning with an error if the string pointers are bad
> > we'll have to kill the execve()ing process. ]
> >
> >am i missing something?
>
> we could always just have the binfmt use mremap() equivalent to move
> it into the place it wants...

i dont think so, these things on the stack are not page aligned.

Ingo