Problem with module_init?

Sean MacLennan smaclennan at pikatech.com
Thu Apr 2 15:08:03 EST 2009


On Thu, 02 Apr 2009 09:24:43 +1100
"Benjamin Herrenschmidt" <benh at kernel.crashing.org> wrote:

> I suspect I just screwed up the definition of PAGE_KERNEL_EXEC or
> something like that.

Yup, that is exactly what you did ;) You left out _PAGE_HWEXEC. The
following patch fixes the problem for me.

Cheers,
   Sean

diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h
index d9740e8..a84f248 100644
--- a/arch/powerpc/include/asm/pte-common.h
+++ b/arch/powerpc/include/asm/pte-common.h
@@ -167,7 +167,8 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
 #endif
 
 /* Make modules code happy. We don't set RO yet */
-#define PAGE_KERNEL_EXEC	PAGE_KERNEL_X
+// #define PAGE_KERNEL_EXEC	PAGE_KERNEL_X
+#define PAGE_KERNEL_EXEC __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW | _PAGE_EXEC | _PAGE_HWEXEC)
 
 /* Advertise special mapping type for AGP */
 #define PAGE_AGP		(PAGE_KERNEL_NC)



More information about the Linuxppc-dev mailing list