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]
Date:   Sun, 16 Aug 2020 15:42:09 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Mike Rapoport <rppt@...nel.org>
Cc:     linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Helge Deller <deller@....de>,
        "James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Pekka Enberg <penberg@...nel.org>,
        Meelis Roos <mroos@...ux.ee>,
        Mike Rapoport <rppt@...ux.ibm.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH] parisc: fix PMD pages allocation by restoring
 pmd_alloc_one()

On Sun, Aug 16, 2020 at 05:24:03PM +0300, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@...ux.ibm.com>
> 
> Commit 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one()
> and pmd_free_one()") converted parisc to use generic version of
> pmd_alloc_one() but it missed the fact that parisc uses order-1 pages for
> PMD.
> 
> Restore the original version of pmd_alloc_one() for parisc, just use
> GFP_PGTABLE_KERNEL that implies __GFP_ZERO instead of GFP_KERNEL and
> memset.
> 
> Fixes: 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()")
> Repoerted-by: Meelis Roos <mroos@...ux.ee>

typo, "Reported-by"

Reviewed-by: Matthew Wilcox (Oracle) <willy@...radead.org>

> Signed-off-by: Mike Rapoport <rppt@...ux.ibm.com>
> Tested-by: Meelis Roos <mroos@...ux.ee>
> Link: https://lkml.kernel.org/r/9f2b5ebd-e4a4-0fa1-6cd3-4b9f6892d1ad@linux.ee 
> ---
> 
> Hi,
> 
> I've trimmed the 'cc list relatively to the bug report and added parisc
> maintainers.
> 
>  arch/parisc/include/asm/pgalloc.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h
> index cc7ecc2ef55d..a6482b2ce0ea 100644
> --- a/arch/parisc/include/asm/pgalloc.h
> +++ b/arch/parisc/include/asm/pgalloc.h
> @@ -10,6 +10,7 @@
>  
>  #include <asm/cache.h>
>  
> +#define __HAVE_ARCH_PMD_ALLOC_ONE
>  #define __HAVE_ARCH_PMD_FREE
>  #define __HAVE_ARCH_PGD_FREE
>  #include <asm-generic/pgalloc.h>
> @@ -67,6 +68,11 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
>  			(__u32)(__pa((unsigned long)pmd) >> PxD_VALUE_SHIFT)));
>  }
>  
> +static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
> +{
> +	return (pmd_t *)__get_free_pages(GFP_PGTABLE_KERNEL, PMD_ORDER);
> +}
> +
>  static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
>  {
>  	if (pmd_flag(*pmd) & PxD_FLAG_ATTACHED) {
> -- 
> 2.26.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ