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:   Thu, 24 Oct 2019 08:35:34 +0300
From:   Mike Rapoport <rppt@...nel.org>
To:     Greg Ungerer <gerg@...ux-m68k.org>
Cc:     linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
        Anton Ivanov <anton.ivanov@...bridgegreys.com>,
        Arnd Bergmann <arnd@...db.de>,
        "David S. Miller" <davem@...emloft.net>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Greentime Hu <green.hu@...il.com>,
        Helge Deller <deller@....de>,
        "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
        Jeff Dike <jdike@...toit.com>,
        "Kirill A. Shutemov" <kirill@...temov.name>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Mark Salter <msalter@...hat.com>,
        Matt Turner <mattst88@...il.com>,
        Michal Simek <monstr@...str.eu>,
        Richard Weinberger <richard@....at>,
        Russell King <linux@...linux.org.uk>,
        Sam Creasey <sammy@...my.net>,
        Vincent Chen <deanbo422@...il.com>,
        Vineet Gupta <Vineet.Gupta1@...opsys.com>,
        linux-alpha@...r.kernel.org, linux-arch@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-c6x-dev@...ux-c6x.org,
        linux-kernel@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
        linux-parisc@...r.kernel.org, linux-um@...ts.infradead.org,
        sparclinux@...r.kernel.org, Mike Rapoport <rppt@...ux.ibm.com>
Subject: Re: [PATCH 04/12] m68k: nommu: use pgtable-nopud instead of
 4level-fixup

Hi Greg,

On Thu, Oct 24, 2019 at 02:09:01PM +1000, Greg Ungerer wrote:
> Hi Mike,
> 
> On 23/10/19 7:28 pm, Mike Rapoport wrote:
> >From: Mike Rapoport <rppt@...ux.ibm.com>
> >
> >The generic nommu implementation of page table manipulation takes care of
> >folding of the upper levels and does not require fixups.
> >
> >Simply replace of include/asm-generic/4level-fixup.h with
> >include/asm-generic/pgtable-nopud.h.
> >
> >Signed-off-by: Mike Rapoport <rppt@...ux.ibm.com>
> >---
> >  arch/m68k/include/asm/pgtable_no.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/arch/m68k/include/asm/pgtable_no.h b/arch/m68k/include/asm/pgtable_no.h
> >index c18165b..ccc4568 100644
> >--- a/arch/m68k/include/asm/pgtable_no.h
> >+++ b/arch/m68k/include/asm/pgtable_no.h
> >@@ -2,7 +2,7 @@
> >  #ifndef _M68KNOMMU_PGTABLE_H
> >  #define _M68KNOMMU_PGTABLE_H
> >-#include <asm-generic/4level-fixup.h>
> >+#include <asm-generic/pgtable-nopud.h>
> >  /*
> >   * (C) Copyright 2000-2002, Greg Ungerer <gerg@...pgear.com>
> 
> This fails to compile for me (targeting m5208evb_defconfig):
> 
>   CC      init/main.o
> In file included from ./arch/m68k/include/asm/pgtable_no.h:56:0,
>                  from ./arch/m68k/include/asm/pgtable.h:3,
>                  from ./include/linux/mm.h:99,
>                  from ./include/linux/ring_buffer.h:5,
>                  from ./include/linux/trace_events.h:6,
>                  from ./include/trace/syscall.h:7,
>                  from ./include/linux/syscalls.h:85,
>                  from init/main.c:21:
> ./include/asm-generic/pgtable.h:738:34: error: unknown type name ‘pmd_t’
>  static inline int pmd_soft_dirty(pmd_t pmd)
>                                   ^

...

> scripts/Makefile.build:265: recipe for target 'init/main.o' failed
> make[1]: *** [init/main.o] Error 1
> Makefile:1649: recipe for target 'init' failed
> make: *** [init] Error 2

The hunk below fixes the build.

diff --git a/arch/m68k/include/asm/page.h b/arch/m68k/include/asm/page.h
index c00b67a..05e1e1e 100644
--- a/arch/m68k/include/asm/page.h
+++ b/arch/m68k/include/asm/page.h
@@ -21,7 +21,7 @@
 /*
  * These are used to make use of C type-checking..
  */
-#if CONFIG_PGTABLE_LEVELS == 3
+#if !defined(CONFIG_MMU) || CONFIG_PGTABLE_LEVELS == 3
 typedef struct { unsigned long pmd[16]; } pmd_t;
 #define pmd_val(x)	((&x)->pmd[0])
 #define __pmd(x)	((pmd_t) { { (x) }, })
 
> Regards
> Greg
> 

-- 
Sincerely yours,
Mike.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ