public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: arch_align_stack() seems useless
Date: Tue, 28 Aug 2007 15:17:11 +0200	[thread overview]
Message-ID: <46D42057.9090507@gmail.com> (raw)
In-Reply-To: <20070827071413.736e3dcb@laptopd505.fenrus.org>

Hello Arjan,

Arjan van de Ven wrote:
> arch_align_stack aligns, on x86, within a 2 page range (this is for
> cache coloring).

OK, but for elf case this seems useless since the top of the stack is
already randomized.

It seems that the randomization stuff (top of the stack + stack
pointer inside a page) belongs to the elf binary format whereas it
could have been part of exec.c. Are there any reasons ?

> 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.
> 

Well not really because for mips case, we have:

	$ git grep ELF_PLATFORM include/asm-mips
	include/asm-mips/elf.h:#define ELF_PLATFORM  (NULL)

So on mips, the stack pointer won't get the inside the page
randomization. Is that correct ?

If so, I'm wondering why this randomization must depend on that string
to be defined. I must admit that I'm not sure how it's used. I guess
it's used by ld.so and it could be set to "mips" for now...

thanks
		Franck

  reply	other threads:[~2007-08-28 13:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27 14:08 arch_align_stack() seems useless Franck Bui-Huu
2007-08-27 14:14 ` Arjan van de Ven
2007-08-28 13:17   ` Franck Bui-Huu [this message]
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=46D42057.9090507@gmail.com \
    --to=vagabon.xyz@gmail.com \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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