All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] mmap20: Fix invalid address
@ 2023-04-04 11:28 Petr Vorel
  2023-04-05  8:09 ` Jan Stancek
  2023-04-06  2:59 ` Li Wang
  0 siblings, 2 replies; 7+ messages in thread
From: Petr Vorel @ 2023-04-04 11:28 UTC (permalink / raw)
  To: ltp; +Cc: Paulson Raja L

1 << 7 (0x80) is defined as MAP_LOCKED on ppc64le and mips.
Use 1 << 9 (0x200), which looks to be unused on all archs.

Fixes: 2764e9e6a ("mmap20: New test for mmap() with MAP_SHARED_VALIDATE")

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
NOTE: (1 << 10) would work as well.

 testcases/kernel/syscalls/mmap/mmap20.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/mmap/mmap20.c b/testcases/kernel/syscalls/mmap/mmap20.c
index c346df5d1..5269179e5 100644
--- a/testcases/kernel/syscalls/mmap/mmap20.c
+++ b/testcases/kernel/syscalls/mmap/mmap20.c
@@ -20,7 +20,7 @@
 
 #define TEST_FILE "file_to_mmap"
 #define TEST_FILE_SIZE 1024
-#define INVALID_FLAG (1 << 7)
+#define INVALID_FLAG (1 << 9)
 
 static int fd = -1;
 static void *addr;
-- 
2.40.0


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

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

end of thread, other threads:[~2023-04-06 12:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-04 11:28 [LTP] [PATCH 1/1] mmap20: Fix invalid address Petr Vorel
2023-04-05  8:09 ` Jan Stancek
2023-04-06  2:59 ` Li Wang
2023-04-06  9:48   ` Petr Vorel
2023-04-06 10:29     ` Li Wang
2023-04-06 11:13       ` Petr Vorel
2023-04-06 12:37         ` Li Wang

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.