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: <644488b6-e838-48bb-98df-d979e01a51d6@redhat.com>
Date: Wed, 31 Jul 2024 14:22:33 +0200
From: David Hildenbrand <david@...hat.com>
To: Peter Xu <peterx@...hat.com>, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Cc: Dave Jiang <dave.jiang@...el.com>, Rik van Riel <riel@...riel.com>,
 Dave Hansen <dave.hansen@...ux.intel.com>,
 Michael Ellerman <mpe@...erman.id.au>, linuxppc-dev@...ts.ozlabs.org,
 Matthew Wilcox <willy@...radead.org>,
 Rick P Edgecombe <rick.p.edgecombe@...el.com>,
 Oscar Salvador <osalvador@...e.de>, Mel Gorman
 <mgorman@...hsingularity.net>, Andrew Morton <akpm@...ux-foundation.org>,
 Borislav Petkov <bp@...en8.de>,
 Christophe Leroy <christophe.leroy@...roup.eu>,
 Huang Ying <ying.huang@...el.com>, "Kirill A . Shutemov"
 <kirill@...temov.name>, "Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
 Dan Williams <dan.j.williams@...el.com>, Thomas Gleixner
 <tglx@...utronix.de>, Hugh Dickins <hughd@...gle.com>, x86@...nel.org,
 Nicholas Piggin <npiggin@...il.com>, Vlastimil Babka <vbabka@...e.cz>,
 Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v3 5/8] mm/x86: Make pud_leaf() only cares about PSE bit

On 15.07.24 21:21, Peter Xu wrote:
> An entry should be reported as PUD leaf even if it's PROT_NONE, in which
> case PRESENT bit isn't there. I hit bad pud without this when testing dax
> 1G on zapping a PROT_NONE PUD.
> 

Subject s/cares/care/

> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> Cc: x86@...nel.org
> Acked-by: Dave Hansen <dave.hansen@...ux.intel.com>
> Signed-off-by: Peter Xu <peterx@...hat.com>
> ---
>   arch/x86/include/asm/pgtable.h | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
> index 65b8e5bb902c..25fc6d809572 100644
> --- a/arch/x86/include/asm/pgtable.h
> +++ b/arch/x86/include/asm/pgtable.h
> @@ -1073,8 +1073,7 @@ static inline pmd_t *pud_pgtable(pud_t pud)
>   #define pud_leaf pud_leaf
>   static inline bool pud_leaf(pud_t pud)
>   {
> -	return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) ==
> -		(_PAGE_PSE | _PAGE_PRESENT);
> +	return pud_val(pud) & _PAGE_PSE;
>   }
>   
>   static inline int pud_bad(pud_t pud)

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ