lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YuvffeDKpwL6y+R6@google.com>
Date:   Thu, 4 Aug 2022 15:02:21 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Yu Zhang <yu.c.zhang@...ux.intel.com>
Cc:     pbonzini@...hat.com, vkuznets@...hat.com, jmattson@...gle.com,
        joro@...tes.org, wanpengli@...cent.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] KVM: X86: Explicitly set the 'fault.async_page_fault'
 value in kvm_fixup_and_inject_pf_error().

On Thu, Aug 04, 2022, Yu Zhang wrote:
> On Thu, Jul 21, 2022 at 05:22:14PM +0800, Yu Zhang wrote:
> > On Tue, Jul 19, 2022 at 07:01:41PM +0000, Sean Christopherson wrote:
> > > On Mon, Jul 18, 2022, Yu Zhang wrote:
> > > > kvm_fixup_and_inject_pf_error() was introduced to fixup the error code(
> > > > e.g., to add RSVD flag) and inject the #PF to the guest, when guest
> > > > MAXPHYADDR is smaller than the host one.
> > > > 
> > > > When it comes to nested, L0 is expected to intercept and fix up the #PF
> > > > and then inject to L2 directly if
> > > > - L2.MAXPHYADDR < L0.MAXPHYADDR and
> > > > - L1 has no intention to intercept L2's #PF (e.g., L2 and L1 have the
> > > >   same MAXPHYADDR value && L1 is using EPT for L2),
> > > > instead of constructing a #PF VM Exit to L1. Currently, with PFEC_MASK
> > > > and PFEC_MATCH both set to 0 in vmcs02, the interception and injection
> > > > may happen on all L2 #PFs.
> > > > 
> > > > However, failing to initialize 'fault' in kvm_fixup_and_inject_pf_error()
> > > > may cause the fault.async_page_fault being NOT zeroed, and later the #PF
> > > > being treated as a nested async page fault, and then being injected to L1.
> > > > Instead of zeroing 'fault' at the beginning of this function, we mannually
> > > > set the value of 'fault.async_page_fault', because false is the value we
> > > > really expect.
> > > > 
> > > > Fixes: 897861479c064 ("KVM: x86: Add helper functions for illegal GPA checking and page fault injection")
> > > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216178
> > > > Reported-by: Yang Lixiao <lixiao.yang@...el.com>
> > > > Signed-off-by: Yu Zhang <yu.c.zhang@...ux.intel.com>
> > > > Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> > > 
> > > No need for my SoB, I was just providing feedback.  Other than that, 
> > > 
> > Thanks! It's a very detailed suggestion. :)
> > 
> > > Reviewed-by: Sean Christopherson <seanjc@...gle.com>
> > > 
> > 
> > @Paolo Any comment on this fix, and on the test case change(https://www.spinics.net/lists/kvm/msg283600.html)? Thanks!
> > 
> > B.R.
> > Yu
> 
> Ping... Or should I send another version? Thanks!

Shouldn't need to send a new version.

Paolo, can you grab this for 6.0-rc1?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ