Re: [PATCH] x86: Remove compat vdso support

From: Andy Lutomirski
Date: Mon Mar 10 2014 - 20:59:19 EST


On Mon, Mar 10, 2014 at 5:38 PM, Dave Jones <davej@xxxxxxxxxx> wrote:
> On Mon, Mar 10, 2014 at 05:19:27PM -0700, Andy Lutomirski wrote:
> > On Mon, Mar 10, 2014 at 5:13 PM, H. Peter Anvin <hpa@xxxxxxxxxxxxxxx> wrote:
> > > On 03/10/2014 05:12 PM, Andy Lutomirski wrote:
> > >> The compat vDSO is a complicated hack that's needed to maintain
> > >> compatibility with a small range of never-released glibc versions.
> > >>
> > >> This removes it and replaces it with a much simpler hack: a config
> > >> option to disable the 32-bit vDSO by default.
> > >>
> > >> Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
> > >
> > > Can we verify this works correctly on the affected distributions?
> >
> > It works correctly on Fedora 20 32-bit and 64-bit.
>
> I went and dug through the SRPMs at https://archives.fedoraproject.org
> Fedora hasn't ever shipped with COMPAT_VDSO enabled.
> Before FC6 (kernel 2.6.18), the option never existed.
>

What I mean is: a kernel with this patch can boot Fedora 20.

It looks like OpenSUSE 9 is the affected distribution. I bootstrapped
a minimal OpenSUSE 9 32-bit chroot (filesystem, glibc, ncurses,
readline, bash). If there's a non-compat vDSO, it says:

Inconsistency detected by ld.so: rtld.c: 1250: dl_main: Assertion
`(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!

With 'echo 0 >/proc/sys/abi/vsyscall32', it works. With vdso32=2, it
works. With CONFIG_ENABLE_VDSO32_BY_DEFAULT=n, it works. I also
checked an unpatched kernel with compat vdso on. That also works.

So, the upshot of my patch is that the default becomes sane for
everyone except users of OpenSUSE 9 and similar. OpenSUSE 9 users
will need to fiddle with their settings or config.

And it looks like I need to spruce up virtme a bit to make this kind
of testing easier :)

I'll respin the patch to note that OpenSUSE 9 is affected.

NB: I've only tested a 64-bit kernel. Testing a 32-bit kernel will
involve considerably more effort.

> Dave
>



--
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/