Skip to contentSkip to conversation

arm-ptdump-rename-config_debug_wx-to-config_arm_debug_wx.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Feb 22, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: arm: ptdump: rename CONFIG_DEBUG_WX to CONFIG_ARM_DEBUG_WX
has been removed from the -mm tree. Its filename was
arm-ptdump-rename-config_debug_wx-to-config_arm_debug_wx.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Christophe Leroy <[email protected]>
Subject: arm: ptdump: rename CONFIG_DEBUG_WX to CONFIG_ARM_DEBUG_WX
Date: Tue, 30 Jan 2024 11:34:32 +0100

Patch series "mm: ptdump: Refactor CONFIG_DEBUG_WX and check_wx_pages debugfs attribute", v2.

This series refactors CONFIG_DEBUG_WX for the 5 architectures implementing CONFIG_GENERIC_PTDUMP

First rename stuff in ARM which uses similar names while not implementing CONFIG_GENERIC_PTDUMP.

Then define a generic version of debug_checkwx() that calls ptdump_check_wx() when CONFIG_DEBUG_WX is set. Call it immediately after calling mark_rodata_ro() instead of calling it at the end of every mark_rodata_ro().

Then implement a debugfs attribute that can be used to trigger a W^X test at anytime and regardless of CONFIG_DEBUG_WX

This patch (of 5):

CONFIG_DEBUG_WX is a core option defined in mm/Kconfig.debug

To avoid any future conflict, rename ARM version into CONFIG_ARM_DEBUG_WX.

Cc Albert Ou <[email protected]>
Cc Alexander Gordeev <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc "Aneesh Kumar K.V (IBM)" <[email protected]>
Cc Borislav Petkov (AMD) <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Gerald Schaefer <[email protected]>
Cc Greg KH <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Kees Cook <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc "Naveen N. Rao" <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Phong Tran <[email protected]>
Cc Russell King <[email protected]>
Cc Steven Price <[email protected]>
Cc Sven Schnelle <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Will Deacon <[email protected]>
Cc Alexandre Ghiti <[email protected]>

---

 arch/arm/Kconfig.debug               |    2 +-
 arch/arm/configs/aspeed_g4_defconfig |    2 +-
 arch/arm/configs/aspeed_g5_defconfig |    2 +-
 arch/arm/include/asm/ptdump.h        |    6 +++---
 arch/arm/mm/init.c                   |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/configs/aspeed_g4_defconfig renamed from arch/arm/configs/aspeed_g4_defconfig~arm-ptdump-rename-config_debug_wx-to-config_arm_debug_wx +1 -1
@@ -252,7 +252,7 @@ CONFIG_DEBUG_INFO_REDUCED=y
 CONFIG_GDB_SCRIPTS=y
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_DEBUG_FS=y
-CONFIG_DEBUG_WX=y
+CONFIG_ARM_DEBUG_WX=y
 CONFIG_SCHED_STACK_END_CHECK=y
 CONFIG_PANIC_ON_OOPS=y
 CONFIG_PANIC_TIMEOUT=-1
arch/arm/configs/aspeed_g5_defconfig renamed from arch/arm/configs/aspeed_g5_defconfig~arm-ptdump-rename-config_debug_wx-to-config_arm_debug_wx +1 -1
@@ -302,7 +302,7 @@ CONFIG_DEBUG_INFO_REDUCED=y
 CONFIG_GDB_SCRIPTS=y
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_DEBUG_FS=y
-CONFIG_DEBUG_WX=y
+CONFIG_ARM_DEBUG_WX=y
 CONFIG_SCHED_STACK_END_CHECK=y
 CONFIG_PANIC_ON_OOPS=y
 CONFIG_PANIC_TIMEOUT=-1
arch/arm/include/asm/ptdump.h renamed from arch/arm/include/asm/ptdump.h~arm-ptdump-rename-config_debug_wx-to-config_arm_debug_wx +3 -3
@@ -32,10 +32,10 @@ void ptdump_check_wx(void);
 
 #endif /* CONFIG_ARM_PTDUMP_CORE */
 
-#ifdef CONFIG_DEBUG_WX
-#define debug_checkwx() ptdump_check_wx()
+#ifdef CONFIG_ARM_DEBUG_WX
+#define arm_debug_checkwx() ptdump_check_wx()
 #else
-#define debug_checkwx() do { } while (0)
+#define arm_debug_checkwx() do { } while (0)
 #endif
 
 #endif /* __ASM_PTDUMP_H */
arch/arm/Kconfig.debug renamed from arch/arm/Kconfig.debug~arm-ptdump-rename-config_debug_wx-to-config_arm_debug_wx +1 -1
@@ -17,7 +17,7 @@ config ARM_PTDUMP_DEBUGFS
 	  kernel.
 	  If in doubt, say "N"
 
-config DEBUG_WX
+config ARM_DEBUG_WX
 	bool "Warn on W+X mappings at boot"
 	depends on MMU
 	select ARM_PTDUMP_CORE
arch/arm/mm/init.c renamed from arch/arm/mm/init.c~arm-ptdump-rename-config_debug_wx-to-config_arm_debug_wx +1 -1
@@ -458,7 +458,7 @@ static int __mark_rodata_ro(void *unused
 void mark_rodata_ro(void)
 {
 	stop_machine(__mark_rodata_ro, NULL, NULL);
-	debug_checkwx();
+	arm_debug_checkwx();
 }
 
 #else

_

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