Module static_keys::code_manipulate

source ·
Expand description

Utilities to manipulate memory protection.

Since we need to make the code region writable and restore it during jump entry update, we need to provide utility functions here.

For std environment, we can directly use NixCodeManipulator here, which utilizes nix to manipulate memory protection with mprotect. For no_std environment, there are either no memory protection mechanism or complicated memory protections, so implement it you self. :)

Structs§

Traits§