Skip to contentSkip to conversation

riscv-support-debug_wx.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jun 4, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: riscv: support DEBUG_WX
has been removed from the -mm tree. Its filename was
riscv-support-debug_wx.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Zong Li <[email protected]>
Subject: riscv: support DEBUG_WX

Support DEBUG_WX to check whether there are mapping with write and execute permission at the same time.

---

 arch/riscv/Kconfig              |    1 +
 arch/riscv/include/asm/ptdump.h |   11 +++++++++++
 arch/riscv/mm/init.c            |    3 +++
 3 files changed, 15 insertions(+)
arch/riscv/include/asm/ptdump.h renamed from arch/riscv/include/asm/ptdump.h~riscv-support-debug_wx +11 -0
@@ -8,4 +8,15 @@
 
 void ptdump_check_wx(void);
 
+#ifdef CONFIG_DEBUG_WX
+static inline void debug_checkwx(void)
+{
+	ptdump_check_wx();
+}
+#else
+static inline void debug_checkwx(void)
+{
+}
+#endif
+
 #endif /* _ASM_RISCV_PTDUMP_H */
arch/riscv/Kconfig renamed from arch/riscv/Kconfig~riscv-support-debug_wx +1 -0
@@ -16,6 +16,7 @@ config RISCV
 	select OF_EARLY_FLATTREE
 	select OF_IRQ
 	select ARCH_HAS_BINFMT_FLAT
+	select ARCH_HAS_DEBUG_WX
 	select ARCH_WANT_FRAME_POINTERS
 	select CLONE_BACKWARDS
 	select COMMON_CLK
arch/riscv/mm/init.c renamed from arch/riscv/mm/init.c~riscv-support-debug_wx +3 -0
@@ -19,6 +19,7 @@
 #include <asm/sections.h>
 #include <asm/pgtable.h>
 #include <asm/io.h>
+#include <asm/ptdump.h>
 
 #include "../kernel/head.h"
 
@@ -514,6 +515,8 @@ void mark_rodata_ro(void)
 	set_memory_ro(rodata_start, (data_start - rodata_start) >> PAGE_SHIFT);
 	set_memory_nx(rodata_start, (data_start - rodata_start) >> PAGE_SHIFT);
 	set_memory_nx(data_start, (max_low - data_start) >> PAGE_SHIFT);
+
+	debug_checkwx();
 }
 #endif
 

_

Patches currently in -mm which might be from [email protected] are