Purpose of PTRACE_SETSIGINFO for x86
okash.khawaja at gmail.com
Fri Dec 14 17:30:42 EST 2018
What does the PTRACE_SETSIGINFO ptrace command do?
I can see in kernel/ptrace.c:ptrace_request() it calls
ptrace_setsiginfo(), passing it the child's (tracee's) task descriptor
and siginfo_t instance originally passed in from user space.
ptrace_setsiginfo() sets child's last_siginfo to the siginfo_t
instance passed in. Now there are only two places where a
child->last_siginfo's value is read are in kernel/ptrace.c:
1. by the ptrace command PTRACE_GETSIGINFO
2. by the ptrace command PTRACE_LISTEN
There doesn't seem to be a place where value of last_siginfo is read
by signal handling code. There is however this comment in
* Update the siginfo structure if the signal has
* changed. If the debugger wanted something
* specific in the siginfo structure then it should
* have updated *info via PTRACE_SETSIGINFO.
Where does PTRACE_SETSIGINFO update *info?
More information about the Kernelnewbies