pub fn verify_stack(expected: u64, observed: u64)Expand description
Verify a stack canary value against the expected value.
This is the core verification function called from context switch hooks
or periodic stack checks. It compares observed (read from the stack)
against expected (from the canary table).
§Panics
Panics with “stack smashing detected” if the values do not match, preventing any further execution of the compromised thread.