On Mon, 27 Aug 2007 16:08:31 +0200
Franck Bui-Huu <[EMAIL PROTECTED]> wrote:
> and recently mips do that. Here is the code taken from exec.c which
> calls it:
> 
>       int setup_arg_pages(struct linux_binprm *bprm,
>                           unsigned long stack_top,
>                           int executable_stack)
>       {
>               [...]
>       
>               stack_top = arch_align_stack(stack_top);
>               stack_top = PAGE_ALIGN(stack_top);
>       
>               [...]
>       }
> 
> Since PAGE_ALIGN() is called right after arch_align_stack(), it seems
> to me that the call to the latter function is useless...
> 
> Am I missing something ?


arch_align_stack aligns, on x86, within a 2 page range (this is for
cache coloring).  The other thing you missed is that arch_align_stack()
is called in 2 locations, binfmt_elf.c is the primary location for
inside-the-page randomization.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to