pub struct SmapGuard { /* private fields */ }
RAII guard that disables SMAP on creation and restores it on drop.
{ let _guard = SmapGuard::new(); // user memory is accessible here core::ptr::copy_nonoverlapping(user_src, kernel_dst, len); } // SMAP automatically restored
Create a new guard, temporarily disabling SMAP.
TypeId
self
Returns the argument unchanged.
Calls U::from(self).
U::from(self)
That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.
[From]<T> for U