ptrace(2) provides tools to modify a Linux process’s “user” area (search http://linux.die.net/man/2/ptrace for PTRACE_POKEUSER).
What does this memory region look like? Where can I find the documentation of its layout?
Thanks!
P.S. I realize the area contains things like signal actions, accounting information and a system stack, but I’m curious of the exact format. =)
Under PEEKUSER, the man page for ptrace says
So look in
/usr/include/sys/user.hto see the definition ofstruct user. To access things from there you’ll want to use an offsetof macro to find the right offset to read/write the data you want.