summaryrefslogtreecommitdiff
path: root/virt/kvm
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2013-01-25 14:34:17 (GMT)
committerGleb Natapov <gleb@redhat.com>2013-01-30 10:35:59 (GMT)
commit0c29b2293b25527a1759cbd22b106f19258636b6 (patch)
treefd9f0f38e9361aef6fd1d3f0f854fb0cbc47c67b /virt/kvm
parentc98d3683ce675d689121147ed00e7c4af4737518 (diff)
downloadlinux-0c29b2293b25527a1759cbd22b106f19258636b6.tar.xz
s390/kvm: Fix instruction decoding
Instructions with long displacement have a signed displacement. Currently the sign bit is interpreted as 2^20: Lets fix it by doing the sign extension from 20bit to 32bit and then use it as a signed variable in the addition (see kvm_s390_get_base_disp_rsy). Furthermore, there are lots of "int" in that code. This is problematic, because shifting on a signed integer is undefined/implementation defined if the bit value happens to be negative. Fortunately the promotion rules will make the right hand side unsigned anyway, so there is no real problem right now. Let's convert them anyway to unsigned where appropriate to avoid problems if the code is changed or copy/pasted later on. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'virt/kvm')
0 files changed, 0 insertions, 0 deletions