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: <20230623025429.GB3436214@ls.amr.corp.intel.com>
Date:   Thu, 22 Jun 2023 19:54:29 -0700
From:   Isaku Yamahata <isaku.yamahata@...il.com>
To:     "Huang, Kai" <kai.huang@...el.com>
Cc:     "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Yamahata, Isaku" <isaku.yamahata@...el.com>,
        "michael.roth@....com" <michael.roth@....com>,
        "Annapurve, Vishal" <vannapurve@...gle.com>,
        "Christopherson,, Sean" <seanjc@...gle.com>,
        "ackerleytng@...gle.com" <ackerleytng@...gle.com>,
        "Chen, Bo2" <chen.bo@...el.com>, "Shahar, Sagi" <sagis@...gle.com>,
        "isaku.yamahata@...il.com" <isaku.yamahata@...il.com>,
        "Aktas, Erdem" <erdemaktas@...gle.com>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "dmatlack@...gle.com" <dmatlack@...gle.com>,
        "zhi.wang.linux@...il.com" <zhi.wang.linux@...il.com>,
        "linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>,
        "chao.p.peng@...ux.intel.com" <chao.p.peng@...ux.intel.com>
Subject: Re: [RFC PATCH v2 3/6] KVM: x86/mmu: Pass round full 64-bit error
 code for the KVM page fault

On Thu, Jun 22, 2023 at 11:28:22PM +0000,
"Huang, Kai" <kai.huang@...el.com> wrote:

> On Thu, 2023-06-22 at 16:16 -0700, Yamahata, Isaku wrote:
> > The upper 32 bits of error code are discarded at kvm_mmu_page_fault()
> > by lower_32_bits().  Now it's passed down as full 64 bits.
> > Because only FNAME(page_fault) depends on it, move lower_32_bits() into
> > FNAME(page_fault).
> 
> I haven't looked into the code yet, but the last sentence around
> FNAME(page_fault) doesn't make a lot sense IIUC?
> 
> For instance, we can have a shadow EPT table when EPT is enabled in L0 and
> exposed to L1.  If we want to pass 64-bit error code to the handler, how can
> FRAME(page_fault)() depend on the lower 32-bit value? 

Probably "depend" was too strong. In short, I wanted to not change the value
passed down as error_code from FNAME(page_fault).

FNAME(page_fault) calls helper function to walk page tables. Some check
PFERR_IMPLICIT_ACCESS_MASK(48 bit).  If we don't mask lower_32_bits(), it can
pass accidentally the bit.  Maybe we can audit the code carefully to check if
IMPLICIT_ACCESS bit doesn't matter or fix it.  But I don't want to do it with
this patch series.
-- 
Isaku Yamahata <isaku.yamahata@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ