This is a note to let you know that I've just added the patch titled KVM: x86: fix typo in __try_cmpxchg_user causing non-atomicness to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: kvm-x86-fix-typo-in-__try_cmpxchg_user-causing-non-atomicness.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 33fbe6befa622c082f7d417896832856814bdde0 Mon Sep 17 00:00:00 2001 From: Maxim Levitsky <mlevitsk@xxxxxxxxxx> Date: Thu, 12 May 2022 13:14:20 +0300 Subject: KVM: x86: fix typo in __try_cmpxchg_user causing non-atomicness From: Maxim Levitsky <mlevitsk@xxxxxxxxxx> commit 33fbe6befa622c082f7d417896832856814bdde0 upstream. This shows up as a TDP MMU leak when running nested. Non-working cmpxchg on L0 relies makes L1 install two different shadow pages under same spte, and one of them is leaked. Fixes: 1c2361f667f36 ("KVM: x86: Use __try_cmpxchg_user() to emulate atomic accesses") Signed-off-by: Maxim Levitsky <mlevitsk@xxxxxxxxxx> Message-Id: <20220512101420.306759-1-mlevitsk@xxxxxxxxxx> Reviewed-by: Sean Christopherson <seanjc@xxxxxxxxxx> Reviewed-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -6933,7 +6933,7 @@ static int emulator_cmpxchg_emulated(str goto emul_write; hva = kvm_vcpu_gfn_to_hva(vcpu, gpa_to_gfn(gpa)); - if (kvm_is_error_hva(addr)) + if (kvm_is_error_hva(hva)) goto emul_write; hva += offset_in_page(gpa); Patches currently in stable-queue which might be from mlevitsk@xxxxxxxxxx are queue-5.15/kvm-x86-fix-typo-in-__try_cmpxchg_user-causing-non-atomicness.patch