diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-25 20:37:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-25 20:37:33 -0400 |
commit | 2f7c3a18a2dc79ddf7b83ae199b099a675e1adb2 (patch) | |
tree | c43795eb48dc102b25ef2bfd78dfc075ff93feaa /arch/x86/mm | |
parent | f89eae4ee7e075e576bd4b4d2db901023421a3be (diff) | |
parent | dc4fac84f8e66b147921ebdc385e767d5def7422 (diff) |
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
"Misc fixes: EFI, entry code, pkeys and MPX fixes, TASK_SIZE cleanups
and a tsc frequency table fix"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Switch from TASK_SIZE to TASK_SIZE_MAX in the page fault code
x86/fsgsbase/64: Use TASK_SIZE_MAX for FSBASE/GSBASE upper limits
x86/mm/mpx: Work around MPX erratum SKD046
x86/entry/64: Fix stack return address retrieval in thunk
x86/efi: Fix 7-parameter efi_call()s
x86/cpufeature, x86/mm/pkeys: Fix broken compile-time disabling of pkeys
x86/tsc: Add missing Cherrytrail frequency to the table
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/fault.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 5ce1ed02f7e8..7d1fa7cd2374 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -292,7 +292,7 @@ void vmalloc_sync_all(void) | |||
292 | return; | 292 | return; |
293 | 293 | ||
294 | for (address = VMALLOC_START & PMD_MASK; | 294 | for (address = VMALLOC_START & PMD_MASK; |
295 | address >= TASK_SIZE && address < FIXADDR_TOP; | 295 | address >= TASK_SIZE_MAX && address < FIXADDR_TOP; |
296 | address += PMD_SIZE) { | 296 | address += PMD_SIZE) { |
297 | struct page *page; | 297 | struct page *page; |
298 | 298 | ||
@@ -854,8 +854,13 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code, | |||
854 | return; | 854 | return; |
855 | } | 855 | } |
856 | #endif | 856 | #endif |
857 | /* Kernel addresses are always protection faults: */ | 857 | |
858 | if (address >= TASK_SIZE) | 858 | /* |
859 | * To avoid leaking information about the kernel page table | ||
860 | * layout, pretend that user-mode accesses to kernel addresses | ||
861 | * are always protection faults. | ||
862 | */ | ||
863 | if (address >= TASK_SIZE_MAX) | ||
859 | error_code |= PF_PROT; | 864 | error_code |= PF_PROT; |
860 | 865 | ||
861 | if (likely(show_unhandled_signals)) | 866 | if (likely(show_unhandled_signals)) |