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: <20200320114741.c62iolt2yzltnscf@box>
Date:   Fri, 20 Mar 2020 14:47:41 +0300
From:   "Kirill A. Shutemov" <kirill@...temov.name>
To:     Anshuman Khandual <anshuman.khandual@....com>
Cc:     linux-mm@...ck.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>, x86@...nel.org,
        linux-kernel@...r.kernel.org,
        Dan Williams <dan.j.williams@...el.com>
Subject: Re: [PATCH] x86/mm: Make pud_present() check _PAGE_PROTNONE and
 _PAGE_PSE as well

On Fri, Mar 20, 2020 at 08:53:16AM +0530, Anshuman Khandual wrote:
> 
> 
> On 03/18/2020 10:31 AM, Anshuman Khandual wrote:
> > pud_present() should also check _PAGE_PROTNONE and _PAGE_PSE bits like in
> > case pmd_present(). This makes a PUD entry test positive for pud_present()
> > after getting invalidated with pud_mknotpresent(), hence standardizing the
> > semantics with PMD helpers.
> > 
> > Cc: Thomas Gleixner <tglx@...utronix.de>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: Borislav Petkov <bp@...en8.de>
> > Cc: "H. Peter Anvin" <hpa@...or.com>
> > Cc: Dave Hansen <dave.hansen@...el.com>
> > Cc: Andrew Morton <akpm@...ux-foundation.org>
> > Cc: x86@...nel.org
> > Cc: linux-mm@...ck.org
> > Cc: linux-kernel@...r.kernel.org
> > Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> > ---
> > Even though pud_mknotpresent() is not used any where currently, there is
> > a discrepancy between PMD and PUD.
> > 
> > WARN_ON(!pud_present(pud_mknotpresent(pud_mkhuge(pud)))) -> Fail
> > WARN_ON(!pmd_present(pmd_mknotpresent(pmd_mkhuge(pmd)))) -> Pass
> > 
> > Though pud_mknotpresent() currently clears _PAGE_PROTNONE, pud_present()
> > does not check it. This change fixes both inconsistencies.
> > 
> > This has been build and boot tested on x86.
> 
> Adding Kirill and Dan.
> 
> +Cc: Kirill A. Shutemov <kirill@...temov.name>
> +Cc: Dan Williams <dan.j.williams@...el.com>

Or we can just drop the pud_mknotpresent(). There's no users AFAICS and
only x86 provides it.

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ