mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@hack.frob.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andy Lutomirski <luto@amacapital.net>,
	Stefani Seibold <stefani@seibold.net>,
	Greg KH <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	X86 ML <x86@kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Andi Kleen <ak@linux.intel.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	John Stultz <john.stultz@linaro.org>,
	Pavel Emelyanov <xemul@parallels.com>,
	Cyrill Gorcunov <gorcunov@openvz.org>,
	andriy.shevchenko@linux.intel.com,
	Martin.Runge@rohde-schwarz.com, Andreas.Brief@rohde-schwarz.com,
	Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH 3/4] Add 32 bit VDSO time support for 32 bit kernel
Date: Mon,  3 Feb 2014 13:11:55 -0800 (PST)	[thread overview]
Message-ID: <20140203211155.77EF674413@topped-with-meat.com> (raw)
In-Reply-To: H. Peter Anvin's message of  Saturday, 1 February 2014 16:56:56 -0800 <52ED97D8.50809@zytor.com>

> > config COMPAT_VDSO
> >         def_bool y
> >         prompt "Compat VDSO support"
> >         depends on X86_32 || IA32_EMULATION
> >         ---help---
> >           Map the 32-bit VDSO to the predictable old-style address too.
> > 
> >           Say N here if you are running a sufficiently recent glibc
> >           version (2.3.3 or later), to remove the high-mapped
> >           VDSO mapping and to exclusively use the randomized VDSO.
> > 
> >           If unsure, say Y.
> 
> So we need this for 32-bit glibc < 2.3.3, and we effecively have the
> same problem as on 64 bits.  Next question is if those old glibcs rely
> on the entry point alone or if they also expect the vdso header at that
> address.
> 
> I looked at the glibc diffs from 2.3.2 to 2.3.3, but it isn't really
> obvious to me what assumptions the 2.3.2 glibc made.  Perhaps Roland has
> any idea?

Jakub often has more reliable memories of these things than I do.

>From looking at the old states of the code, AFAICT 2.3.3 was the first
version that actually looked at AT_SYSINFO_EHDR or cared about the vDSO per
se; 2.3.2 just uses AT_SYSINFO.

I have a vague recollection that there was a period wherein ld.so would
crash (trying to modify part of the read-only vDSO image in place) if the
vDSO was loaded somewhere other than its prelinked location.  But I don't
see any evidence in the code that there was actually a release made of code
with that issue.

I'm fairly sure there are some relevant issues that I've forgotten and am
overlooking now.

> The safest thing for that might be to have the compat vdso be a
> completely separate object from the real vdso, and let the former be an
> object as similar to the current one as possible.

I'm not at all clear on what particular dangers that avoids.


Thanks,
Roland

  reply	other threads:[~2014-02-03 21:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-01 15:32 [PATCH 0/4] Add 32 bit VDSO time function support stefani
2014-02-01 15:32 ` [PATCH 1/4] Make vsyscall_gtod_data handling x86 generic stefani
2014-02-01 23:40   ` Andy Lutomirski
2014-02-01 15:32 ` [PATCH 2/4] Add new func _install_special_mapping() to mmap.c stefani
2014-02-01 15:32 ` [PATCH 3/4] Add 32 bit VDSO time support for 32 bit kernel stefani
2014-02-01 23:59   ` Andy Lutomirski
2014-02-02  0:26     ` H. Peter Anvin
2014-02-02  0:30       ` Andy Lutomirski
2014-02-02  0:41         ` H. Peter Anvin
2014-02-02  0:56           ` H. Peter Anvin
2014-02-03 21:11             ` Roland McGrath [this message]
2014-02-02 11:20       ` Stefani Seibold
2014-02-02 15:25         ` H. Peter Anvin
2014-02-01 15:32 ` [PATCH 4/4] Add 32 bit VDSO time support for 64 " stefani
2014-02-01 20:29   ` H. Peter Anvin

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=20140203211155.77EF674413@topped-with-meat.com \
    --to=roland@hack.frob.com \
    --cc=Andreas.Brief@rohde-schwarz.com \
    --cc=Martin.Runge@rohde-schwarz.com \
    --cc=aarcange@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gorcunov@openvz.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jakub@redhat.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@redhat.com \
    --cc=stefani@seibold.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xemul@parallels.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®