Function tss::tss_set_rsp0
source · pub fn tss_set_rsp0(
new_privilege_stack_top: VirtualAddress
) -> Result<(), &'static str>
Expand description
Sets the current CPU’s TSS privilege stack 0 (RSP0) entry, which points to the stack that the x86_64 hardware automatically switches to when transitioning from Ring 3 -> Ring 0. Should be set to an address within the current userspace task’s kernel stack. WARNING: If set incorrectly, the OS will crash upon an interrupt from userspace into kernel space!!