Skip to main content

Module ptr

Module ptr 

Source
Expand description

Provides pointer wrappers for safely accessing userspace

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.

Modulesยง

impls ๐Ÿ”’ (x86 or x86-64) and full
user_local ๐Ÿ”’ full
user_ptr ๐Ÿ”’ full

Structsยง

LocalUserfull
PointerError
The error returned when a memory access to userspace failed
Userfull
A pointer to a potentially invalid address, tied to a specific address space

Functionsยง

local_slice_from_raw_partsโš full
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
slice_from_raw_parts_mutfull