Repository navigation
fs/mmap: back user anonymous mappings with pages in a kernel build - #20416
Merged
Merged
Conversation
royzah
requested review from
Donny9,
anchao,
jerpelea,
linguini1,
lupyuen,
masayuki2009,
pkarashchenko,
pussuw,
xiaoxiang781216 and
yf13
as code owners
September 30, 2026 17:05
linguini1
previously requested changes
Sep 30, 2026
linguini1
left a comment
Contributor
There was a problem hiding this comment.
This should be split into multiple patches and include testing logs.
acassis
previously approved these changes
Sep 30, 2026
Contributor
Author
|
Split: this one is only the anonymous maps now, the environment moved to #20423. Full |
Contributor
Author
|
@linguini1 It's one commit now, the rest moved to #20412 and #20423. Logs in the body, rerun today. |
The kernel ran the process's own heap allocator on metadata the process controls, and at teardown freed it from whatever address space was current. User anonymous mappings are now fresh pages mapped into the process, as the REVISIT asked. Signed-off-by: Royyan Zahir <[email protected]>
xiaoxiang781216
approved these changes
Oct 2, 2026
GUIDINGLI
approved these changes
Oct 9, 2026
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.
Note: Please adhere to Contributing Guidelines.
Summary
Stands alone on master. The environment part moved to #20423.
In a kernel build the kernel backed a process's anonymous
mmap()by running the process's own heap allocator, on metadata the process controls. At exit it freed the block from whatever address space happened to be current.A user anonymous mapping is fresh pages mapped into the process, as the REVISIT asked.
Impact
Kernel builds: user anonymous mappings are page-backed. Kernel and flat-build mappings unchanged.
Testing
Host: Ubuntu 24.04, x86_64. Builds and QEMU runs in
ghcr.io/apache/nuttx/apache-nuttx-ci-linux(QEMU 6.2, Arm GNU GCC 13.2, xPack RISC-V GCC 14.3). Hardware: i.MX93 (Cortex-A55), PX4 kernel build.qemu-armv8a:knshostestpasses;hellorv-virt:knsh64hello;osteststops afterStarted user_main at PID=6, as master doesqemu-armv8a:knsh:hello, thenostestrv-virt:knsh64:hello, thenostest; identical to master'si.MX93, PX4 kernel build, the previous revision of this series:
tests isolationtools/checkpatch.sh -c -u -m -gclean.