Expand description
Provides pointer wrappers for safely accessing userspace.
§User pointers
TODO(doc).
§Local pointers
TODO(doc).
All pointers provided from userspace should be accessed through a User to
prevent kernelspace page faults from invalid or misaligned pointers.
§SMAP
When SMAP is supported on the system, all memory access through a User will
automatically set and clear the AC flag to prevent trapping.
Structs§
- Local
User full - A pointer to a potentially invalid address, tied to the current address space.
- Pointer
Error - The error returned when a memory access to userspace failed.
- Tagged
NonNull - A [
NonNull<T>] pointer with a numerical tag. - User
full - A pointer to a potentially invalid address, tied to a specific address space
Functions§
- local_
slice_ ⚠from_ raw_ parts full - Safety
- local_
slice_ from_ raw_ parts_ mut full - null
full - Produces a null
User<*const T> - null_
mut full - Produces a null
User<*mut T> - slice_
from_ ⚠raw_ parts full - Safety
- slice_
from_ raw_ parts_ mut full