android_kernel_xiaomi_sdm845/arch/s390
Carsten Otte f50146bd7b KVM: s390: Fix prefix register checking in arch/s390/kvm/sigp.c
This patch corrects the checking of the new address for the prefix register.
On s390, the prefix register is used to address the cpu's lowcore (address
0...8k). This check is supposed to verify that the memory is readable and
present.
copy_from_guest is a helper function, that can be used to read from guest
memory. It applies prefixing, adds the start address of the guest memory in
user, and then calls copy_from_user. Previous code was obviously broken for
two reasons:
- prefixing should not be applied here. The current prefix register is
  going to be updated soon, and the address we're looking for will be
  0..8k after we've updated the register
- we're adding the guest origin (gmsor) twice: once in subject code
  and once in copy_from_guest

With kuli, we did not hit this problem because (a) we were lucky with
previous prefix register content, and (b) our guest memory was mmaped
very low into user address space.

Cc: stable@kernel.org
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
2009-12-03 09:32:26 +02:00
..
appldata sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
boot kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
crypto crypto: sha-s390 - Fix warnings in import function 2009-09-05 16:27:35 +10:00
hypfs [S390] hypfs: Use subcode 6 if subcode 7 is not available 2009-10-14 12:43:52 +02:00
include/asm KVM: s390: Make psw available on all exits, not just a subset 2009-12-03 09:32:25 +02:00
kernel [S390] s390: fix single stepping on svc0 2009-11-13 15:45:03 +01:00
kvm KVM: s390: Fix prefix register checking in arch/s390/kvm/sigp.c 2009-12-03 09:32:26 +02:00
lib [S390] Add EX_TABLE for addressing exception in usercopy functions. 2009-10-06 10:35:10 +02:00
math-emu [S390] remove -traditional 2008-04-30 13:38:44 +02:00
mm [S390] fix build breakage with CONFIG_AIO=n 2009-10-06 10:35:05 +02:00
oprofile Combine instrumentation menus in kernel/Kconfig.instrumentation 2007-10-19 11:53:54 -07:00
defconfig [S390] Update default configuration. 2009-09-22 22:58:46 +02:00
Kconfig perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
Kconfig.debug generic debug pagealloc: build fix 2009-04-02 19:04:48 -07:00
Makefile [S390] hibernation: merge files and move to kernel/ 2009-09-11 10:29:45 +02:00