We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
{Fs,Gs}Base::write()
Segment64::write_base() states:
Segment64::write_base()
Safety The caller must ensure that this write operation has no unsafe side effects, as the segment base address might be in use.
The caller must ensure that this write operation has no unsafe side effects, as the segment base address might be in use.
On the other hand, FsBase::write() is not even unsafe.
FsBase::write()
This leads to this kind of code in our OS:
unsafe fn writefs(base: VirtAddr) { if CR4.FSGSBASE { unsafe { FS::write_base(base); } } else { FsBase::write(base); } }
I think we should make FsBase::write() and GsBase::write() unsafe, right?
GsBase::write()
The text was updated successfully, but these errors were encountered:
Yes, I agree with your analysis. Feel free to open a PR.
Sorry, something went wrong.
{Fs,Gs,KernelGs}Base::write()
Successfully merging a pull request may close this issue.
Segment64::write_base()
states:On the other hand,
FsBase::write()
is not even unsafe.This leads to this kind of code in our OS:
I think we should make
FsBase::write()
andGsBase::write()
unsafe, right?The text was updated successfully, but these errors were encountered: