diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig.debug | 7 | ||||
-rw-r--r-- | arch/x86/mm/pat.c | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index ae36bfa814e5..f0cf5d990794 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug | |||
@@ -5,10 +5,11 @@ config TRACE_IRQFLAGS_SUPPORT | |||
5 | 5 | ||
6 | source "lib/Kconfig.debug" | 6 | source "lib/Kconfig.debug" |
7 | 7 | ||
8 | config NONPROMISC_DEVMEM | 8 | config PROMISC_DEVMEM |
9 | bool "Filter access to /dev/mem" | 9 | bool "Allow unlimited access to /dev/mem" |
10 | default y | ||
10 | help | 11 | help |
11 | If this option is left off, you allow userspace access to all | 12 | If this option is left on, you allow userspace (root) access to all |
12 | of memory, including kernel and userspace memory. Accidental | 13 | of memory, including kernel and userspace memory. Accidental |
13 | access to this is obviously disastrous, but specific access can | 14 | access to this is obviously disastrous, but specific access can |
14 | be used by people debugging the kernel. | 15 | be used by people debugging the kernel. |
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index d4585077977a..c34dc483839c 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
@@ -373,8 +373,8 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | |||
373 | return vma_prot; | 373 | return vma_prot; |
374 | } | 374 | } |
375 | 375 | ||
376 | #ifdef CONFIG_NONPROMISC_DEVMEM | 376 | #ifndef CONFIG_PROMISC_DEVMEM |
377 | /* This check is done in drivers/char/mem.c in case of NONPROMISC_DEVMEM*/ | 377 | /* This check is done in drivers/char/mem.c in case of !PROMISC_DEVMEM*/ |
378 | static inline int range_is_allowed(unsigned long pfn, unsigned long size) | 378 | static inline int range_is_allowed(unsigned long pfn, unsigned long size) |
379 | { | 379 | { |
380 | return 1; | 380 | return 1; |
@@ -398,7 +398,7 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size) | |||
398 | } | 398 | } |
399 | return 1; | 399 | return 1; |
400 | } | 400 | } |
401 | #endif /* CONFIG_NONPROMISC_DEVMEM */ | 401 | #endif /* CONFIG_PROMISC_DEVMEM */ |
402 | 402 | ||
403 | int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, | 403 | int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, |
404 | unsigned long size, pgprot_t *vma_prot) | 404 | unsigned long size, pgprot_t *vma_prot) |