Address-Independent Latency of User-Mode Faults to Supervisor Addresses
Type: privileged
Sv39
| Version | State | Ratified |
|---|---|---|
| 0.4.0 | development |
"Svukte" Extension for Address-Independent Latency of User-Mode Faults to Supervisor Addresses, Version 0.4
The Svukte extension provides a means to make user-mode accesses to supervisor memory raise page faults with timing that is independent of the address-translation configuration and page-table contents, thereby mitigating attacks that attempt to discover the supervisor software's address-space layout.
If the Svukte extension is implemented, the `senvcfg`.UKTE field is writable. If the hypervisor extension is additionally implemented, the `hstatus`.HUKTE field is also writable. See <<sec:senvcfg>> and <<sec:hstatus>> for the definitions of those fields.
The Svukte extension depends on the Sv39 extension.
Note: Svukte is not defined for Sv32 because the small address space limits the available entropy, reducing the effectiveness of address-space layout randomization. If an Sv32 variant were to be defined, it would need to account for the fact that it is more common to reserve only the upper 1 GiB of the virtual-address space for the operating system, leaving the lower 3 GiB for user processes.
When `senvcfg`.UKTE=1 and the active `satp` register's MODE field is not Bare, an instruction fetch or explicit memory access whose effective privilege mode is U or VU is considered to be _Svukte-qualified_. For any Svukte-qualified memory access, virtual addresses >= 2^SXLEN-1^ are considered to be invalid; hence, an Svukte-qualified access to such an address raises a page-fault exception corresponding to the original access type. The timing of an instruction that raises an exception for this reason must be independent of the faulting virtual address.
Note: An Svukte-qualified access to such an address raises an exception even if the underlying PTE would have otherwise allowed the access. Practical implementations of Svukte will raise these exceptions based upon the effective address, without accessing the page tables or address-translation caches.
Note: Since whether an instruction is Svukte-qualified depends on the _effective_ privilege mode of the access, even some instructions executed in HS-mode or M-mode (e.g. HLV with `hstatus`.SPVP=0, or LW with `mstatus`.MPRV=1 and `mstatus`.MPP=U) are Svukte-qualified.
As described in <<sec:hstatus>>, the `hstatus`.HUKTE field, rather than the `senvcfg`.UKTE field, determines whether HLV, HLVX, and HSV instructions executed within U-mode are Svukte-qualified.
sfence.vma — Supervisor memory-management fencesret — Supervisor Mode Return from Trapmedeleg — Machine Exception Delegationmedelegh — Machine Exception Delegation, High bitsmideleg — Machine Interrupt Delegationmscontext — Machine Supervisor Contextsatp — Supervisor Address Translation and Protectionscause — Supervisor Causescontext — Supervisor Contextscounteren — Supervisor Counter Enablesenvcfg — Supervisor Environment Configurationsepc — Supervisor Exception Program Countersie — Supervisor interrupt-enable registersip — Supervisor Interrupt Pendingsscratch — Supervisor Scratch Registersstatus — Supervisor Statusstval — Supervisor Trap Valuestvec — Supervisor Trap VectorVersion af3eaf9+cheriot.f635218
Data from the RISC-V Unified Database, copyright RISC-V International and contributors.
CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.
This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.