-
Notifications
You must be signed in to change notification settings - Fork 69
Rename __USER_CAP* and *copy{in,out}cap* #2494
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
base: dev
Are you sure you want to change the base?
Conversation
These functions take the source or destintation address indirectly from
a potentially missaligned buffer. Rename them to refect this and to
free up the copy{in,out}ptr names.
Some of the code in question is dead code and doesn't or won't compile,
but I've changed it all for consistency.
NB: If the pointers are actually stored under aligned then this code is
broken with CHERI.
Rename the __USER_CAP macros to USER_PTR. This reflects our desire to talk about pointers when ever possible rather than capabilities.
Rename all variants of copy{in,out}cap to copy{in,out}ptr. This
reflects our desire to talk about pointers when ever possible rather
than capabilities.
bsdjhb
left a comment
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.
Generally looks good to me
| .Fn copyoutptr_nofault | ||
| functions must be used when copying data which may contain pointers and | ||
| they may be used anywhere, | ||
| but they should be used only when necessicary to limit the numeber of |
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.
| but they should be used only when necessicary to limit the numeber of | |
| but they should be used only when necessary to limit the number of |
| and | ||
| .Fn copyoutptr_nofault | ||
| functions must be used when copying data which may contain pointers and | ||
| they may be used anywhere, |
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.
I would be tempted to drop "and they may be used anywhere", and just say "must be used when copying data which contains pointers, but they should only be used when necessary..."
__USER_CAP*and drop the__prefix following the model of PTRIN. (See RFC: rename __USER_CAP* to __USER_PTR*? #2485)