v1
2026-08-15
修复 nommu mmap 错误并加测试 · v1
修复 nommu 的 mmap/munmap/mremap 错误处理,私有映射调用 mmap_prepare,并新增 nommu kselftests。
原始补丁链接
子 Patch(6)
1/6
mm: nommu: fix do_mremap() to correctly update internal states
When shrinking a VMA via mremap, the bounds are modified directly: mm/nommu.c:do_mremap() { … vma->vm_end = vma->vm_start + new_len; … } This shrinks the VMA without updating its bound
2/6
mm: nommu: use vma_is_anonymous() to check if vmas are anonymous
Private file mappings (like those from /dev/zero) can have vma->vm_file set but remain structurally anonymous since they lack vm_ops. Testing vma->vm_file instead of vma_is_anonymous(vma) might cause
3/6
mm: nommu: fix an issue on map request to /dev/zero
[mm: nommu: fix an issue on map request to /dev/zero] [patchwork series v1] submitter=Hajime Tazaki patches (1): [RFC,3/6] mm: nommu: fix an issue on map request to /dev/zero — [Re: [RFC PATCH 3/
4/6
selftests: fix build errors on alpine linux
Some nommu architectures only work on Alpine Linux, which doesn’t use glibc for the standard library. It uses musl-libc and is implemented in a different way as glibc, resulting build failures. This
5/6
selftests: run tests on nommu architecture
Architectures lacks MMU doesn’t support fork(2) syscall and only vfork(2) is available with limitations. Thus, we cannot run kselftest on nommu architecture as is. This commit addresses this issue w
6/6
selftests/mm: add nommu mmap and mremap behavior tests
Introduce a kselftest utility to validate memory mapping capabilities under nommu kernels, aligned with Documentation/admin-guide/mm/nommu-mmap.rst. The test implements basic checks into a generic ar