VM_MAP_CHECK_PROTECTION(9)
π VM_MAP_CHECK_PROTECTION(9) β the kernel dev manual, bestie edition β¨
okay so this is a page from the Kernel Developer's Manual, section 9 (that's the kernel-functions girlies, iykyk) π
πΈ NAME πΈ
vm_map_check_protection β the vibe check for memory protection on a vm_map π
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_map.h>
boolean_t
vm_map_check_protection(vm_map_t map, vm_offset_t start,
vm_offset_t end, vm_prot_t protection);
like, include all three of those headers, no skipping, fr fr π«Ά
π DESCRIPTION π
The vm_map_check_protection() function asserts that the target map allows the specified privilege protection over the entire address range from start to end. literally the whole thing, no gaps, no excuses π
The region MUST be contiguous β no holes allowed, periodt. π
π₯ IMPLEMENTATION NOTES π₯
bestie listen. this code does not check β and SHOULD not check β whether the contents of the region are actually accessible. it's giving "not my department." for example, a small file may be mapped into an address space which is significantly larger in size. so yeah, size of mapping β size of file, don't come for her π
π RETURN VALUES π
TRUEβ the privilege is allowed, slay πFALSEβ it is not allowed, or any other error occurred. either way you getFALSE. that's the whole answer, no nuance, no crumbs π
π¦ SEE ALSO π¦
go read those too, they're iconic in their own right β
π AUTHORS π
This manual page was written by Bruce M Simpson <bms@spc.org>. king behaviour, we stan π«Ά
and that's the whole page diva π this edition came from Debian, dated July 19, 2003 β yeah she's vintage, and she still ate πΈ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2003 Bruce M Simpson <bms@spc.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms