[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18042cd3-c1fe-a54a-8682-2b5d1523c3d9@redhat.com>
Date: Fri, 11 Feb 2022 12:21:18 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
vkuznets@...hat.com, mlevitsk@...hat.com, dmatlack@...gle.com
Subject: Re: [PATCH 05/12] KVM: MMU: avoid NULL-pointer dereference on page
freeing bugs
On 2/11/22 01:24, Sean Christopherson wrote:
>>
>> sp = to_shadow_page(*root_hpa & PT64_BASE_ADDR_MASK);
>> + if (WARN_ON(!sp))
>
> Should this be KVM_BUG_ON()? I.e. when you triggered these, would continuing on
> potentially corrupt guest data, or was it truly benign-ish?
It only triggered on the mode_switch SVM unit test (with npt=0); so, in
a very small test which just hung after the bug. The WARN however was
the 10-minute difference between rmmod and reboot...
I didn't use KVM_BUG_ON because we're in a pretty deep call stack
(kvm_mmu_new_pgd, itself called from nested vmentry) and all sort of
stuff will happen before bailing out. My mental model is to use
KVM_BUG_ON in situations for which error propagation is possible and clean.
Paolo
Powered by blists - more mailing lists