Skip to contentSkip to conversation

riscv: enable STRICT_DEVMEM by default

PATCH Superseded Christoph Hellwig 4 participants 5 messages Feb 22, 2018 – Feb 26, 2018

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: enable STRICT_DEVMEM by default

No need to enable /dev/mem access on a new port.

---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Kconfig.debug +1 -1
index 6088408ef26c..0c6c2aafe93a 100644
@@ -1968,7 +1968,7 @@ config STRICT_DEVMEM
 	bool "Filter access to /dev/mem"
 	depends on MMU && DEVMEM
 	depends on ARCH_HAS_DEVMEM_IS_ALLOWED
-	default y if TILE || PPC || X86 || ARM64
+	default y if TILE || PPC || X86 || ARM64 | RISCV
 	---help---
 	  If this option is disabled, you allow userspace (root) access to all
 	  of memory, including kernel and userspace memory. Accidental
Signature · 1 line
2.14.2
#1 lore raw

PATCH 1/1 riscv: enable STRICT_DEVMEM by default

Quoted 12 lines · Christoph Hellwig

No need to enable /dev/mem access on a new port.

---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Kconfig.debug +0 -0
index 6088408ef26c..0c6c2aafe93a 100644

lib/Kconfig.debug config STRICT_DEVMEM · line 1971

Quoted 5 lines
lib/Kconfig.debug +1 -1
@@ -1968,7 +1968,7 @@ config STRICT_DEVMEM
 	bool "Filter access to /dev/mem"
 	depends on MMU && DEVMEM
 	depends on ARCH_HAS_DEVMEM_IS_ALLOWED
-	default y if TILE || PPC || X86 || ARM64
+	default y if TILE || PPC || X86 || ARM64 | RISCV
                                                 ^

Did you perhaps intend "||" instead of "|"? With that change applied:

#2 lore raw

PATCH 1/1 riscv: enable STRICT_DEVMEM by default

Quoted 19 lines · Bart Van Assche
Quoted 12 lines · Christoph Hellwig

No need to enable /dev/mem access on a new port.

---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Kconfig.debug +0 -0
index 6088408ef26c..0c6c2aafe93a 100644

lib/Kconfig.debug config STRICT_DEVMEM · line 1971

Quoted 5 lines
lib/Kconfig.debug +1 -1
@@ -1968,7 +1968,7 @@ config STRICT_DEVMEM
 	bool "Filter access to /dev/mem"
 	depends on MMU && DEVMEM
 	depends on ARCH_HAS_DEVMEM_IS_ALLOWED
-	default y if TILE || PPC || X86 || ARM64
+	default y if TILE || PPC || X86 || ARM64 | RISCV
                                                 ^
Quoted 3 lines

Did you perhaps intend "||" instead of "|"? With that change applied:

Oops, yes.

#3 lore raw

PATCH 1/1 riscv: enable STRICT_DEVMEM by default

Quoted 22 lines · Christoph Hellwig
Quoted 21 lines · Bart Van Assche
Quoted 12 lines · Christoph Hellwig

No need to enable /dev/mem access on a new port.

---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Kconfig.debug +0 -0
index 6088408ef26c..0c6c2aafe93a 100644

lib/Kconfig.debug config STRICT_DEVMEM · line 1971

Quoted 5 lines
lib/Kconfig.debug +1 -1
@@ -1968,7 +1968,7 @@ config STRICT_DEVMEM
 	bool "Filter access to /dev/mem"
 	depends on MMU && DEVMEM
 	depends on ARCH_HAS_DEVMEM_IS_ALLOWED
-	default y if TILE || PPC || X86 || ARM64
+	default y if TILE || PPC || X86 || ARM64 | RISCV
                                                 ^

Did you perhaps intend "||" instead of "|"? With that change applied:

Quoted 3 lines
Quoted 1 line

Oops, yes.

Thanks.

#4 lore raw

PATCH 1/1 riscv: enable STRICT_DEVMEM by default

In reply to Christoph Hellwig
Quoted 12 lines · Christoph Hellwig

No need to enable /dev/mem access on a new port.

---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Kconfig.debug +0 -0
index 6088408ef26c..0c6c2aafe93a 100644

lib/Kconfig.debug config STRICT_DEVMEM · line 1974

Quoted 8 lines
lib/Kconfig.debug +1 -1
@@ -1968,7 +1968,7 @@ config STRICT_DEVMEM
 	bool "Filter access to /dev/mem"
 	depends on MMU && DEVMEM
 	depends on ARCH_HAS_DEVMEM_IS_ALLOWED
-	default y if TILE || PPC || X86 || ARM64
+	default y if TILE || PPC || X86 || ARM64 | RISCV
 	---help---
 	  If this option is disabled, you allow userspace (root) access to all
 	  of memory, including kernel and userspace memory. Accidental

Looks good to me. I'm queueing this into for-next, as hopefully we won't have any changes remaining for 4.16.