Repository navigation
Conversation
root-over
force-pushed
the
test/libkernel-named-shm-noexec-skip
branch
from
November 4, 2026 15:29
0474e40 to
89b812e
Compare
CheckExecutableSharedMappings maps each descriptor with every protection from 0 to 7. Its check now takes whether the executable protections are mapped, so a caller can run the readable and writable cases alone. Every caller still passes true, so the test runs as before.
… noexec guest_mmap_executable maps named shared memory with PROT_EXEC, and named objects are files under /dev/shm. Docker mounts /dev/shm noexec by default, so the host refuses the mapping with EPERM and the test aborted in the GPU CI containers, which list it as failing on main. The test now reads the mount flags of /dev/shm with statvfs. When it is noexec it still runs every regular file, anonymous, JIT and non-executable named mapping, skips the executable named ones and returns 77, which the test registers as a skip.
…noexec /dev/shm Named shared memory objects are files under /dev/shm on Linux, so on a host that mounts it noexec, as Docker does by default, a PROT_EXEC mapping of a named object fails where FreeBSD 11.4 maps POSIX shared memory executable. Anonymous objects are a memfd and are not affected.
root-over
force-pushed
the
test/libkernel-named-shm-noexec-skip
branch
from
November 4, 2026 15:30
89b812e to
bbf62b9
Compare
|
Windows run, for head
No title was run. AI-assisted: yes. Claude Code ran the builds and tests and drafted this comment; the numbers are from the runs on this machine. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
guest_mmap_executablefails onmainin containers. The NVIDIA and AMD GPU CI runs on #10069 list it under "Failing on main too" (Subprocess aborted).CheckExecutableSharedMappingsmaps named shared memory withPROT_EXEC. On Linux, named objects are files under/dev/shm, and Docker mounts/dev/shmnoexecby default. Reproduced withdocker run --tmpfs /dev/shm:rw,noexec,nosuid,nodev(ubuntu:24.04, host binaries throughchroot):The same container with
/dev/shmmountedexecpasses, so the mount option is the only cause./dev/shmwithstatvfs. When it isnoexec, the test:memfd), JIT and non-executable named mapping;skipped, the host mounts /dev/shm noexec, so named shared memory is not mapped executableand returns 77.guest_mmap_executablegetsSKIP_RETURN_CODE 77. Windows is unchanged.PROT_EXECmapping of a named object fails, where FreeBSD 11.4 maps POSIX shared memory executable. The library change this would need (named objects outside/dev/shm) is left out of this PR.Tested
Ubuntu, kernel 7.0, GCC 15.2.0, Release.
/dev/shmmainrw,nosuid,nodev)noexecGuestMemory.cpp:3576guest_memorypasses.tools/check_conventions.pypasses.tools/pr_overlap.py: feat(aot): consolidate native ARM64 compiler, runtime and consumers #5021, fix(libkernel): return EACCES for unknown ranges on direct-memory release paths #7105, feat(libkernel): direct memory mappings on macOS hosts #7631 and fix(relinker): match AppContent utility import to provider #13486 touchGuestMemory.cpp, the libkernel debt file orCMakeLists.txt, but none touchesCheckExecutableSharedMappingsor theguest_mmap_executableregistration.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)