linux-uconsole/arch
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
..
alpha vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
arc ARC: make sure instruction_pointer() returns unsigned value 2015-08-10 12:20:30 -07:00
arm ARM: realview: fix sparsemem build 2015-08-16 20:51:34 -07:00
arm64 arm64: vdso: work-around broken ELF toolchains in Makefile 2015-08-03 09:29:41 -07:00
avr32 vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
blackfin blackfin updates for Linux 3.10 2013-05-10 07:21:16 -07:00
c6x C6x: time: Ensure consistency in __init 2015-05-06 21:56:28 +02:00
cris vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
frv vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
h8300 We get rid of the general module prefix confusion with a binary config option, 2013-05-05 10:58:06 -07:00
hexagon arch: mm: pass userspace fault flag to generic fault handler 2014-11-21 09:22:56 -08:00
ia64 vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
m32r vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
m68k vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
metag vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
microblaze vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
mips MIPS: Make set_pte() SMP safe. 2015-08-16 20:51:35 -07:00
mn10300 vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
openrisc vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
parisc vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
powerpc powerpc/perf: Fix book3s kernel to userspace backtraces 2015-07-10 10:40:22 -07:00
s390 s390/sclp: clear upper register halves in _sclp_print_early 2015-08-10 12:20:29 -07:00
score vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
sh nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2015-05-06 21:56:28 +02:00
sparc sparc64: Fix userspace FPU register corruptions. 2015-08-16 20:51:38 -07:00
tile tile: use free_bootmem_late() for initrd 2015-08-10 12:20:30 -07:00
um vm: add VM_FAULT_SIGSEGV handling support 2015-04-29 10:34:00 +02:00
unicore32 nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2015-05-06 21:56:28 +02:00
x86 x86/xen: Probe target addresses in set_aliased_prot() before the hypercall 2015-08-16 20:51:38 -07:00
xtensa xtensa: provide __NR_sync_file_range2 instead of __NR_sync_file_range 2015-05-06 21:56:26 +02:00
.gitignore
Kconfig microblaze: fix clone syscall 2013-08-20 08:43:02 -07:00