-
Notifications
You must be signed in to change notification settings - Fork 132
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
VirtAddr improvements #370
Conversation
Signed-off-by: Joe Richey <[email protected]>
Signed-off-by: Joe Richey <[email protected]>
Signed-off-by: Joe Richey <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me overall!
We should also update the docs of new_truncate
because it still mentions new
and try_new
as alternative methods with similar behavior, but these methods don't do any sign extension anymore. So maybe remove that last sentence, or change it to "If you want to check whether an address is canonical ...".
Co-authored-by: Philipp Oppermann <[email protected]> Signed-off-by: Joe Richey <[email protected]>
I updated the docs for |
The first commit removes our
*const T -> VirtAddr
conversion on 32-bit platforms. Per the comment, it's "only here for backwards compatibility". Should we go even further and remove the conversions on all non-x86_64
platforms?The second commit makes it so
new
andtry_new
fail on non-canonical addresses. Fixes #299The third commit make
new
andtry_new
const. OtherVirtAddr
/PhysAddr
methods are made const in #369 (which will be pulled back into this branch when its merged).