pub struct WxPolicy { /* private fields */ }Expand description
W^X (Write XOR Execute) policy enforcement.
Ensures no memory page is both writable and executable simultaneously.
Implementations§
Source§impl WxPolicy
impl WxPolicy
pub fn new() -> Self
Sourcepub fn check_flags(&self, writable: bool, executable: bool) -> bool
pub fn check_flags(&self, writable: bool, executable: bool) -> bool
Check whether a page flags combination violates W^X.
Returns true if the flags are safe (not both writable and executable).
Sourcepub fn violation_count(&self) -> u64
pub fn violation_count(&self) -> u64
Get the number of detected W^X violations.