KernelTestFramework / ktf

Kernel Test Framework
BSD 2-Clause "Simplified" License
140 stars 18 forks source link

entry: disable interrupts during usermode transition #316

Closed wipawel closed 10 months ago

wipawel commented 10 months ago

SWAPGS instruction used to switch the GS base to usermode one (currently 0x0) for PERCPU variables accesses is only stable within an uninterruptable context. Disable interrupts before the stack switch in enter_usermode() and re-enable it via IRET long return.