musl/arch
Rich Felker bf14ef193b re-enable vdso clock_gettime on arm (32-bit) with workaround
commit 4486c579cb disabled vdso
clock_gettime on arm due to a Linux kernel bug that was not understood
at the time, whereby the vdso function silently produced
catastrophically wrong results on some systems.

since then, the bug was tracked down to the way the arm kernel
disabled use of vdso clock_gettime on kernels where the necessary
timer was not available or was disabled. it simply patched out the
symbols, but it only did this for the legacy time32 functions, and
left the time64 function in place but non-operational. kernel commit
4405bdf3c57ec28d606bdf5325f1167505bfdcd4 (first present in 5.8)
provided the fix.

if this were a bug that impacted all users of the broken kernel
versions, we could probably ignore it and assume it had been patched
or replaced. however, it's very possible that these kernels appear in
the wild in devices running time32 userspace (glibc, musl 1.1.x, or
some other environment) where they appear to work fine, but where our
new binaries would fail catastrophically if we used the time64 vdso
function.

since the kernel has not (yet?) given us a way to probe for the
working time64 vdso function semantically, we work around the problem
by refusing to use the time64 one unless the time32 one is also
present. this will revert to not using vdso at all if the time32 one
is ever removed, but at least that's safe against wrong results and is
just a missed optimization.
2022-09-19 13:21:54 -04:00
..
aarch64 bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
arm re-enable vdso clock_gettime on arm (32-bit) with workaround 2022-09-19 13:21:54 -04:00
generic make generic bits/fcntl.h shareable with 64-bit archs 2020-09-03 17:58:17 -04:00
i386 bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
m68k bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
microblaze bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
mips bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
mips64 bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
mipsn32 bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
or1k bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
powerpc bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
powerpc64 bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
riscv64 bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
s390x bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
sh bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00
x32 fix __WORDSIZE on x32 sys/user.h 2022-03-08 17:21:49 -05:00
x86_64 bits/syscall.h: add landlock syscalls from linux v5.13 2022-03-08 17:21:14 -05:00