diff mbox series

[2/2] powerpc/8xx: Honor execonly protection

Message ID 602dcac64428b91b1b11e0bb730e2455ff1fb688.1692375190.git.christophe.leroy@csgroup.eu (mailing list archive)
State Superseded
Headers show
Series [1/2] powerpc: Introduce PAGE_NONE_X to replace PAGE_EXECONLY | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 6 jobs.

Commit Message

Christophe Leroy Aug. 18, 2023, 4:13 p.m. UTC
On powerpc 8xx, exec does not imply read so
redefine PAGE_NONE_X as PAGE_NONE + X

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Russell Currey <ruscur@russell.cc>
Cc: Kees Cook <keescook@chromium.org>
---
 arch/powerpc/include/asm/nohash/32/pte-8xx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/powerpc/include/asm/nohash/32/pte-8xx.h b/arch/powerpc/include/asm/nohash/32/pte-8xx.h
index b234a93b05f1..f47d36d40a26 100644
--- a/arch/powerpc/include/asm/nohash/32/pte-8xx.h
+++ b/arch/powerpc/include/asm/nohash/32/pte-8xx.h
@@ -79,7 +79,7 @@ 
 
 /* Permission masks used to generate the __P and __S table */
 #define PAGE_NONE	__pgprot(_PAGE_BASE | _PAGE_NA)
-#define PAGE_NONE_X	__pgprot(_PAGE_BASE | _PAGE_RO | _PAGE_EXEC)
+#define PAGE_NONE_X	__pgprot(_PAGE_BASE | _PAGE_NA | _PAGE_EXEC)
 #define PAGE_SHARED	__pgprot(_PAGE_BASE)
 #define PAGE_SHARED_X	__pgprot(_PAGE_BASE | _PAGE_EXEC)
 #define PAGE_COPY	__pgprot(_PAGE_BASE | _PAGE_RO)