OSDN Git Service

arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug
[uclinux-h8/linux.git] / lib / Kconfig.debug
index 8c15b29..289dfcb 100644 (file)
@@ -1853,3 +1853,25 @@ source "samples/Kconfig"
 
 source "lib/Kconfig.kgdb"
 
+config ARCH_HAS_DEVMEM_IS_ALLOWED
+       bool
+
+config STRICT_DEVMEM
+       bool "Filter access to /dev/mem"
+       depends on MMU
+       depends on ARCH_HAS_DEVMEM_IS_ALLOWED
+       default y if TILE || PPC
+       ---help---
+         If this option is disabled, you allow userspace (root) access to all
+         of memory, including kernel and userspace memory. Accidental
+         access to this is obviously disastrous, but specific access can
+         be used by people debugging the kernel. Note that with PAT support
+         enabled, even in this case there are restrictions on /dev/mem
+         use due to the cache aliasing requirements.
+
+         If this option is switched on, the /dev/mem file only allows
+         userspace access to PCI space and the BIOS code and data regions.
+         This is sufficient for dosemu and X and all common users of
+         /dev/mem.
+
+         If in doubt, say Y.