stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address" failed to apply to 4.19-stable tree
@ 2020-02-09 12:31 gregkh
  2020-02-09 20:12 ` Sasha Levin
  0 siblings, 1 reply; 5+ messages in thread
From: gregkh @ 2020-02-09 12:31 UTC (permalink / raw)
  To: sean.j.christopherson, pbonzini; +Cc: stable


The patch below does not apply to the 4.19-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 fe6ed369fca98e99df55c932b85782a5687526b5 Mon Sep 17 00:00:00 2001
From: Sean Christopherson <sean.j.christopherson@intel.com>
Date: Tue, 10 Dec 2019 15:24:32 -0800
Subject: [PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address
 MSRs

Reject writes to RTIT address MSRs if the data being written is a
non-canonical address as the MSRs are subject to canonical checks, e.g.
KVM will trigger an unchecked #GP when loading the values to hardware
during pt_guest_enter().

Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index c2ced79aee3e..aea4fa957fd2 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -2144,6 +2144,8 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
 			(index >= 2 * intel_pt_validate_cap(vmx->pt_desc.caps,
 					PT_CAP_num_address_ranges)))
 			return 1;
+		if (is_noncanonical_address(data, vcpu))
+			return 1;
 		if (index % 2)
 			vmx->pt_desc.guest.addr_b[index / 2] = data;
 		else


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: FAILED: patch "[PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address" failed to apply to 4.19-stable tree
  2020-02-09 12:31 FAILED: patch "[PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address" failed to apply to 4.19-stable tree gregkh
@ 2020-02-09 20:12 ` Sasha Levin
  2020-02-20  9:16   ` Ben Hutchings
  0 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2020-02-09 20:12 UTC (permalink / raw)
  To: gregkh; +Cc: sean.j.christopherson, pbonzini, stable

On Sun, Feb 09, 2020 at 01:31:58PM +0100, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 4.19-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 fe6ed369fca98e99df55c932b85782a5687526b5 Mon Sep 17 00:00:00 2001
>From: Sean Christopherson <sean.j.christopherson@intel.com>
>Date: Tue, 10 Dec 2019 15:24:32 -0800
>Subject: [PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address
> MSRs
>
>Reject writes to RTIT address MSRs if the data being written is a
>non-canonical address as the MSRs are subject to canonical checks, e.g.
>KVM will trigger an unchecked #GP when loading the values to hardware
>during pt_guest_enter().
>
>Cc: stable@vger.kernel.org
>Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

File/code movement. Cleaned up and queued for 4.19-4.4.

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FAILED: patch "[PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address" failed to apply to 4.19-stable tree
  2020-02-09 20:12 ` Sasha Levin
@ 2020-02-20  9:16   ` Ben Hutchings
  2020-02-20 10:01     ` Greg KH
  2020-02-20 12:14     ` Sasha Levin
  0 siblings, 2 replies; 5+ messages in thread
From: Ben Hutchings @ 2020-02-20  9:16 UTC (permalink / raw)
  To: Sasha Levin, gregkh; +Cc: sean.j.christopherson, pbonzini, stable

On Sun, 2020-02-09 at 15:12 -0500, Sasha Levin wrote:
> On Sun, Feb 09, 2020 at 01:31:58PM +0100, gregkh@linuxfoundation.org wrote:
> > The patch below does not apply to the 4.19-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 fe6ed369fca98e99df55c932b85782a5687526b5 Mon Sep 17 00:00:00 2001
> > From: Sean Christopherson <sean.j.christopherson@intel.com>
> > Date: Tue, 10 Dec 2019 15:24:32 -0800
> > Subject: [PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address
> > MSRs
> > 
> > Reject writes to RTIT address MSRs if the data being written is a
> > non-canonical address as the MSRs are subject to canonical checks, e.g.
> > KVM will trigger an unchecked #GP when loading the values to hardware
> > during pt_guest_enter().
> > 
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> File/code movement. Cleaned up and queued for 4.19-4.4.

I don't know what happened here, but you've ended up adding the
entirety of arch/x86/kvm/vmx/vmx.c on all those branches rather than
applying the change to the right file.

Ben.

-- 
Ben Hutchings, Software Developer                         Codethink Ltd
https://www.codethink.co.uk/                 Dale House, 35 Dale Street
                                     Manchester, M1 2HF, United Kingdom


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FAILED: patch "[PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address" failed to apply to 4.19-stable tree
  2020-02-20  9:16   ` Ben Hutchings
@ 2020-02-20 10:01     ` Greg KH
  2020-02-20 12:14     ` Sasha Levin
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2020-02-20 10:01 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: Sasha Levin, sean.j.christopherson, pbonzini, stable

On Thu, Feb 20, 2020 at 09:16:51AM +0000, Ben Hutchings wrote:
> On Sun, 2020-02-09 at 15:12 -0500, Sasha Levin wrote:
> > On Sun, Feb 09, 2020 at 01:31:58PM +0100, gregkh@linuxfoundation.org wrote:
> > > The patch below does not apply to the 4.19-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 fe6ed369fca98e99df55c932b85782a5687526b5 Mon Sep 17 00:00:00 2001
> > > From: Sean Christopherson <sean.j.christopherson@intel.com>
> > > Date: Tue, 10 Dec 2019 15:24:32 -0800
> > > Subject: [PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address
> > > MSRs
> > > 
> > > Reject writes to RTIT address MSRs if the data being written is a
> > > non-canonical address as the MSRs are subject to canonical checks, e.g.
> > > KVM will trigger an unchecked #GP when loading the values to hardware
> > > during pt_guest_enter().
> > > 
> > > Cc: stable@vger.kernel.org
> > > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > 
> > File/code movement. Cleaned up and queued for 4.19-4.4.
> 
> I don't know what happened here, but you've ended up adding the
> entirety of arch/x86/kvm/vmx/vmx.c on all those branches rather than
> applying the change to the right file.

Oh wow that's wrong :(

I'll go revert this, as it's not actually doing anything.

Thanks for catching this.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FAILED: patch "[PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address" failed to apply to 4.19-stable tree
  2020-02-20  9:16   ` Ben Hutchings
  2020-02-20 10:01     ` Greg KH
@ 2020-02-20 12:14     ` Sasha Levin
  1 sibling, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2020-02-20 12:14 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: gregkh, sean.j.christopherson, pbonzini, stable

On Thu, Feb 20, 2020 at 09:16:51AM +0000, Ben Hutchings wrote:
>On Sun, 2020-02-09 at 15:12 -0500, Sasha Levin wrote:
>> On Sun, Feb 09, 2020 at 01:31:58PM +0100, gregkh@linuxfoundation.org wrote:
>> > The patch below does not apply to the 4.19-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 fe6ed369fca98e99df55c932b85782a5687526b5 Mon Sep 17 00:00:00 2001
>> > From: Sean Christopherson <sean.j.christopherson@intel.com>
>> > Date: Tue, 10 Dec 2019 15:24:32 -0800
>> > Subject: [PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address
>> > MSRs
>> >
>> > Reject writes to RTIT address MSRs if the data being written is a
>> > non-canonical address as the MSRs are subject to canonical checks, e.g.
>> > KVM will trigger an unchecked #GP when loading the values to hardware
>> > during pt_guest_enter().
>> >
>> > Cc: stable@vger.kernel.org
>> > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
>> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>
>> File/code movement. Cleaned up and queued for 4.19-4.4.
>
>I don't know what happened here, but you've ended up adding the
>entirety of arch/x86/kvm/vmx/vmx.c on all those branches rather than
>applying the change to the right file.

Ugh, sorry. I think that I got confused here by 'git cherry-pick'
creating the file when it doesn't exist and it doesn't find the right
file renames.

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-20 12:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-09 12:31 FAILED: patch "[PATCH] KVM: VMX: Add non-canonical check on writes to RTIT address" failed to apply to 4.19-stable tree gregkh
2020-02-09 20:12 ` Sasha Levin
2020-02-20  9:16   ` Ben Hutchings
2020-02-20 10:01     ` Greg KH
2020-02-20 12:14     ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).