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: <BC747219-7808-4C39-A17C-A76B35DD6CB3@alien8.de>
Date:   Sat, 03 Sep 2022 08:31:09 +0000
From:   Boris Petkov <bp@...en8.de>
To:     "Kalra, Ashish" <Ashish.Kalra@....com>
CC:     "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "rientjes@...gle.com" <rientjes@...gle.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "slp@...hat.com" <slp@...hat.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "hpa@...or.com" <hpa@...or.com>,
        "ak@...ux.intel.com" <ak@...ux.intel.com>,
        "Lendacky, Thomas" <Thomas.Lendacky@....com>,
        "alpergun@...gle.com" <alpergun@...gle.com>,
        "jroedel@...e.de" <jroedel@...e.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "seanjc@...gle.com" <seanjc@...gle.com>,
        "pgonda@...gle.com" <pgonda@...gle.com>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "srinivas.pandruvada@...ux.intel.com" 
        <srinivas.pandruvada@...ux.intel.com>,
        "ardb@...nel.org" <ardb@...nel.org>,
        "dovmurik@...ux.ibm.com" <dovmurik@...ux.ibm.com>,
        "tobin@....com" <tobin@....com>,
        "Roth, Michael" <Michael.Roth@....com>,
        "jmattson@...gle.com" <jmattson@...gle.com>,
        "kirill@...temov.name" <kirill@...temov.name>,
        "vkuznets@...hat.com" <vkuznets@...hat.com>,
        "tony.luck@...el.com" <tony.luck@...el.com>,
        "vbabka@...e.cz" <vbabka@...e.cz>,
        "sathyanarayanan.kuppuswamy@...ux.intel.com" 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        "luto@...nel.org" <luto@...nel.org>,
        "dgilbert@...hat.com" <dgilbert@...hat.com>,
        "marcorr@...gle.com" <marcorr@...gle.com>,
        "jarkko@...nel.org" <jarkko@...nel.org>
Subject: RE: [PATCH Part2 v6 09/49] x86/fault: Add support to handle the RMP fault for user address

On September 3, 2022 6:57:51 AM UTC, "Kalra, Ashish" <Ashish.Kalra@....com> wrote:
>[AMD Official Use Only - General]
>
>So essentially we want to map the faulting address to a RMP entry, considering the fact that a 2M host hugepage can be mapped as 
>4K RMP table entries and 1G host hugepage can be mapped as 2M RMP table entries.

So something's seriously confusing or missing here because if you fault on a 2M host page and the underlying RMP entries are 4K then you can use pte_index().

If the host page is 1G and the underlying RMP entries are 2M, pmd_index() should work here too.

But this piecemeal back'n'forth doesn't seem to resolve this so I'd like to ask you pls to sit down, take your time and give a detailed example of the two possible cases and what the difference is between pte_/pmd_index and your way. Feel free to add actual debug output and paste it here.

Thanks.

-- 
Sent from a small device: formatting sux and brevity is inevitable. 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ