Expand description
exec a user program by loading the binary and replace the current address space TODO rework this code, this is only POC
Functionsยง
- enter_
usermode ๐ โ - Build an iretq frame on the current (kernel) stack and iretq into ring 3. We set CS/SS to the user segments with RPL=3, and RFLAGS with IF set so the user program runs with interrupts enabled.
- exec
- loads the program into current address spacecreate and map a user stackset TSS RSP0 so interrupts from user mode land on the kernel stackswitch to user mode via iretq (point of no return)