freebsd-dev/share/man
Konstantin Belousov 30b3018d48 Provide protection against starvation of the ll/sc loops when accessing userpace.
Casueword(9) on ll/sc architectures must be prepared for userspace
constantly modifying the same cache line as containing the CAS word,
and not loop infinitely.  Otherwise, rogue userspace livelocks the
kernel.

To fix the issue, change casueword(9) interface to return new value 1
indicating that either comparision or store failed, instead of relying
on the oldval == *oldvalp comparison.  The primitive no longer retries
the operation if it failed spuriously.  Modify callers of
casueword(9), all in kern_umtx.c, to handle retries, and react to
stops and requests to terminate between retries.

On x86, despite cmpxchg should not return spurious failures, we can
take advantage of the new interface and just return PSL.ZF.

Reviewed by:	andrew (arm64, previous version), markj
Tested by:	pho
Reported by:	https://xenbits.xen.org/xsa/advisory-295.txt
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D20772
2019-07-12 18:43:24 +00:00
..
man1 share: normalize paths using SRCTOP-relative paths or :H when possible 2017-03-04 11:26:40 +00:00
man3 Add some missing MLINKs for tree(3). 2019-06-17 16:57:44 +00:00
man4 Add support for RTL8156, 2.5GbE USB network controller, to if_cdce(4). 2019-07-10 05:45:50 +00:00
man5 Remove NAND and NANDFS support 2019-06-25 04:50:09 +00:00
man6 Update intro(6) - remove hint that doesn't work, add explicit list 2017-11-27 12:39:35 +00:00
man7 Make tests(7) point people at the atf(7) man page. 2019-06-02 16:33:24 +00:00
man8 Add rc.resume(8) alias for rc(8) to fix the manpage cross references 2019-02-12 23:33:16 +00:00
man9 Provide protection against starvation of the ll/sc loops when accessing userpace. 2019-07-12 18:43:24 +00:00
Makefile Add more SUBDIR_PARALLEL. 2015-10-15 22:55:08 +00:00