Skip to contentSkip to conversation

Let CONFIG_STRICT_DEVMEM depends on CONFIG_DEVMEM

PATCH Applied Dave Young 2 participants 3 messages Oct 6, 2016 – Oct 7, 2016 Library code

lore
Share & tools
lore

Dave Young

author
#0 lore raw

PATCH 1/1 Let CONFIG_STRICT_DEVMEM depends on CONFIG_DEVMEM

With CONFIG_DEVMEM not set, CONFIG_STRICT_DEVMEM will be useless even if it is set =y, thus let's update the dependency in Kconfig.

---
 lib/Kconfig.debug |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Kconfig.debug +1 -1
@@ -1980,7 +1980,7 @@ config ARCH_HAS_DEVMEM_IS_ALLOWED
 
 config STRICT_DEVMEM
 	bool "Filter access to /dev/mem"
-	depends on MMU
+	depends on MMU && DEVMEM
 	depends on ARCH_HAS_DEVMEM_IS_ALLOWED
 	default y if TILE || PPC
 	---help---
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Dave Young

With CONFIG_DEVMEM not set, CONFIG_STRICT_DEVMEM will be useless even if it is set =y, thus let's update the dependency in Kconfig.

Quoted 7 lines
---
 lib/Kconfig.debug |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

lib/Kconfig.debug config ARCH_HAS_DEVMEM_IS_ALLOWED · line 1986

Quoted 8 lines
lib/Kconfig.debug +1 -1
@@ -1980,7 +1980,7 @@ config ARCH_HAS_DEVMEM_IS_ALLOWED
 
 config STRICT_DEVMEM
        bool "Filter access to /dev/mem"
-       depends on MMU
+       depends on MMU && DEVMEM
        depends on ARCH_HAS_DEVMEM_IS_ALLOWED
        default y if TILE || PPC
        ---help---

While we're at it, can we make DEVKMEM default=n? The help text even suggests making it "n".

-Kees

Signature · 2 lines
Kees Cook
Nexus Security
author
#2 lore raw
Quoted 16 lines · Kees Cook
Quoted 4 lines · Dave Young

With CONFIG_DEVMEM not set, CONFIG_STRICT_DEVMEM will be useless even if it is set =y, thus let's update the dependency in Kconfig.

Quoted 8 lines
---
 lib/Kconfig.debug |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Kconfig.debug +0 -0
@@ -1980,7 +1980,7 @@ config ARCH_HAS_DEVMEM_IS_ALLOWED
 
Quoted 10 lines

lib/Kconfig.debug config ARCH_HAS_DEVMEM_IS_ALLOWED · line 1986

Quoted 7 lines
lib/Kconfig.debug +1 -1
 config STRICT_DEVMEM
        bool "Filter access to /dev/mem"
-       depends on MMU
+       depends on MMU && DEVMEM
        depends on ARCH_HAS_DEVMEM_IS_ALLOWED
        default y if TILE || PPC
        ---help---

While we're at it, can we make DEVKMEM default=n? The help text even suggests making it "n".

It's fine to me, will send another patch for that.

Thanks
Dave

Quoted 6 lines

-Kees

Signature · 2 lines
Kees Cook
Nexus Security