[PATCH v2 6/7] lib/Kconfig.debug: default STRICT_DEVMEM to "y" on s390

David Hildenbrand posted 7 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v2 6/7] lib/Kconfig.debug: default STRICT_DEVMEM to "y" on s390
Posted by David Hildenbrand 1 month, 1 week ago
virtio-mem currently depends on !DEVMEM | STRICT_DEVMEM. Let's default
STRICT_DEVMEM to "y" just like we do for arm64 and x86.

There could be ways in the future to filter access to virtio-mem device
memory even without STRICT_DEVMEM, but for now let's just keep it
simple.

Tested-by: Mario Casquero <mcasquer@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 7315f643817a..e7a917540e2a 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1905,7 +1905,7 @@ config STRICT_DEVMEM
 	bool "Filter access to /dev/mem"
 	depends on MMU && DEVMEM
 	depends on ARCH_HAS_DEVMEM_IS_ALLOWED || GENERIC_LIB_DEVMEM_IS_ALLOWED
-	default y if PPC || X86 || ARM64
+	default y if PPC || X86 || ARM64 || S390
 	help
 	  If this option is disabled, you allow userspace (root) access to all
 	  of memory, including kernel and userspace memory. Accidental
-- 
2.46.1
Re: [PATCH v2 6/7] lib/Kconfig.debug: default STRICT_DEVMEM to "y" on s390
Posted by Heiko Carstens 1 month, 1 week ago
On Mon, Oct 14, 2024 at 04:46:18PM +0200, David Hildenbrand wrote:
> virtio-mem currently depends on !DEVMEM | STRICT_DEVMEM. Let's default
> STRICT_DEVMEM to "y" just like we do for arm64 and x86.
> 
> There could be ways in the future to filter access to virtio-mem device
> memory even without STRICT_DEVMEM, but for now let's just keep it
> simple.
> 
> Tested-by: Mario Casquero <mcasquer@redhat.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  lib/Kconfig.debug | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Heiko Carstens <hca@linux.ibm.com>