Page MenuHomeFreeBSD

D29763.diff
No OneTemporary

D29763.diff

diff --git a/sys/riscv/riscv/exception.S b/sys/riscv/riscv/exception.S
--- a/sys/riscv/riscv/exception.S
+++ b/sys/riscv/riscv/exception.S
@@ -104,6 +104,11 @@
sd t0, (TF_SEPC)(sp)
csrr t0, sstatus
sd t0, (TF_SSTATUS)(sp)
+.if \mode == 1
+ /* Disable user address access for supervisor mode exceptions. */
+ li t0, SSTATUS_SUM
+ csrc sstatus, t0
+.endif
csrr t0, stval
sd t0, (TF_STVAL)(sp)
csrr t0, scause

File Metadata

Mime Type
text/plain
Expires
Fri, Jun 12, 9:57 AM (9 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33904442
Default Alt Text
D29763.diff (420 B)

Event Timeline