diff options
author | Pavel Machek <pavel@ucw.cz> | 2014-12-28 11:15:24 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-02-18 20:09:49 -0500 |
commit | 1f40a8bfa91adfa8d1ac5013c08c76f6fd6691ad (patch) | |
tree | 6f7d30d99e00a02626e496a5006f9af2f0b163fb /arch/x86/mm/pat.c | |
parent | 1db491f77b6ed0f32f1d4a3ac40a5be9524f1914 (diff) |
x86/mm/pat: Ensure different messages in STRICT_DEVMEM and PAT cases
STRICT_DEVMEM and PAT produce same failure accessing /dev/mem,
which is quite confusing to the user. Make printk messages
different to lessen confusion.
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/mm/pat.c')
-rw-r--r-- | arch/x86/mm/pat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 7ac68698406c..35af6771a95a 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
@@ -610,7 +610,7 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | |||
610 | } | 610 | } |
611 | 611 | ||
612 | #ifdef CONFIG_STRICT_DEVMEM | 612 | #ifdef CONFIG_STRICT_DEVMEM |
613 | /* This check is done in drivers/char/mem.c in case of STRICT_DEVMEM*/ | 613 | /* This check is done in drivers/char/mem.c in case of STRICT_DEVMEM */ |
614 | static inline int range_is_allowed(unsigned long pfn, unsigned long size) | 614 | static inline int range_is_allowed(unsigned long pfn, unsigned long size) |
615 | { | 615 | { |
616 | return 1; | 616 | return 1; |
@@ -628,8 +628,8 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size) | |||
628 | 628 | ||
629 | while (cursor < to) { | 629 | while (cursor < to) { |
630 | if (!devmem_is_allowed(pfn)) { | 630 | if (!devmem_is_allowed(pfn)) { |
631 | printk(KERN_INFO "Program %s tried to access /dev/mem between [mem %#010Lx-%#010Lx]\n", | 631 | printk(KERN_INFO "Program %s tried to access /dev/mem between [mem %#010Lx-%#010Lx], PAT prevents it\n", |
632 | current->comm, from, to - 1); | 632 | current->comm, from, to - 1); |
633 | return 0; | 633 | return 0; |
634 | } | 634 | } |
635 | cursor += PAGE_SIZE; | 635 | cursor += PAGE_SIZE; |