Commit 7cfa3f59 authored by Petr Vandrovec's avatar Petr Vandrovec Committed by Linus Torvalds

[PATCH] Fix x86-64 vsyscall32 mapping

The x86-64 kernel incorrectly marks the 32-bit vsyscall page mapping at
virtual address 0xffffe000 as a global one, even though that mapping
does not exist globally.  As such, task switches do not correctly
invalidate the mapping, and strange behaviour ensues if a 64-bit program
happens to use that same virtual address for something else.
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 88835ba2
......@@ -55,7 +55,7 @@ int __map_syscall32(struct mm_struct *mm, unsigned long address)
if (pte_none(*pte)) {
set_pte(pte,
mk_pte(virt_to_page(syscall32_page),
PAGE_KERNEL_VSYSCALL));
PAGE_KERNEL_VSYSCALL32));
}
/* Flush only the local CPU. Other CPUs taking a fault
will just end up here again
......
......@@ -182,6 +182,7 @@ extern inline void pgd_clear (pgd_t * pgd)
#define PAGE_KERNEL_EXEC MAKE_GLOBAL(__PAGE_KERNEL_EXEC)
#define PAGE_KERNEL_RO MAKE_GLOBAL(__PAGE_KERNEL_RO)
#define PAGE_KERNEL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE)
#define PAGE_KERNEL_VSYSCALL32 __pgprot(__PAGE_KERNEL_VSYSCALL)
#define PAGE_KERNEL_VSYSCALL MAKE_GLOBAL(__PAGE_KERNEL_VSYSCALL)
#define PAGE_KERNEL_LARGE MAKE_GLOBAL(__PAGE_KERNEL_LARGE)
#define PAGE_KERNEL_VSYSCALL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_VSYSCALL_NOCACHE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment