Add further clarification on si_addr and si_trapno.
- In the initial description of si_addr, do not claim that it is always the faulting instruction. - For si_addr, document that it is generally set to the PC for synchronous signals, but that it can be set to the the address of the faulting memory reference for some signals including SIGSEGV and SIGBUS. In particular, while SIGSEGV generally sets si_addr to the faulting memory reference, SIGBUS can vary. On some platforms, some SIGBUS signals set si_addr to the PC and other SIGBUS signals set si_addr to the faulting address depending on the specific hardware exception. - For si_trapno, synchronous signals should set this to some value. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25777
This commit is contained in:
parent
ea4c01156a
commit
b027b6637a
@ -27,7 +27,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd May 8, 2020
|
.Dd July 28, 2020
|
||||||
.Dt SIGINFO 3
|
.Dt SIGINFO 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -68,7 +68,7 @@ sending process ID
|
|||||||
.It Vt uid_t Ta Va si_uid Ta
|
.It Vt uid_t Ta Va si_uid Ta
|
||||||
sending process's real user ID
|
sending process's real user ID
|
||||||
.It Vt void Ta Va *si_addr Ta
|
.It Vt void Ta Va *si_addr Ta
|
||||||
address of faulting instruction
|
virtual address
|
||||||
.It Vt int Ta Va si_status Ta
|
.It Vt int Ta Va si_status Ta
|
||||||
exit value or signal
|
exit value or signal
|
||||||
.It Vt long Ta Va si_band Ta
|
.It Vt long Ta Va si_band Ta
|
||||||
@ -208,25 +208,24 @@ signal sent by
|
|||||||
.Xr pthread_kill 3
|
.Xr pthread_kill 3
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
|
For synchronous signals,
|
||||||
|
.Va si_addr
|
||||||
|
is generally set to the address of the faulting instruction.
|
||||||
|
However, synchronous signals raised by a faulting memory access such as
|
||||||
|
.Dv SIGSEGV
|
||||||
|
and
|
||||||
|
.Dv SIGBUS
|
||||||
|
may report the address of the faulting memory access (if available) in
|
||||||
|
.Va si_addr
|
||||||
|
instead.
|
||||||
|
.Pp
|
||||||
|
Sychronous signals set
|
||||||
|
.Va si_trapno
|
||||||
|
to a machine-dependent trap number.
|
||||||
|
.Pp
|
||||||
In addition, the following signal-specific information is available:
|
In addition, the following signal-specific information is available:
|
||||||
.Bl -column ".Dv SIGPOLL" ".Dv CLD_CONTINUED"
|
.Bl -column ".Dv SIGPOLL" ".Dv CLD_CONTINUED"
|
||||||
.It Sy Signal Ta Sy Member Ta Sy Value
|
.It Sy Signal Ta Sy Member Ta Sy Value
|
||||||
.It Dv SIGILL Ta Va si_addr Ta
|
|
||||||
address of faulting instruction
|
|
||||||
.It Ta Va si_trapno Ta
|
|
||||||
machine dependent of trap code
|
|
||||||
.It Dv SIGFPE Ta Va si_addr Ta
|
|
||||||
address of faulting instruction
|
|
||||||
.It Ta Va si_trapno Ta
|
|
||||||
machine dependent of trap code
|
|
||||||
.It Dv SIGSEGV Ta Va si_addr Ta
|
|
||||||
address of faulting memory reference
|
|
||||||
.It Ta Va si_trapno Ta
|
|
||||||
machine dependent of trap code
|
|
||||||
.It Dv SIGBUS Ta Va si_addr Ta
|
|
||||||
address of faulting instruction
|
|
||||||
.It Ta Va si_trapno Ta
|
|
||||||
machine dependent of trap code
|
|
||||||
.It Dv SIGCHLD Ta Va si_pid Ta
|
.It Dv SIGCHLD Ta Va si_pid Ta
|
||||||
child process ID
|
child process ID
|
||||||
.It Ta Va si_status Ta
|
.It Ta Va si_status Ta
|
||||||
|
Loading…
Reference in New Issue
Block a user