[−][src]Function sunrise_kernel::force_double_fault
unsafe fn force_double_fault()
Forces a double fault by stack overflowing.
Can be used to manually check the double fault task gate is configured correctly.
Works by purposely creating a KernelStack overflow.
When we reach the top of the stack and attempt to write to the guard page following it, it causes a PageFault Execption.
CPU will attempt to handle the exception, and push some values at $esp
, which still points in the guard page.
This triggers the DoubleFault exception.