summaryrefslogtreecommitdiff
path: root/libc/test/src/sys/mman/linux/pkey_test.cpp
AgeCommit message (Collapse)Author
2025-11-18[libc] Implement pkey_alloc/free/get/set/mprotect for x86_64 linux (#162362)Jackson Stogel
This patch provides definitions for `pkey_*` functions for linux x86_64. `pkey_alloc`, `pkey_free`, and `pkey_mprotect` are simple syscall wrappers. `pkey_set` and `pkey_get` modify architecture-specific registers. The logic for these live in architecture specific directories: * `libc/src/sys/mman/linux/x86_64/pkey_common.h` has a real implementation * `libc/src/sys/mman/linux/generic/pkey_common.h` contains stubs that just return `ENOSYS`.