Post #2502429
2026-04-03 11:33 UTC
@penguin42@mastodon.org.uk @stsquad@mastodon.org.uk
syscall wrappers in Valgrind are a fairly big part of the code, but mostly they don't do much, just check the arguments and check pointers to memory that the syscalls read or write. And do some fd checking / monitoring. It's only process/CPU syscalls where Valgrind has to do a lot more intrusive work.
For /proc and sysctls we do virtualise a few but for most of them we can just pass through to the originals.
ELF (and macho) and DWARF readers are also sources of headaches for us.
Replies (1)
-
@stsquad@mastodon.org.uk 2026-04-03 14:43
@paulf@mastodon.bsd.cafe @penguin42@mastodon.org.uk same for #qemu really - the majority of the code is boilerplate except where we run into our edge cases. For qemu these are a) 64 bit file cookies for 32 bit b) overly fancy memory mapping (multiple maps, gcs etc) and c) just good enough sandboxing of /proc. There are probably some ioctls that are hard to do for specific HW because you deal with much more complex structures.