[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070827071413.736e3dcb@laptopd505.fenrus.org>
Date: Mon, 27 Aug 2007 07:14:13 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: Franck Bui-Huu <vagabon.xyz@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: arch_align_stack() seems useless
On Mon, 27 Aug 2007 16:08:31 +0200
Franck Bui-Huu <vagabon.xyz@...il.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists