aboutsummaryrefslogtreecommitdiffstats
path: root/man7
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2019-12-23 12:31:46 -0500
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-04-10 09:41:55 +0200
commitd128b5b7ee560e84a06b986bcd0f89ec24d53870 (patch)
tree66278d6f298769f83f2a889174efb74073a1732d /man7
parent9b89b9dd7af60a21c23f3c0b8e3ccd81d1424e13 (diff)
downloadman-pages-d128b5b7ee560e84a06b986bcd0f89ec24d53870.tar.gz
sigaction.2, signal.7: Document kernel bugs in delivery of signals from CPU exceptions
signal.7: Which signal is delivered in response to a CPU exception is under-documented and does not always make sense. See <https://bugzilla.kernel.org/show_bug.cgi?id=205831> for an example where it doesn’t make sense; per the discussion there, this cannot be changed because of backward compatibility concerns, so let’s instead document the problem. sigaction.2: For related reasons, the kernel doesn’t always fill in all of the fields of the siginfo_t when delivering signals from CPU exceptions. Document this as well. I imagine this one _could_ be fixed, but the problem would still be relevant to anyone using an older kernel. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7')
-rw-r--r--man7/signal.740
1 files changed, 30 insertions, 10 deletions
diff --git a/man7/signal.7 b/man7/signal.7
index a0406d6493..2bcec4ad5b 100644
--- a/man7/signal.7
+++ b/man7/signal.7
@@ -796,16 +796,36 @@ Linux 2.4 and earlier:
.BR nanosleep (2).
.SH CONFORMING TO
POSIX.1, except as noted.
-.\" It must be a *very* long time since this was true:
-.\" .SH BUGS
-.\" .B SIGIO
-.\" and
-.\" .B SIGLOST
-.\" have the same value.
-.\" The latter is commented out in the kernel source, but
-.\" the build process of some software still thinks that
-.\" signal 29 is
-.\" .BR SIGLOST .
+.SH BUGS
+There are six signals that can be delivered
+as a consequence of a hardware exception:
+.BR SIGBUS ,
+.BR SIGEMT ,
+.BR SIGFPE ,
+.BR SIGILL ,
+.BR SIGSEGV ,
+and
+.BR SIGTRAP .
+Which of these signals is delivered,
+for any given hardware exception,
+is not documented and does not always make sense.
+.PP
+For example, an invalid memory access that causes delivery of
+.B SIGSEGV
+on one CPU architecture may cause delivery of
+.B SIGBUS
+on another architecture, or vice versa.
+.PP
+For another example, using the x86
+.I int
+instruction with a forbidden argument
+(any number other than 3 or 128)
+causes delivery of
+.BR SIGSEGV ,
+even though
+.B SIGILL
+would make more sense,
+because of how the CPU reports the forbidden operation to the kernel.
.SH NOTES
For a discussion of async-signal-safe functions, see
.BR signal-safety (7).