From: Arjan van de Ven <arjan@infradead.org>
To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: arch_align_stack() seems useless
Date: Mon, 27 Aug 2007 07:14:13 -0700 [thread overview]
Message-ID: <20070827071413.736e3dcb@laptopd505.fenrus.org> (raw)
In-Reply-To: <46D2DADF.8060505@gmail.com>
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.
next prev parent reply other threads:[~2007-08-27 14:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-27 14:08 Franck Bui-Huu
2007-08-27 14:14 ` Arjan van de Ven [this message]
2007-08-28 13:17 ` Franck Bui-Huu
2007-08-30 8:22 ` Franck Bui-Huu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070827071413.736e3dcb@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vagabon.xyz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®