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

Don't set nomem in load_tss #358

Merged
merged 1 commit into from
Mar 26, 2022
Merged

Don't set nomem in load_tss #358

merged 1 commit into from
Mar 26, 2022

Conversation

josephlr
Copy link
Contributor

As pointed out in #323, ltr writes memory, as it modifies the corresponding TSS Descriptor in the GDT. Because of this, setting nomem is inaccurate.

Signed-off-by: Joe Richey [email protected]

@josephlr josephlr requested a review from Freax13 March 26, 2022 08:55
Copy link
Member

@Freax13 Freax13 left a comment

Choose a reason for hiding this comment

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

Thanks!

I think the reason we only changed that in the next branch is that this is still technically broken: The GDT doesn't have interior mutability, so this is still UB even though the nomem option is set.

@Freax13 Freax13 changed the title Don't set nonmem in load_tss Don't set nomem in load_tss Mar 26, 2022
@josephlr
Copy link
Contributor Author

Thanks!

I think the reason we only changed that in the next branch is that this is still technically broken: The GDT doesn't have interior mutability, so this is still UB even though the nomem option is set.

Ya, this def doesn't fix the UB, but hopefully makes it "less bad".

@josephlr josephlr merged commit c79b9d3 into master Mar 26, 2022
@josephlr josephlr deleted the nomem branch March 26, 2022 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants