cap_mmap_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cap_mmap_addr (9) β€” a.k.a. the "can u even map here bestie" check ✨

okay so real talk, this whole page lives in the Kernel API Manual and it's genuinely one of the shorter ones, so like… enjoy the vibes while they last 🫢


🌸 NAME 🌸

cap_mmap_addr β€” check if able to map given addr


✨ SYNOPSIS ✨

int cap_mmap_addr (unsigned long addr );

πŸŽ€ ARGUMENTS πŸŽ€

  • addr β€” the address that somebody's trying to map, like "excuse me can i put something right here" πŸ₯Ί

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: if the process is attempting to map memory below dac_mmap_min_addr, then it needs CAP_SYS_RAWIO. that's it. that's the whole check. so iconic of it, honestly πŸ‘‘

and the other parameters to this function? literally unused by the capability security module. not ignored-dramatically, not "saved for later", just… unused. lowkey a little ghosted πŸ™ˆ


⭐ RETURN ⭐

  • 0 β€” this mapping should be allowed, slay, go ahead bestie πŸ’…
  • -EPERM β€” nope, not today, permission said no 😭

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file ./security/commoncap.c (the mothership, iykyk) plus the whole friend group:


πŸŽ€ and that's the whole page, no cap. short, sweet, absolutely ate. periodt.

ok so before u go β€” this one's brought to u by the source ./security, dated October 2026, and it's filed under cap_mmap_addr(9). mwah, bye bestie πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from