Expand description
This module provides helpers for Supervisor Mode Access Prevention (SMAP).
SMAP is a security feature that helps prevent accidental accesses to user
memory by a kernel. This feature can be enabled by setting
Cr4Flags::SUPERVISOR_MODE_ACCESS_PREVENTION. Once enabled, accesses to
user memory by the kernel will generate a page fault (#PF) unless the
RFlags::ALIGNMENT_CHECK bit is set.
The stac and clac instructions can be used to efficiently update the
ALIGNMENT_CHECK flag.
Not all processors support SMAP.
Structsยง
- Smap
- A helper type that provides SMAP related methods.