Kernel Newbies archive on
 help / Atom feed
* Purpose of PTRACE_SETSIGINFO for x86
@ 2018-12-14 22:30 Okash Khawaja
  0 siblings, 0 replies; 1+ messages in thread
From: Okash Khawaja @ 2018-12-14 22:30 UTC (permalink / raw)
  To: kernelnewbies


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?


Kernelnewbies mailing list

^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14 22:30 Purpose of PTRACE_SETSIGINFO for x86 Okash Khawaja

Kernel Newbies archive on

Archives are clonable:
	git clone --mirror kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ \
	public-inbox-index kernelnewbies

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox