KVM: x86: fix conversion of addresses to linear in 32-bit protected mode
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 Feb 2016 17:07:21 +0000 (18:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:07:29 +0000 (15:07 -0800)
commitde5b55f616a7ba97e72e33f52ac0cde6c8c47527
tree2f75574fd40783a68a86f0f08aae537fb9d6fdd0
parentfc90441e728aa461a8ed1cfede08b0b9efef43fb
KVM: x86: fix conversion of addresses to linear in 32-bit protected mode

commit 0c1d77f4ba5cc9c05a29adca3d6466cdf4969b70 upstream.

Commit e8dd2d2d641c ("Silence compiler warning in arch/x86/kvm/emulate.c",
2015-09-06) broke boot of the Hurd.  The bug is that the "default:"
case actually could modify "la", but after the patch this change is
not reflected in *linear.

The bug is visible whenever a non-zero segment base causes the linear
address to wrap around the 4GB mark.

Fixes: e8dd2d2d641cb2724ee10e76c0ad02e04289c017
Reported-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/emulate.c