Re: [musl] Broken vDSO on built kernel

From: Andy Lutomirski
Date: Thu Jun 09 2016 - 13:40:46 EST


On Wed, Jun 8, 2016 at 2:36 PM, Alexander Monakov <amonakov@xxxxxxxxx> wrote:
> On Wed, 8 Jun 2016, fREW Schmidt wrote:
>> I was debugging an issue I ran into (
>> https://github.com/docker/docker/issues/23378) and after chatting with the
>> folks in #musl and we triaged it down to a broken vDSO (tested by running
>> `strace date` and seeing a clock_gettime call.)
>
> To provide a bit more detail, we've found that the vdso mappend into the
> application has no dynamic symbols; Glibc ignores the vdso, so it continues to
> work, but musl segfaults since the vdso is invalid.
>
> I'm pasting below `readelf -aW` output on the vdso dumped on the affected
> system (via 'fwrite((void*)getauxval(AT_SYSINFO_EHDR), 8192, 1, stdout)';
> as you can see, there's no dynamic symbols and symbol hash tables. It may
> be a toolchain bug since there was no issue with 4.6 kernel (and reportedly
> there were no significant vdso changes merged into 4.7 -- the issue is seen
> on Ubuntu's 4.7rc2).

Hmm. The vdso64.so in /lib/firmware in that image has the same
problem, so this isn't vdso2c's fault. I added this to my -next queue
to help diagnose it:

https://git.kernel.org/cgit/linux/kernel/git/luto/linux.git/commit/?h=x86/vdso&id=6436d4c1a83cbe083e54c53bb2b16efaab9b62f4

--Andy