[Midnightbsd-cvs] [MidnightBSD/src] 26a151: linux: support protection keys for Chromium sandbo...
Lucas Holt
noreply at github.com
Fri Sep 25 14:02:04 EDT 2026
Branch: refs/heads/master
Home: https://github.com/MidnightBSD/src
Commit: 26a151c0d7421348491a4ae469d608e672332a8c
https://github.com/MidnightBSD/src/commit/26a151c0d7421348491a4ae469d608e672332a8c
Author: Lucas Holt <luke at foolishgames.com>
Date: 2026-09-25 (Fri, 25 Sep 2026)
Changed paths:
A LINUX_BRAVE_SANDBOX_BACKPORT.md
M UPDATING
M sys/amd64/amd64/fpu.c
M sys/amd64/amd64/sys_machdep.c
A sys/amd64/linux/linux_emul_md.h
A sys/amd64/linux/linux_pkru.c
M sys/amd64/linux/linux_sysvec.c
M sys/amd64/linux32/linux32_sysvec.c
A sys/arm64/linux/linux_emul_md.c
A sys/arm64/linux/linux_emul_md.h
M sys/compat/linux/linux_dummy.c
M sys/compat/linux/linux_emul.c
M sys/compat/linux/linux_emul.h
M sys/compat/linux/linux_misc.c
M sys/compat/linux/linux_mmap.c
M sys/compat/linux/linux_mmap.h
A sys/i386/linux/linux_emul_md.c
A sys/i386/linux/linux_emul_md.h
M sys/modules/linux/Makefile
M sys/modules/linux_common/Makefile
M sys/x86/include/fpu.h
M sys/x86/include/specialreg.h
M sys/x86/include/sysarch.h
Log Message:
-----------
linux: support protection keys for Chromium sandboxing (#522)
* linux: implement memory protection key syscalls
Backport Linuxulator pkey_alloc, pkey_free, and pkey_mprotect support for Chromium V8 sandboxing. Add the required XSAVE layout helpers and Linux-compatible PKRU process lifecycle handling.
AI-Assisted-by: OpenAI Codex (GPT-5)
Signed-off-by: Lucas Holt <luke at foolishgames.com>
* UPDATING: note Linuxulator protection key support
AI-Assisted-by: OpenAI Codex (GPT-5)
Signed-off-by: Lucas Holt <luke at foolishgames.com>
* linux: fix pkey syscall portability and feature checks
Define the pkey syscall wrappers in shared Linux compatibility code so arm64 and i386 modules resolve their syscall entries. Require active PKU, OSPKE, and PKRU XSAVE state before accessing PKRU.
AI-Assisted-by: OpenAI Codex (GPT-5)
Signed-off-by: Lucas Holt <luke at foolishgames.com>
* linux: include image activation definitions in emul MD files
linux_emul.h declares linux_common_execve with struct image_args. Include sys/imgact.h so i386 and arm64 builds see the complete declaration and do not fail -Wvisibility.
AI-Assisted-by: Codex GPT-5
Signed-off-by: Lucas Holt <luke at foolishgames.com>
* linux: prevalidate pkey_mprotect ranges
Check fixed-boundary VM entries before changing ordinary page protections so a predictable PKRU tagging rejection cannot leave a partial update. Keep the validation in amd64_pkru_update to cover concurrent map changes.
AI-Assisted-by: Codex GPT-5
Signed-off-by: Lucas Holt <luke at foolishgames.com>
---------
Signed-off-by: Lucas Holt <luke at foolishgames.com>
To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications
More information about the Midnightbsd-cvs
mailing list