From: Sasha Levin <sashal@kernel.org>
To: gregkh@linuxfoundation.org
Cc: sean.j.christopherson@intel.com, pbonzini@redhat.com,
stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] KVM: x86: Fix potential put_fpu() w/o load_fpu() on MPX" failed to apply to 4.14-stable tree
Date: Sun, 9 Feb 2020 14:39:34 -0500 [thread overview]
Message-ID: <20200209193934.GU3584@sasha-vm> (raw)
In-Reply-To: <158125096467128@kroah.com>
On Sun, Feb 09, 2020 at 01:22:44PM +0100, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 4.14-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From f958bd2314d117f8c29f4821401bc1925bc2e5ef Mon Sep 17 00:00:00 2001
>From: Sean Christopherson <sean.j.christopherson@intel.com>
>Date: Mon, 9 Dec 2019 12:19:31 -0800
>Subject: [PATCH] KVM: x86: Fix potential put_fpu() w/o load_fpu() on MPX
> platform
>
>Unlike most state managed by XSAVE, MPX is initialized to zero on INIT.
>Because INITs are usually recognized in the context of a VCPU_RUN call,
>kvm_vcpu_reset() puts the guest's FPU so that the FPU state is resident
>in memory, zeros the MPX state, and reloads FPU state to hardware. But,
>in the unlikely event that an INIT is recognized during
>kvm_arch_vcpu_ioctl_get_mpstate() via kvm_apic_accept_events(),
>kvm_vcpu_reset() will call kvm_put_guest_fpu() without a preceding
>kvm_load_guest_fpu() and corrupt the guest's FPU state (and possibly
>userspace's FPU state as well).
>
>Given that MPX is being removed from the kernel[*], fix the bug with the
>simple-but-ugly approach of loading the guest's FPU during
>KVM_GET_MP_STATE.
>
>[*] See commit f240652b6032b ("x86/mpx: Remove MPX APIs").
>
>Fixes: f775b13eedee2 ("x86,kvm: move qemu/guest FPU switching out to vcpu_run")
>Cc: stable@vger.kernel.org
>Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The conflict is because we didn't have fd2325612c14 ("KVM: Move
vcpu_load to arch-specific kvm_arch_vcpu_ioctl_get_mpstate") on older
kernels. I've fixed it and queued for 4.14.
--
Thanks,
Sasha
prev parent reply other threads:[~2020-02-09 19:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-09 12:22 FAILED: patch "[PATCH] KVM: x86: Fix potential put_fpu() w/o load_fpu() on MPX" failed to apply to 4.14-stable tree gregkh
2020-02-09 19:39 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200209193934.GU3584@sasha-vm \
--to=sashal@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=pbonzini@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.