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

Arjan van de Ven
2006-06-27T12:17:16Z

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...