Expand description
Parse the Linux vDSO.
The following code is transliterated from tools/testing/selftests/vDSO/parse_vdso.c in Linux 6.13, which is licensed with Creative Commons Zero License, version 1.0, available at https://creativecommons.org/publicdomain/zero/1.0/legalcode
It also incorporates the patch at: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/tools/testing/selftests/vDSO?h=next&id=01587d80b04f29747b6fd6d766c3bfa632f14eb0, with changes to fix the pointer arithmetic on s390x.
§Safety
Parsing the vDSO involves a lot of raw pointer manipulation. This implementation follows Linux’s reference implementation, and adds several additional safety checks.
Structs§
- Vdso 🔒
Functions§
- elf_
hash 🔒 - Straight from the ELF specification…and then tweaked slightly, in order to avoid a few clang warnings. (And then translated to Rust).
- gnu_
hash 🔒 - init_
from_ 🔒sysinfo_ ehdr - Create a
Vdso
value by parsing the vDSO at thesysinfo_ehdr
address.