On Mon, 2009-03-02 at 18:38 +1100, Michael Ellerman wrote:
On Mon, 2009-03-02 at 17:22 +1100, Benjamin Herrenschmidt wrote:
quoted
Now that they are almost identical, we can merge some of the definitions
related to the PTE format into common files.
<snip>
quoted
+/* Protection used for kernel text. We want the debuggers to be able to
+ * set breakpoints anywhere, so don't write protect the kernel text
+ * on platforms where such control is possible.
+ */
+#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
+ defined(CONFIG_KPROBES)
+#define PAGE_KERNEL_TEXT PAGE_KERNEL_X
+#else
+#define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX
+#endif
What about FTRACE? ∞TRACE etc.
Well, I'm just moving those bits around from pgtable-ppc32.h (ie, only
ppc32 uses PAGE_KERNEL_TEXT for now anyway).
Note also that as it is, with ppc32 hash, we don't honor the read-only
restriction on the BAT mapping anyway.
So yes, there's room for fixing things but that isn't what this patch
does.
Cheers,
Ben.