Comment 3 for bug 1805154

Revision history for this message
In , hjl.tools (hjl.tools-linux-kernel-bugs) wrote :

Created attachment 279555
A testcase

commit 379d98ddf41344273d9718556f761420f4dc80b3
Author: Alistair Strachan <email address hidden>
Date: Fri Aug 3 10:39:31 2018 -0700

    x86: vdso: Use $LD instead of $CC to link

    The vdso{32,64}.so can fail to link with CC=clang when clang tries to find
    a suitable GCC toolchain to link these libraries with.

    /usr/bin/ld: arch/x86/entry/vdso/vclock_gettime.o:
      access beyond end of merged section (782)

breaks i386 vDSO with incorrect unwind info. The testcase here should
report:

[hjl@gnu-hsw-1 tmp]$ gcc -g -O2 -funwind-tables -m32 foo.c
[hjl@gnu-hsw-1 tmp]$ ./a.out
Obtained backtrace with 7 functions
Function 0: ./a.out() [0x8049272]
Function 1: linux-gate.so.1(__kernel_sigreturn+0) [0xf7f990b0]
Function 2: linux-gate.so.1(__kernel_vsyscall+0x9) [0xf7f99099]
Function 3: /lib/libc.so.6(__read+0x2b) [0xf7ea72ab]
Function 4: ./a.out() [0x80493a9]
Function 5: ./a.out() [0x80493f3]
Function 6: ./a.out() [0x80493f3]
[hjl@gnu-hsw-1 tmp]$

But kernel 4.19 got

[hjl@gnu-cfl-1 tmp]$ ./a.out
Obtained backtrace with 4 functions
Failure on line 67
[hjl@gnu-cfl-1 tmp]$

Revert the commit fixes i386 vDSO.