[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <vc4czyuemmu3kylqb4ctaga6y5yvondlyabimx6jvljlw2fkea@djawlllf45xa>
Date: Thu, 22 Aug 2024 00:37:36 +0100
From: Pedro Falcato <pedro.falcato@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>, Vlastimil Babka <vbabka@...e.cz>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Shuah Khan <shuah@...nel.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, jeffxu@...omium.org, oliver.sang@...el.com,
torvalds@...ux-foundation.org, Michael Ellerman <mpe@...erman.id.au>,
Kees Cook <kees@...nel.org>
Subject: Re: [PATCH v3 7/7] selftests/mm: add more mseal traversal tests
Andrew, please squash this small patch with this one. It directly addresses
a problem found in review.
(I was told this is the preferred way to send small fixups, and I don't
think anyone wants a v4 over this trivial issue)
Thank you!
----8<----
>From 614e5dc27073c39579c863ebdff4396948e28e03 Mon Sep 17 00:00:00 2001
From: Pedro Falcato <pedro.falcato@...il.com>
Date: Thu, 22 Aug 2024 00:20:19 +0100
Subject: [PATCH] selftests/mm: Fix mseal's length
We accidentally msealed too much, which could overrun and try to mseal
other regions. This seems to be harmless (at least on top-down
architectures) due to various reasons all aligning, but may very well
cause spurious test failures to e.g bottom-up mmap architectures.
Signed-off-by: Pedro Falcato <pedro.falcato@...il.com>
---
tools/testing/selftests/mm/mseal_test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c
index 0d4d40fb0f88..0c41513219ae 100644
--- a/tools/testing/selftests/mm/mseal_test.c
+++ b/tools/testing/selftests/mm/mseal_test.c
@@ -783,7 +783,7 @@ static void test_seal_mprotect_partial_mprotect_tail(bool seal)
FAIL_TEST_IF_FALSE(ptr != (void *)-1);
if (seal) {
- ret = sys_mseal(ptr + page_size, size);
+ ret = sys_mseal(ptr + page_size, page_size);
FAIL_TEST_IF_FALSE(!ret);
}
@@ -1036,7 +1036,7 @@ static void test_seal_munmap_partial_across_vmas(bool seal)
FAIL_TEST_IF_FALSE(ptr != (void *)-1);
if (seal) {
- ret = sys_mseal(ptr + page_size, size);
+ ret = sys_mseal(ptr + page_size, page_size);
FAIL_TEST_IF_FALSE(!ret);
}
--
2.46.0
Powered by blists - more mailing lists