Re: arch_align_stack() seems useless

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux