Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable interrupts before return to user during userinit. #195

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

dbittman
Copy link
Contributor

Fixes a race condition where the kernel could see an interrupt occurring after the return_to_user code called by userinit resets the FS segment value, but before we have switched to user. This causes all TLS variables in the kernel to cause a crash on the next load. The fix mirrors the exit path code for syscalls better.

@dbittman dbittman added bug Something isn't working kernel Internal kernel issues labels Jul 30, 2024
@dbittman dbittman self-assigned this Jul 30, 2024
@dbittman dbittman requested a review from gvnn3 as a code owner July 30, 2024 01:10
Copy link
Contributor

@gvnn3 gvnn3 left a comment

Choose a reason for hiding this comment

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

LGTM

@dbittman dbittman merged commit 57b9936 into main Jul 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kernel Internal kernel issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants