Skip to content

Conversation

@wipawel
Copy link
Contributor

@wipawel wipawel commented Nov 3, 2023

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.

@wipawel wipawel added bugfix This fixes a bug Severity: high Very important bug - fix ASAP labels Nov 3, 2023
@wipawel wipawel requested a review from minipli-oss November 3, 2023 09:07
@wipawel wipawel requested a review from a team as a code owner November 3, 2023 09:07
@wipawel wipawel enabled auto-merge (rebase) November 3, 2023 09:07
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.

Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
Copy link
Contributor

@sktt sktt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@wipawel wipawel merged commit 4b44717 into KernelTestFramework:mainline Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This fixes a bug Severity: high Very important bug - fix ASAP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants