浏览代码

powerpc: Don't write protect kernel text with CONFIG_DYNAMIC_FTRACE enabled

This problem was noticed on an MPC855T platform. Ftrace did oops
when trying to write to the kernel text segment.

Many thanks to Joakim for finding the root cause of this problem.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stefan Roese 14 年之前
父节点
当前提交
09597cfe93
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/powerpc/include/asm/pte-common.h

+ 1 - 1
arch/powerpc/include/asm/pte-common.h

@@ -162,7 +162,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
  * on platforms where such control is possible.
  * on platforms where such control is possible.
  */
  */
 #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
 #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
-	defined(CONFIG_KPROBES)
+	defined(CONFIG_KPROBES) || defined(CONFIG_DYNAMIC_FTRACE)
 #define PAGE_KERNEL_TEXT	PAGE_KERNEL_X
 #define PAGE_KERNEL_TEXT	PAGE_KERNEL_X
 #else
 #else
 #define PAGE_KERNEL_TEXT	PAGE_KERNEL_ROX
 #define PAGE_KERNEL_TEXT	PAGE_KERNEL_ROX