[LTP] [PATCH v3 0/3] mmap testing suite to cover MAP_32BIT
Andrea Cervesato
andrea.cervesato@suse.de
Fri Sep 11 17:29:52 CEST 2026
Create two new tests to verify MAP_32BIT functionality:
- mmap23: verify if it fails with invalid parameters
- mmap24: verify bondaries of the allocation
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
Changes in v3:
- switch to PROT_NONE and drop memory writes to avoid physical allocation and commit limits
- add unrestricted control mmap() on ENOMEM to detect generic memory exhaustion
- fix format warnings on 32-bit builds by replacing %zu with %lu
- use TESTPTR macro instead of bare mmap() calls
Changes in v2:
- fix description
- Link to v1: https://lore.kernel.org/20260828-mmap_32bit_coverage-v1-0-7f0b8b589773@suse.com
---
Andrea Cervesato (3):
lapi/mmap: add MAP_32BIT fallback
mmap23: add test for MAP_32BIT oversized mapping
mmap24: add test for MAP_32BIT address limit
include/lapi/mmap.h | 4 ++
runtest/syscalls | 2 +
testcases/kernel/syscalls/mmap/.gitignore | 2 +
testcases/kernel/syscalls/mmap/mmap23.c | 36 ++++++++++
testcases/kernel/syscalls/mmap/mmap24.c | 112 ++++++++++++++++++++++++++++++
5 files changed, 156 insertions(+)
---
base-commit: f6933a16f304f36045ec39300c6496dae452933d
change-id: 20260827-mmap_32bit_coverage-09a22407aa39
Best regards,
--
Andrea Cervesato <andrea.cervesato@suse.com>
More information about the ltp
mailing list