summaryrefslogtreecommitdiff
path: root/arch/arm/Kconfig.debug
diff options
context:
space:
mode:
authorNicolas Pitre <nico@fluxnic.net>2010-09-22 18:34:36 -0400
committerNicolas Pitre <nicolas.pitre@linaro.org>2010-10-01 22:31:34 -0400
commit087aaffcdf9c91667c93923fbc05fa8fb6bc7d3a (patch)
treeec94d9fd07baa4802ff0a3a2811ef3c3e1c7f3f3 /arch/arm/Kconfig.debug
parent7c63984b86f96c71c541132c74c4b56fe2a13e1a (diff)
ARM: implement CONFIG_STRICT_DEVMEM by disabling access to RAM via /dev/mem
There are very few legitimate use cases, if any, for directly accessing system RAM through /dev/mem. So let's mimic what they do on x86 and forbid it when CONFIG_STRICT_DEVMEM is turned on. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/Kconfig.debug')
-rw-r--r--arch/arm/Kconfig.debug14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 91344af75f39..c29fb382aeee 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -2,6 +2,20 @@ menu "Kernel hacking"
source "lib/Kconfig.debug"
+config STRICT_DEVMEM
+ bool "Filter access to /dev/mem"
+ depends on MMU
+ ---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.
+
+ If this option is switched on, the /dev/mem file only allows
+ userspace access to memory mapped peripherals.
+
+ If in doubt, say Y.
+
# RMK wants arm kernels compiled with frame pointers or stack unwinding.
# If you know what you are doing and are willing to live without stack
# traces, you can get a slightly smaller kernel by setting this option to