From 527701eda5f196588df9b36a30651804fea7d1a7 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Thu, 9 Jul 2020 11:43:21 -0700 Subject: lib: Add a generic version of devmem_is_allowed() As part of adding support for STRICT_DEVMEM to the RISC-V port, Zong provided a devmem_is_allowed() implementation that's exactly the same as all the others I checked. Instead I'm adding a generic version, which will soon be used. Reviewed-by: Luis Chamberlain Signed-off-by: Palmer Dabbelt --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Kconfig.debug') diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 0c781f912f9f..87410f62b501 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1626,7 +1626,7 @@ config ARCH_HAS_DEVMEM_IS_ALLOWED config STRICT_DEVMEM bool "Filter access to /dev/mem" depends on MMU && DEVMEM - depends on ARCH_HAS_DEVMEM_IS_ALLOWED + depends on ARCH_HAS_DEVMEM_IS_ALLOWED || GENERIC_LIB_DEVMEM_IS_ALLOWED default y if PPC || X86 || ARM64 help If this option is disabled, you allow userspace (root) access to all -- cgit v1.2.3