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

From: Ingo Molnar
Date: Tue Jun 27 2006 - 08:17:38 EST



* Arjan van de Ven <arjan@xxxxxxxxxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/