Skip to main content

Module ptr

Module ptr 

Source
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§

LocalUserfull
A pointer to a potentially invalid address, tied to the current address space.
PointerError
The error returned when a memory access to userspace failed.
TaggedNonNull
A [NonNull<T>] pointer with a numerical tag.
Userfull
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_mutfull
nullfull
Produces a null User<*const T>
null_mutfull
Produces a null User<*mut T>
slice_from_raw_parts⚠full
Safety
slice_from_raw_parts_mutfull