All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: john stultz <johnstul@us.ibm.com>
Cc: Andrea Arcangeli <andrea@suse.de>,
	Ulrich Drepper <drepper@redhat.com>,
	lkml <linux-kernel@vger.kernel.org>, Andi Kleen <ak@suse.de>,
	Jamie Lokier <jamie@shareable.org>,
	"Martin J. Bligh" <mbligh@aracnet.com>,
	Wim Coekaerts <wim.coekaerts@oracle.com>,
	Joel Becker <Joel.Becker@oracle.com>,
	Chris McDermott <lcm@us.ibm.com>
Subject: Re: [RFC][PATCH] linux-2.6.4-pre1_vsyscall-gtod_B3-part3 (3/3)
Date: Thu, 4 Mar 2004 03:57:36 -0500	[thread overview]
Message-ID: <20040304085735.GN31589@devserv.devel.redhat.com> (raw)
In-Reply-To: <1078368889.10076.255.camel@cog.beaverton.ibm.com>

On Wed, Mar 03, 2004 at 06:54:49PM -0800, john stultz wrote:
> On Wed, 2004-03-03 at 18:47, Andrea Arcangeli wrote:
> > And sysenter is at a fixed address in 2.6 x86 too (it doesn't even
> > change between different kernel compiles).
> 
> Actually, the 4G patch pushes vsysenter down a page, and glibc seems to
> handle this properly.

But the 4G/4G patch relinks the vDSO to the address it uses, this is no
big problem for glibc which of course doesn't use hardcoded address but
reads AT_SYSINFO{,_EHDR} values kernel passes to it.

But the fixed vDSO location is a problem, exploits certainly appreciate
a fixed address at which they with high probability can enter the kernel.

Ingo Molnar recently wrote a patch to randomize the vDSO address on
IA-32.  Unfortunately it revealed some bugs in glibc where ld.so did not
handle properly vDSOs linked to one address, but mmaped to a different one
(which is a must if kernel wants to share one vDSO page for each process).
So now the problem is if kernel randomizes vDSO, it will not even boot
with glibcs >= 2003-04-22 and <= 2004-02-27.  There are 2 possible solutions
for this IMHO:
1) tell users of the glibc's which don't handle this they must upgrade glibc
first before booting a newer kernel and add kernel cmdline option to turn
vDSO off, so that a user can turn it off, upgrade glibc and then on next
boot use vDSO again
2) start using a different AT_SYSINFO_* value (just one is enough,
ATM AT_SYSINFO is ((ElfNN_Ehdr *)AT_SYSINFO_EHDR)->e_entry), stop using
the old 2 values.  This would mean old glibcs will stop using vDSO, but hey,
it is just an optimization.  Upgrading glibc would use vDSO again.

	Jakub

  parent reply	other threads:[~2004-03-04  8:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-04  0:11 [RFC][PATCH] vsyscall-gtod_B3 (0/3) john stultz
2004-03-04  0:12 ` [RFC][PATCH] linux-2.6.4-pre1_vsyscall-gtod_B3-part1 (1/3) john stultz
2004-03-04  0:13   ` [RFC][PATCH] linux-2.6.4-pre1_vsyscall-gtod_B3-part2 (2/3) john stultz
2004-03-04  0:14     ` [RFC][PATCH] linux-2.6.4-pre1_vsyscall-gtod_B3-part3 (3/3) john stultz
2004-03-04  0:55       ` Andrea Arcangeli
2004-03-04  2:16         ` Ulrich Drepper
2004-03-04  2:43           ` john stultz
2004-03-04  3:14             ` Andrea Arcangeli
2004-03-04  8:09             ` Ulrich Drepper
2004-03-04 19:02               ` john stultz
2004-03-04  2:47           ` Andrea Arcangeli
2004-03-04  2:54             ` john stultz
2004-03-04  3:15               ` Andrea Arcangeli
2004-03-04  8:57               ` Jakub Jelinek [this message]
2004-03-04 16:45                 ` Andrea Arcangeli
2004-03-04  8:00         ` Jamie Lokier
2004-03-04  8:37           ` Jakub Jelinek
2004-03-04 17:48             ` Andrea Arcangeli
2004-03-04  0:15 ` [RFC] vsyscall-gtod_test_B3.tar.gz john stultz

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=20040304085735.GN31589@devserv.devel.redhat.com \
    --to=jakub@redhat.com \
    --cc=Joel.Becker@oracle.com \
    --cc=ak@suse.de \
    --cc=andrea@suse.de \
    --cc=drepper@redhat.com \
    --cc=jamie@shareable.org \
    --cc=johnstul@us.ibm.com \
    --cc=lcm@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=wim.coekaerts@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.