Expand description
Virtual memory.
This module deals with managing a single VMA in the address space of a userspace process. Each VMA corresponds to a region of memory that the userspace process can access, and the VMA lets you control what happens when userspace reads or writes to that region of memory.
The module has several different Rust types that all correspond to the C type called
vm_area_struct
. The different structs represent what kind of access you have to the VMA, e.g.
VmaRef
is used when you hold the mmap or vma read lock. Using the appropriate struct
ensures that you can’t, for example, accidentally call a function that requires holding the
write lock when you only hold the read lock.
Modules§
Structs§
- VmaMixed
Map - A wrapper for the kernel’s
struct vm_area_struct
with read access andVM_MIXEDMAP
set. - VmaNew
- A configuration object for setting up a VMA in an
f_ops->mmap()
hook. - VmaRef
- A wrapper for the kernel’s
struct vm_area_struct
with read access.
Type Aliases§
- vm_
flags_ t - The integer type used for vma flags.