freebsd-dev/sys/riscv
John Baldwin 753bcca440 riscv: Clear SUM in SSTATUS for supervisor mode exceptions.
Previously, a page fault taken during copyin/out and related functions
would run the entire fault handler while permitting direct access to
user addresses.  This could also leak across context switches (e.g. if
the page fault handler was preempted by an interrupt or slept for disk
I/O).

To fix, clear SUM in assembly after saving the original version of
SSTATUS in the supervisor mode trapframe.

Reviewed by:	mhorne, jrtc27
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D29763
2021-04-21 13:57:04 -07:00
..
conf Split out the NODEBUG options to a common file 2021-01-14 16:57:53 +00:00
include Introduce kdb-level watchpoint functions 2021-03-29 12:05:43 -03:00
riscv riscv: Clear SUM in SSTATUS for supervisor mode exceptions. 2021-04-21 13:57:04 -07:00
sifive riscv: Fix build by using the correct device-tree include path 2021-01-16 11:31:39 +01:00