[PATCH] selftests/mm: Fix mseal's length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux