#[repr(align(4096))]pub struct CfiShadowStack { /* private fields */ }
Expand description
CFI shadow stack for return address protection.
Implementations§
Source§impl CfiShadowStack
impl CfiShadowStack
pub const fn new() -> Self
Sourcepub fn push_return_address(&self, addr: usize) -> Result<(), ThreadError>
pub fn push_return_address(&self, addr: usize) -> Result<(), ThreadError>
Push return address onto shadow stack.
Sourcepub fn pop_return_address(&self) -> Result<usize, ThreadError>
pub fn pop_return_address(&self) -> Result<usize, ThreadError>
Pop and verify return address.
Sourcepub fn verify_return(&self, addr: usize) -> bool
pub fn verify_return(&self, addr: usize) -> bool
Verify return address matches shadow stack.
Auto Trait Implementations§
impl !Freeze for CfiShadowStack
impl RefUnwindSafe for CfiShadowStack
impl Send for CfiShadowStack
impl Sync for CfiShadowStack
impl Unpin for CfiShadowStack
impl UnwindSafe for CfiShadowStack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more