diff options
author | Sean Christopherson <[email protected]> | 2019-04-29 07:04:15 -0700 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2019-04-30 21:03:42 +0200 |
commit | 8764ed55c9705e426d889ff16c26f398bba70b9b (patch) | |
tree | 235cb801d1bfef9bd16e9668195cf95d7e518629 /net/unix/sysctl_net_unix.c | |
parent | dbcdae185a704068c22984d6d05acc140ec03a8f (diff) |
KVM: x86: Whitelist port 0x7e for pre-incrementing %rip
KVM's recent bug fix to update %rip after emulating I/O broke userspace
that relied on the previous behavior of incrementing %rip prior to
exiting to userspace. When running a Windows XP guest on AMD hardware,
Qemu may patch "OUT 0x7E" instructions in reaction to the OUT itself.
Because KVM's old behavior was to increment %rip before exiting to
userspace to handle the I/O, Qemu manually adjusted %rip to account for
the OUT instruction.
Arguably this is a userspace bug as KVM requires userspace to re-enter
the kernel to complete instruction emulation before taking any other
actions. That being said, this is a bit of a grey area and breaking
userspace that has worked for many years is bad.
Pre-increment %rip on OUT to port 0x7e before exiting to userspace to
hack around the issue.
Fixes: 45def77ebf79e ("KVM: x86: update %rip after emulating IO")
Reported-by: Simon Becherer <[email protected]>
Reported-and-tested-by: Iakov Karpov <[email protected]>
Reported-by: Gabriele Balducci <[email protected]>
Reported-by: Antti Antinoja <[email protected]>
Cc: [email protected]
Cc: Takashi Iwai <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sean Christopherson <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions