PMAP_PROTECT(9)

πŸ’– PMAP_PROTECT πŸ’–

okay bestie, sit down, hydrate, and let me tell you about pmap_protect(9) β€” she's a Kernel Developer's Manual girlie, section 9, and she does exactly one thing and she does it flawlessly. ✨


🌸 NAME 🌸

pmap_protect β€” set physical page protection πŸ’…

like. the name is the plot. she sets the protection. that's the whole vibe. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <sys/param.h>
#include <vm/vm.h>
#include <vm/pmap.h>

void
pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
    vm_prot_t prot);

yes you need all three includes, don't try to be cute and skip one, she will Not compile for you πŸ™ˆ


πŸŽ€ DESCRIPTION πŸŽ€

so the tea is this: the pmap_protect() function sets the physical page permissions to prot for all the physical pages in the physical map pmap, in the virtual address range between sva and eva. πŸ’–

that's it. that's her whole job. range in, permissions out, main character energy only. ✨


⭐ SEE ALSO ⭐

  • pmap(9) β€” go read her too, she's iconic, they're a duo 🫢

πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Bruce M Simpson <bms@spc.org>. absolute legend, we stan. πŸ’œ


and that's the whole page, bestie!! this one came from Debian, dated July 18, 2014 β€” yeah she's a little vintage but vintage is just archive-core, it's giving timeless. mwah, go protect some pages. πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from