Skip to content

Commit 84f4841

Browse files
committed
ARCv3: add architecrute PAGE_KERNEL* defs instead of generic
Add architecture specific versions of PAGE_KERNEL_EXEC and PAGE_KERNEL_RO definitions to provide correct set of PT flags. Without these explicit definitions default PAGE_KERNEL is used. After commit f32ebe7 ("ARC: Proper kernel mapping") PAGE_KERNEL definitions doesn't contain flag to permit code execution from page and it provides modules load issue. This patch fixes modules load issue. Fixes: f32ebe7 ("ARC: Proper kernel mapping") Signed-off-by: Pavel Kozlov <pavel.kozlov@synopsys.com>
1 parent 39fa9d7 commit 84f4841

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arc/include/asm/pgtable-bits-arcv3.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@
8686
#define PAGE_KERNEL_RW __pgprot(_PAGE_KERNEL)
8787
#define PAGE_KERNEL_RWX __pgprot(_PAGE_KERNEL & ~_PAGE_NOTEXEC_K)
8888

89+
/* Use arcitecture specific PAGE_KERNEL_* instead of generic fallbacks */
90+
#define PAGE_KERNEL_EXEC __pgprot(_PAGE_KERNEL & ~_PAGE_NOTEXEC_K)
91+
#define PAGE_KERNEL_RO __pgprot(_PAGE_KERNEL | _PAGE_AP_READONLY)
92+
8993
#define PAGE_KERNEL_BLK __pgprot(_PAGE_KERNEL & ~_PAGE_LINK)
9094
#define PAGE_KERNEL_BLK_RW __pgprot(_PAGE_KERNEL & ~_PAGE_LINK)
9195
#define PAGE_KERNEL_BLK_RWX __pgprot(_PAGE_KERNEL & ~_PAGE_NOTEXEC_K & ~_PAGE_LINK)

0 commit comments

Comments
 (0)