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

Allow mutation of the GDT #322

Closed
JCapucho opened this issue Nov 8, 2021 · 1 comment
Closed

Allow mutation of the GDT #322

JCapucho opened this issue Nov 8, 2021 · 1 comment

Comments

@JCapucho
Copy link

JCapucho commented Nov 8, 2021

I've been experiencing with SMP and was trying to reuse the same GDT for all cores since my segments are always the same, but I found a problem, the processor was setting the ACCESS bit in the TSS lower half segment and causing general protection faults when trying to load the TSS segment selector in another processor.

It would be great if there was a way to mutate the GDT in a way that allowed to unset this bit.

@Freax13
Copy link
Member

Freax13 commented Nov 16, 2021

First of all thank you for raising that issue, we were previously not aware of the side effects caused by loading a TSS and the processor changing the GDT entries. The old implementation didn't allow any mutation, not by the processor nor by a user, so given that the processor was mutating it, it was technically unsound.

Following the discussion in #323 (comment), we decided that we will no longer support sharing a GDT in the next breaking release.

@Freax13 Freax13 closed this as completed Nov 16, 2021
josephlr added a commit that referenced this issue Mar 29, 2022
Hopefully, this help address confusion like that seen in:
#322

Signed-off-by: Joe Richey <[email protected]>
josephlr added a commit that referenced this issue Mar 30, 2022
Hopefully, this help address confusion like that seen in:
#322

Signed-off-by: Joe Richey <[email protected]>
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

No branches or pull requests

2 participants