summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorbrucec <brucec@FreeBSD.org>2010-12-02 22:19:30 +0000
committerbrucec <brucec@FreeBSD.org>2010-12-02 22:19:30 +0000
commitdc1c4b92702120dc06348d91c97ca533d7a27bc6 (patch)
tree5956ab7635210faf252c5fa49f64ff6a8bda82de /share
parent904cc72f190967800c699fe0d05d7044b2414147 (diff)
downloadFreeBSD-src-dc1c4b92702120dc06348d91c97ca533d7a27bc6.zip
FreeBSD-src-dc1c4b92702120dc06348d91c97ca533d7a27bc6.tar.gz
Disallow passing in a count of zero bytes to the bus_space(9) functions.
Passing a count of zero on i386 and amd64 for [I386|AMD64]_BUS_SPACE_MEM causes a crash/hang since the 'loop' instruction decrements the counter before checking if it's zero. PR: kern/80980 Discussed with: jhb
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/bus_space.93
1 files changed, 3 insertions, 0 deletions
diff --git a/share/man/man9/bus_space.9 b/share/man/man9/bus_space.9
index 5a18dfb..8c832f2 100644
--- a/share/man/man9/bus_space.9
+++ b/share/man/man9/bus_space.9
@@ -719,6 +719,9 @@ or which return data read from bus space (i.e., functions which
do not obviously return an error code) do not fail.
They could only fail
if given invalid arguments, and in that case their behaviour is undefined.
+Functions which take a count of bytes must not pass in a count of zero;
+doing so will cause a panic if the kernel was compiled with
+.Cd "options INVARIANTS" .
.Sh TYPES
Several types are defined in
.In machine/bus.h
OpenPOWER on IntegriCloud