⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

check_canary

Function check_canary 

Source
pub fn check_canary(tid: u64) -> Result<(), KernelError>
Expand description

Check a thread’s stack canary.

Looks up the expected canary for tid and compares it to the value currently at the canary’s stack location (as represented by calling verify_stack with the read-back value).

Returns Ok(()) if the canary matches, or panics on mismatch.

Returns Err if the thread has no registered canary.