Skip to contentSkip to conversation

Bugs fix up for DEBUG_WX

PATCH In review Zong Li 2 participants 4 messages May 11, 2020

Subsystems (2)
lore
Share & tools
lore

Zong Li

author
#0 lore raw

cover Bugs fix up for DEBUG_WX

These patches fix some bugs of DEBUG_WX. The first one is removing the name of arm64 page talbe use. The second one is adding MMU dependency, otherwise, it causes build error on NOMMU system, which reported by kbuild test.

Zong Li (2):
mm: remove the specific name of arm64
mm: add MMU dependency for DEBUG_WX

 mm/Kconfig.debug | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Signature · 1 line
2.26.2
author
#1 lore raw

PATCH 1/2 mm: remove the specific name of arm64

UXN is the name of arm64 page-table descriptors.

CC Will Deacon <[email protected]>
---
 mm/Kconfig.debug | 2 --
 1 file changed, 2 deletions(-)
mm/Kconfig.debug +0 -2
index e19f94c6df90..b8cbe035247f 100644
@@ -130,8 +130,6 @@ config DEBUG_WX
 
 	  This is useful for discovering cases where the kernel is leaving W+X
 	  mappings after applying NX, as such mappings are a security risk.
-	  This check also includes UXN, which should be set on all kernel
-	  mappings.
 
 	  Look for a message in dmesg output like this:
 
Signature · 1 line
2.26.2
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] mm: remove the specific name of arm64

Quoted 13 lines · Zong Li

UXN is the name of arm64 page-table descriptors.

CC Will Deacon <[email protected]>
---
 mm/Kconfig.debug | 2 --
 1 file changed, 2 deletions(-)
mm/Kconfig.debug +0 -0
index e19f94c6df90..b8cbe035247f 100644

mm/Kconfig.debug config DEBUG_WX · line 134

Quoted 7 lines
mm/Kconfig.debug +0 -2
@@ -130,8 +130,6 @@ config DEBUG_WX
 
 	  This is useful for discovering cases where the kernel is leaving W+X
 	  mappings after applying NX, as such mappings are a security risk.
-	  This check also includes UXN, which should be set on all kernel
-	  mappings.
 
 	  Look for a message in dmesg output like this:

The commit message needs help, but I'm assuming Andrew will just fold this into the other patch so it doesn't matter.

Will

author
#3 lore raw

PATCH 2/2 mm: add MMU dependency for DEBUG_WX

In reply to Zong Li

DEBUG_WX should be enabled on MMU system. It had got build error when enabling DEBUG_WX on NOMMU.

---
 mm/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
mm/Kconfig.debug +1 -0
index b8cbe035247f..2409f7fc1567 100644
@@ -124,6 +124,7 @@ config ARCH_HAS_DEBUG_WX
 config DEBUG_WX
 	bool "Warn on W+X mappings at boot"
 	depends on ARCH_HAS_DEBUG_WX
+	depends on MMU
 	select PTDUMP_CORE
 	help
 	  Generate a warning if any W+X mappings are found at boot.
Signature · 1 line
2.26.2