KernelTestFramework / ktf

Kernel Test Framework
BSD 2-Clause "Simplified" License
139 stars 19 forks source link

entry: disable interrupts during usermode transition #316

Closed wipawel closed 1 year ago

wipawel commented 1 year 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.