diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-01-10 16:53:55 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-01-10 16:53:55 +0100 |
commit | 8b63b6bfc1a551acf154061699028c7032d7890c (patch) | |
tree | 16882e9bc9e35eacb870a6d8a71617e579c4ffdc /lib/Kconfig.debug | |
parent | libnvdimm: fix namespace object confusion in is_uuid_busy() (diff) | |
parent | block: kill disk_{check|set|clear|alloc}_badblocks (diff) | |
download | linux-8b63b6bfc1a551acf154061699028c7032d7890c.tar.xz linux-8b63b6bfc1a551acf154061699028c7032d7890c.zip |
Merge branch 'for-4.5/block-dax' into for-4.5/libnvdimm
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r-- | lib/Kconfig.debug | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 8c15b29d5adc..073496dea848 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1853,3 +1853,42 @@ 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, and IO_STRICT_DEVMEM=n, 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. + +config IO_STRICT_DEVMEM + bool "Filter I/O access to /dev/mem" + depends on STRICT_DEVMEM + default STRICT_DEVMEM + ---help--- + If this option is disabled, you allow userspace (root) access to all + io-memory regardless of whether a driver is actively using that + range. Accidental access to this is obviously disastrous, but + specific access can be used by people debugging kernel drivers. + + If this option is switched on, the /dev/mem file only allows + userspace access to *idle* io-memory ranges (see /proc/iomem) This + may break traditional users of /dev/mem (dosemu, legacy X, etc...) + if the driver using a given range cannot be disabled. + + If in doubt, say Y. |