linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [patch 1/3] powerpc: Move 64bit VDSO to improve context switch performance
Date: Tue, 14 Jul 2009 17:38:23 +1000	[thread overview]
Message-ID: <20090714073823.GB9805@kryten> (raw)
In-Reply-To: <1247555233.29462.86.camel@pasglop>

 
Hi Ben,

> Don't we lose randomization ? Or do we randomize the whole mem map
> nowadays ?

The start of the top down mmap region is randomized, so the VDSO will be in a
different position each time. A quick example:

run 1:
fffb01f6000-fffb01f9000 r-xp 00000000 00:00 0         [vdso]
fffb01f9000-fffb01fa000 r--p 00027000 08:06 4333852   /lib64/ld-2.9.so
fffb01fa000-fffb01fd000 rw-p 00028000 08:06 4333852   /lib64/ld-2.9.so
fffb01fd000-fffb01fe000 rw-p 00000000 00:00 0 
ffff7c6f000-ffff7c84000 rw-p 00000000 00:00 0         [stack]

run 2:
fff9a094000-fff9a097000 r-xp 00000000 00:00 0         [vdso]  
fff9a097000-fff9a098000 r--p 00027000 08:06 4333852   /lib64/ld-2.9.so
fff9a098000-fff9a09b000 rw-p 00028000 08:06 4333852   /lib64/ld-2.9.so
fff9a09b000-fff9a09c000 rw-p 00000000 00:00 0 
fffea0a6000-fffea0bb000 rw-p 00000000 00:00 0         [stack]

You will notice we aren't randomising each mmap, so the relative offset
between ld.so and the vdso will be consistent. I just checked and it 
looks like x86 does the same.

It might make sense to add a small amount of randomness between mmaps
on both x86 and PowerPC, at least for 64bit applications where we have
enough address space.

Anton

  reply	other threads:[~2009-07-14  7:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14  6:53 [patch 0/3] PowerPC context switch optimisations Anton Blanchard
2009-07-14  6:53 ` [patch 1/3] powerpc: Move 64bit VDSO to improve context switch performance Anton Blanchard
2009-07-14  7:07   ` Benjamin Herrenschmidt
2009-07-14  7:38     ` Anton Blanchard [this message]
2009-10-02 19:14   ` Andreas Schwab
     [not found]   ` <m2ocophale.fsf__34527.2158309401$1254511503$gmane$org@igel.home>
2009-10-03 14:15     ` Andreas Schwab
2009-10-03 14:51       ` Andreas Schwab
2009-10-03 21:53         ` Benjamin Herrenschmidt
2009-10-04 12:35           ` Andreas Schwab
2009-07-14  6:53 ` [patch 2/3] powerpc: Rearrange SLB preload code Anton Blanchard
2009-07-14  6:53 ` [patch 3/3] powerpc: Preload application text segment instead of TASK_UNMAPPED_BASE Anton Blanchard
2009-07-14  7:10   ` Benjamin Herrenschmidt
2009-07-14  7:27     ` Anton Blanchard

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=20090714073823.GB9805@kryten \
    --to=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).