All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v3 0/3] mmap testing suite to cover MAP_32BIT
@ 2026-09-11 15:29 Andrea Cervesato
  2026-09-11 15:29 ` [LTP] [PATCH v3 1/3] lapi/mmap: add MAP_32BIT fallback Andrea Cervesato
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Andrea Cervesato @ 2026-09-11 15:29 UTC (permalink / raw)
  To: Linux Test Project

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>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [LTP] [PATCH 1/3] lapi/mmap: add MAP_32BIT fallback
@ 2026-08-28 15:36 Andrea Cervesato
  2026-08-28 21:10 ` [LTP] " linuxtestproject.agent
  0 siblings, 1 reply; 10+ messages in thread
From: Andrea Cervesato @ 2026-08-28 15:36 UTC (permalink / raw)
  To: Linux Test Project

From: Andrea Cervesato <andrea.cervesato@suse.com>

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
 include/lapi/mmap.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/lapi/mmap.h b/include/lapi/mmap.h
index 3908310f4..f20eb3bd5 100644
--- a/include/lapi/mmap.h
+++ b/include/lapi/mmap.h
@@ -91,6 +91,10 @@
 # define MAP_DROPPABLE 0x08
 #endif
 
+#ifndef MAP_32BIT
+# define MAP_32BIT 0x40
+#endif
+
 #ifndef MREMAP_DONTUNMAP
 # define MREMAP_DONTUNMAP 4
 #endif

-- 
2.51.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-09-13  4:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 15:29 [LTP] [PATCH v3 0/3] mmap testing suite to cover MAP_32BIT Andrea Cervesato
2026-09-11 15:29 ` [LTP] [PATCH v3 1/3] lapi/mmap: add MAP_32BIT fallback Andrea Cervesato
2026-09-11 17:42   ` [LTP] " linuxtestproject.agent
2026-09-13  4:02   ` [LTP] [PATCH v3 1/3] " Li Wang
2026-09-11 15:29 ` [LTP] [PATCH v3 2/3] mmap23: add test for MAP_32BIT oversized mapping Andrea Cervesato
2026-09-13  4:03   ` Li Wang
2026-09-11 15:29 ` [LTP] [PATCH v3 3/3] mmap24: add test for MAP_32BIT address limit Andrea Cervesato
2026-09-13  4:18   ` Li Wang
  -- strict thread matches above, loose matches on Subject: below --
2026-08-28 15:36 [LTP] [PATCH 1/3] lapi/mmap: add MAP_32BIT fallback Andrea Cervesato
2026-08-28 21:10 ` [LTP] " linuxtestproject.agent
2026-08-31  8:02   ` Andrea Cervesato via ltp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.