freebsd-nq/sys/riscv
John Baldwin fb97e58e5c Add stricter checks on user changes to SSTATUS.
Rather than trying to blacklist which bits userland can't write to via
sigreturn() or setcontext(), only permit changes to whitelisted bits.

- Permit arbitrary writes to bits in the user-writable USTATUS
  register that shadows SSTATUS.

- Ignore changes in write-only bits maintained by the CPU.

- Ignore the user-supplied value of the FS field used to track
  floating point state and instead set it to a value matching the
  actions taken by set_fpcontext().

Discussed with:	mhorne
MFC after:	2 weeks
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23338
2020-01-31 19:00:48 +00:00
..
conf Include the PCI stack to the riscv GENERIC kernel. 2020-01-24 17:10:21 +00:00
include Fix 64-bit value of SSTATUS_SD to use an unsigned long. 2020-01-31 17:49:15 +00:00
riscv Add stricter checks on user changes to SSTATUS. 2020-01-31 19:00:48 +00:00
sifive sifive: Fix incorrect tx/rx ctrl defines 2020-01-07 09:02:14 +00:00