2 ms·
> On the other hand all of that comes back to bone you if you’re trying to benefit from vDSO without going through a libc. At least the vDSO functions really d
by LegionMammal978 2y ago
> On the other hand all of that comes back to bone you if you’re trying to benefit from vDSO without going through a libc.
At least the vDSO functions really don't need much in the way of stack space: generally there's nothing much there but clock_gettime() and gettimeofday(), which just read some values from the vvar area.
The bigger pain, of course, is actually looking up the symbols in the vDSO, which takes at least a minimal ELF parser.
- t-8ch 2y agoThe kernel also provides a minimal vdso elf parser: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/vDSO/parse_vdso.c https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
- masklinn 2y ago> At least the vDSO functions really don't need much in the way of stack space: generally there's nothing much there but clock_gettime() and gettimeofday(), which just read some values from the vvar area. And yet that’s exactly one of the things Go fucked up in the past: https://marcan.st/2017/12/debugging-an-evil-go-runtime-bug/ https://marcan.st/2017/12/debugging-an-evil-go-runtime-bug/