Skip to main content

fault_divide_by_zero

Function fault_divide_by_zero 

Source
pub fn fault_divide_by_zero()
Expand description

Deliberately divide by zero, raising a ring-3 divide-error (#DE, vector 0) at CPL3 - §22 A14. Uses raw asm because Rust inserts a divide guard that would PANIC (unwind) instead of faulting, and the threat model includes adversarial asm services. The kernel must kill this task, not halt.