linux/arch/x86
Andy Lutomirski 3f2c206ae6 x86/xen: Probe target addresses in set_aliased_prot() before the hypercall
commit aa1acff356 upstream.

The update_va_mapping hypercall can fail if the VA isn't present
in the guest's page tables.  Under certain loads, this can
result in an OOPS when the target address is in unpopulated vmap
space.

While we're at it, add comments to help explain what's going on.

This isn't a great long-term fix.  This code should probably be
changed to use something like set_memory_ro.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: David Vrabel <dvrabel@cantab.net>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: security@kernel.org <security@kernel.org>
Cc: xen-devel <xen-devel@lists.xen.org>
Link: http://lkml.kernel.org/r/0b0e55b995cda11e7829f140b833ef932fcabe3a.1438291540.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-16 20:51:38 -07:00
..
boot efi: fix 32bit kernel boot failed problem using efi 2015-08-10 12:20:31 -07:00
configs
crypto crypto: aesni - fix memory usage in GCM decryption 2015-03-26 15:01:00 +01:00
ia32 x86_64, entry: Fix out of bounds read on sysenter 2014-11-14 08:47:54 -08:00
include KVM: x86: make vapics_in_nmi_mode atomic 2015-07-10 10:40:22 -07:00
kernel perf/x86/amd: Rework AMD PMU init code 2015-08-16 20:51:38 -07:00
kvm KVM: x86: make vapics_in_nmi_mode atomic 2015-07-10 10:40:22 -07:00
lguest Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:41:21 -07:00
lib x86, smap: Handle csum_partial_copy_*_user() 2013-09-26 17:18:13 -07:00
math-emu
mm x86: mm: move mmap_sem unlock from mm_fault_error() to caller 2015-04-29 10:34:01 +02:00
net x86: bpf_jit: support negative offsets 2014-03-31 09:58:13 -07:00
oprofile
pci x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A 2015-07-10 10:40:22 -07:00
platform x86/efi: Fix off-by-one bug in EFI Boot Services reservation 2014-02-06 11:08:12 -08:00
power nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2015-05-06 21:56:28 +02:00
realmode x86, build: Pass in additional -mno-mmx, -mno-sse options 2013-12-20 07:45:10 -08:00
syscalls x86, x32: Use compat shims for io_{setup,submit} 2014-06-30 20:09:45 -07:00
tools x86, relocs: Move __vvar_page from S_ABS to S_REL 2013-06-12 15:14:57 -07:00
um x86, um: actually mark system call tables readonly 2015-01-27 07:52:33 -08:00
vdso x86/vdso: Fix the build on GCC5 2015-03-26 15:01:00 +01:00
video
xen x86/xen: Probe target addresses in set_aliased_prot() before the hypercall 2015-08-16 20:51:38 -07:00
.gitignore
Kbuild
Kconfig config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected 2015-07-03 19:48:08 -07:00
Kconfig.cpu
Kconfig.debug Kconfig: consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS 2013-04-30 17:04:09 -07:00
Makefile x86, build: Pass in additional -mno-mmx, -mno-sse options 2013-12-20 07:45:10 -08:00
Makefile_32.cpu
Makefile.um