Module sum_guard

Module sum_guard 

Source
Expand description

SUM (permit Supervisor User Memory access) 位保护器

提供 RAII 方式管理 sstatus 寄存器的 SUM 位,确保在访问用户空间内存时 正确设置和清除 SUM 位,即使发生 panic 也能正确恢复。

Structs§

SumGuard
SUM 位保护器,基于 RAII 实现用户空间内存访问保护。