Hacker News new | ask | show | jobs
by TriangleEdge 187 days ago
I didn't know you could read random process memory in Linux. Where can I get documentation for things like this? I was learning about cgroups some time ago and got frustrated about the lack of documentation. I had to go read containerd code, which isn't ideal for wanting to just learn.
2 comments

Scanmem[0] is a library that does this for the purposes of reading/modifying game memory and a useful resource. You can also poke around in /proc for some helpers

ls -la /proc/$PID/map_files cat /proc/$PID/maps cat /proc/$PID/status

[0]https://github.com/scanmem/scanmem

The entry point of interest is probably ptrace: https://man7.org/linux/man-pages/man2/ptrace.2.html