cap_mmap_addr(9)
π 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:
cap_capable_helper(9)cap_capable(9)cap_settime(9)cap_ptrace_access_check(9)cap_ptrace_traceme(9)cap_capget(9)cap_capset(9)cap_inode_need_killpriv(9)cap_inode_killpriv(9)kuid_root_in_ns(9)rootid_from_xattr(9)cap_convert_nscap(9)get_vfs_caps_from_disk(9)cap_bprm_creds_from_file(9)cap_inode_setxattr(9)cap_inode_removexattr(9)cap_task_fix_setuid(9)cap_task_setscheduler(9)cap_task_setioprio(9)cap_task_setnice(9)cap_task_prctl(9)cap_vm_enough_memory(9)
π 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms