lkml.org 
[lkml]   [2007]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: arch_align_stack() seems useless
On Mon, 27 Aug 2007 16:08:31 +0200
Franck Bui-Huu <vagabon.xyz@gmail.com> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-27 16:17    [from the cache]
©2003-2011 Jasper Spaans