* [REGRESSION] mremap() returns EFAULT instead of EPERM in LTP mseal01
@ 2025-07-17 11:50 Jan Polensky
2025-07-22 11:58 ` Jan Polensky
0 siblings, 1 reply; 2+ messages in thread
From: Jan Polensky @ 2025-07-17 11:50 UTC (permalink / raw)
To: linux-mm
Hello,
we've identified a regression in `mremap()` behavior introduced by:
Refrence: 680e69e07d56 ("mm/mremap: check remap conditions earlier")
Linux-Next Tag: next-20250714
The issue is detected by the LTP test `mseal01`:
++ '[' '!' -f ltp-bin/runltp ']'
++ ltp-bin/testcases/bin/mseal01
tst_test.c:1999: TINFO: LTP version: 20250530-79-g39072797fa63
tst_test.c:2002: TINFO: Tested kernel: 6.16.0-rc5-testing-00315-g680e69e07d56 #1 SMP PREEMPT Thu Jul 17 10:59:57 CEST 2025 s390x
tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
tst_kconfig.c:676: TINFO: CONFIG_PROVE_LOCKING kernel option detected which might slow the execution
tst_test.c:1820: TINFO: Overall timeout per run is 0h 02m 00s
mseal01.c:130: TINFO: Testing mprotect() availability
mseal01.c:132: TPASS: sys_mseal(mem_addr + mem_offset, mem_alignment) passed
mseal01.c:45: TPASS: mprotect(mem_addr, mem_size, PROT_NONE) : EPERM (1)
mseal01.c:130: TINFO: Testing pkey_mprotect() availability
mseal01.c:132: TPASS: sys_mseal(mem_addr + mem_offset, mem_alignment) passed
../../../../include/lapi/pkey.h:43: TCONF: syscall(385) __NR_pkey_alloc not supported on your arch
mseal01.c:130: TINFO: Testing madvise() availability
mseal01.c:132: TPASS: sys_mseal(mem_addr + mem_offset, mem_alignment) passed
mseal01.c:70: TPASS: madvise(mem_addr, mem_size, MADV_DONTNEED) : EPERM (1)
mseal01.c:130: TINFO: Testing munmap() availability from child
mseal01.c:132: TPASS: sys_mseal(mem_addr + mem_offset, mem_alignment) passed
mseal01.c:75: TPASS: munmap(mem_addr, mem_size) : EPERM (1)
mseal01.c:130: TINFO: Testing mremap() address move/resize
mseal01.c:132: TPASS: sys_mseal(mem_addr + mem_offset, mem_alignment) passed
mseal01.c:88: TFAIL: mremap(mem_addr, mem_size, new_size, MREMAP_MAYMOVE | MREMAP_FIXED, new_addr) expected EPERM: EFAULT (14)
mseal01.c:130: TINFO: Testing mmap() protection change
mseal01.c:132: TPASS: sys_mseal(mem_addr + mem_offset, mem_alignment) passed
mseal01.c:98: TPASS: mmap(mem_addr, mem_size, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, -1, 0) : EPERM (1)
Summary:
passed 10
failed 1
broken 0
skipped 1
warnings 0
Works before/without the above commit.
LTP-Version:
20250530
Compiler:
gcc (GCC) 15.1.1 20250425 (Red Hat 15.1.1-1)
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Let me know if further details or a reproducer are needed.
Best regards,
Jan
^ permalink raw reply [flat|nested] 2+ messages in thread
* [REGRESSION] mremap() returns EFAULT instead of EPERM in LTP mseal01
2025-07-17 11:50 [REGRESSION] mremap() returns EFAULT instead of EPERM in LTP mseal01 Jan Polensky
@ 2025-07-22 11:58 ` Jan Polensky
0 siblings, 0 replies; 2+ messages in thread
From: Jan Polensky @ 2025-07-22 11:58 UTC (permalink / raw)
To: japo; +Cc: linux-mm
Message:
It seems this issue has already been analyzed and addressed independently in the following thread:
https://lore.kernel.org/oe-lkp/202507201002.69144b74-lkp@intel.com/
To avoid duplication, I’ll defer to that discussion. Thanks to everyone involved!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-22 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 11:50 [REGRESSION] mremap() returns EFAULT instead of EPERM in LTP mseal01 Jan Polensky
2025-07-22 11:58 ` Jan Polensky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).