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  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, 5 May 2019 09:23:39 +0300
From:   Mike Rapoport <rppt@...ux.ibm.com>
To:     Christophe Leroy <christophe.leroy@....fr>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Palmer Dabbelt <palmer@...ive.com>, linux-mips@...r.kernel.org,
        Guo Ren <guoren@...nel.org>, linux-hexagon@...r.kernel.org,
        linux-riscv@...ts.infradead.org, linux-arch@...r.kernel.org,
        Helge Deller <deller@....de>, x86@...nel.org,
        Russell King <linux@...linux.org.uk>,
        Matthew Wilcox <willy@...radead.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Matt Turner <mattst88@...il.com>,
        Sam Creasey <sammy@...my.net>, Arnd Bergmann <arnd@...db.de>,
        linux-um@...ts.infradead.org, Richard Weinberger <richard@....at>,
        linux-m68k@...ts.linux-m68k.org, Greentime Hu <green.hu@...il.com>,
        nios2-dev@...ts.rocketboards.org, Guan Xuetao <gxt@....edu.cn>,
        linux-arm-kernel@...ts.infradead.org, linux-parisc@...r.kernel.org,
        linux-kernel@...r.kernel.org, Richard Kuo <rkuo@...eaurora.org>,
        Paul Burton <paul.burton@...s.com>,
        linux-alpha@...r.kernel.org, Ley Foon Tan <lftan@...era.com>,
        linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 12/15] powerpc/nohash/64: switch to generic version of
 pte allocation

On Thu, May 02, 2019 at 06:56:07PM +0200, Christophe Leroy wrote:
> 
> 
> Le 02/05/2019 à 17:28, Mike Rapoport a écrit :
> >The 64-bit book-E powerpc implements pte_alloc_one(),
> >pte_alloc_one_kernel(), pte_free_kernel() and pte_free() the same way as
> >the generic version.
> 
> Will soon be converted to the same as the 3 other PPC subarches, see
> https://patchwork.ozlabs.org/patch/1091590/
 
Thanks for the heads up. I'll drop this from the next re-spin.

> Christophe
> 
> >
> >Switch it to the generic version that does exactly the same thing.
> >
> >Signed-off-by: Mike Rapoport <rppt@...ux.ibm.com>
> >---
> >  arch/powerpc/include/asm/nohash/64/pgalloc.h | 35 ++--------------------------
> >  1 file changed, 2 insertions(+), 33 deletions(-)
> >
> >diff --git a/arch/powerpc/include/asm/nohash/64/pgalloc.h b/arch/powerpc/include/asm/nohash/64/pgalloc.h
> >index 66d086f..bfb53a0 100644
> >--- a/arch/powerpc/include/asm/nohash/64/pgalloc.h
> >+++ b/arch/powerpc/include/asm/nohash/64/pgalloc.h
> >@@ -11,6 +11,8 @@
> >  #include <linux/cpumask.h>
> >  #include <linux/percpu.h>
> >+#include <asm-generic/pgalloc.h>	/* for pte_{alloc,free}_one */
> >+
> >  struct vmemmap_backing {
> >  	struct vmemmap_backing *list;
> >  	unsigned long phys;
> >@@ -92,39 +94,6 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
> >  	kmem_cache_free(PGT_CACHE(PMD_CACHE_INDEX), pmd);
> >  }
> >-
> >-static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
> >-{
> >-	return (pte_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
> >-}
> >-
> >-static inline pgtable_t pte_alloc_one(struct mm_struct *mm)
> >-{
> >-	struct page *page;
> >-	pte_t *pte;
> >-
> >-	pte = (pte_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO | __GFP_ACCOUNT);
> >-	if (!pte)
> >-		return NULL;
> >-	page = virt_to_page(pte);
> >-	if (!pgtable_page_ctor(page)) {
> >-		__free_page(page);
> >-		return NULL;
> >-	}
> >-	return page;
> >-}
> >-
> >-static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
> >-{
> >-	free_page((unsigned long)pte);
> >-}
> >-
> >-static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage)
> >-{
> >-	pgtable_page_dtor(ptepage);
> >-	__free_page(ptepage);
> >-}
> >-
> >  static inline void pgtable_free(void *table, int shift)
> >  {
> >  	if (!shift) {
> >
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists