[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241209095019.1732120-15-kevin.brodsky@arm.com>
Date: Mon, 9 Dec 2024 09:50:19 +0000
From: Kevin Brodsky <kevin.brodsky@....com>
To: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org,
Kevin Brodsky <kevin.brodsky@....com>,
akpm@...ux-foundation.org,
aruna.ramakrishna@...cle.com,
catalin.marinas@....com,
dave.hansen@...ux.intel.com,
joey.gouly@....com,
keith.lucas@...cle.com,
ryan.roberts@....com,
shuah@...nel.org,
linux-arm-kernel@...ts.infradead.org,
linux-kselftest@...r.kernel.org,
x86@...nel.org
Subject: [PATCH 14/14] selftests/mm: Remove X permission from sigaltstack mapping
There is no reason why the alternate signal stack should be mapped
as RWX. Map it as RW instead.
Signed-off-by: Kevin Brodsky <kevin.brodsky@....com>
---
tools/testing/selftests/mm/pkey_sighandler_tests.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/mm/pkey_sighandler_tests.c b/tools/testing/selftests/mm/pkey_sighandler_tests.c
index 449ec5acec75..17bbfcd552c6 100644
--- a/tools/testing/selftests/mm/pkey_sighandler_tests.c
+++ b/tools/testing/selftests/mm/pkey_sighandler_tests.c
@@ -315,7 +315,7 @@ static void test_sigsegv_handler_with_different_pkey_for_stack(void)
sys_mprotect_pkey(stack, STACK_SIZE, PROT_READ | PROT_WRITE, pkey);
/* Set up alternate signal stack that will use the default MPK */
- sigstack.ss_sp = mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
+ sigstack.ss_sp = mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
sigstack.ss_flags = 0;
sigstack.ss_size = STACK_SIZE;
@@ -488,7 +488,7 @@ static void test_pkru_sigreturn(void)
sys_mprotect_pkey(stack, STACK_SIZE, PROT_READ | PROT_WRITE, pkey);
/* Set up alternate signal stack that will use the default MPK */
- sigstack.ss_sp = mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
+ sigstack.ss_sp = mmap(0, STACK_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
sigstack.ss_flags = 0;
sigstack.ss_size = STACK_SIZE;
--
2.47.0
Powered by blists - more mailing lists