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: <201910251330.Ez7cfoVA%lkp@intel.com>
Date:   Fri, 25 Oct 2019 13:52:15 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Mike Rapoport <rppt@...nel.org>
Cc:     kbuild-all@...ts.01.org, 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>,
        Greg Ungerer <gerg@...ux-m68k.org>,
        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>,
        Mike Rapoport <rppt@...nel.org>, 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 05/12] m68k: mm: use pgtable-nopXd instead of 4level-fixup

Hi Mike,

I love your patch! Yet something to improve:

[auto build test ERROR on mmotm/master]

url:    https://github.com/0day-ci/linux/commits/Mike-Rapoport/mm-remove-__ARCH_HAS_4LEVEL_HACK/20191025-063009
base:   git://git.cmpxchg.org/linux-mmotm.git master
config: m68k-multi_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   arch/m68k/sun3x/dvma.c: In function 'dvma_map_cpu':
>> arch/m68k/sun3x/dvma.c:98:33: error: passing argument 2 of 'pmd_alloc' from incompatible pointer type [-Werror=incompatible-pointer-types]
      if((pmd = pmd_alloc(&init_mm, pgd, vaddr)) == NULL) {
                                    ^~~
   In file included from arch/m68k/sun3x/dvma.c:17:0:
   include/linux/mm.h:1917:22: note: expected 'pud_t * {aka struct <anonymous> *}' but argument is of type 'pgd_t * {aka struct <anonymous> *}'
    static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
                         ^~~~~~~~~
   cc1: some warnings being treated as errors

vim +/pmd_alloc +98 arch/m68k/sun3x/dvma.c

^1da177e4c3f41 Linus Torvalds     2005-04-16   75  
^1da177e4c3f41 Linus Torvalds     2005-04-16   76  
^1da177e4c3f41 Linus Torvalds     2005-04-16   77  /* create a virtual mapping for a page assigned within the IOMMU
^1da177e4c3f41 Linus Torvalds     2005-04-16   78     so that the cpu can reach it easily */
^1da177e4c3f41 Linus Torvalds     2005-04-16   79  inline int dvma_map_cpu(unsigned long kaddr,
^1da177e4c3f41 Linus Torvalds     2005-04-16   80  			       unsigned long vaddr, int len)
^1da177e4c3f41 Linus Torvalds     2005-04-16   81  {
^1da177e4c3f41 Linus Torvalds     2005-04-16   82  	pgd_t *pgd;
^1da177e4c3f41 Linus Torvalds     2005-04-16   83  	unsigned long end;
^1da177e4c3f41 Linus Torvalds     2005-04-16   84  	int ret = 0;
^1da177e4c3f41 Linus Torvalds     2005-04-16   85  
^1da177e4c3f41 Linus Torvalds     2005-04-16   86  	kaddr &= PAGE_MASK;
^1da177e4c3f41 Linus Torvalds     2005-04-16   87  	vaddr &= PAGE_MASK;
^1da177e4c3f41 Linus Torvalds     2005-04-16   88  
^1da177e4c3f41 Linus Torvalds     2005-04-16   89  	end = PAGE_ALIGN(vaddr + len);
^1da177e4c3f41 Linus Torvalds     2005-04-16   90  
4eee1e72ad06bd Geert Uytterhoeven 2016-12-06   91  	pr_debug("dvma: mapping kern %08lx to virt %08lx\n", kaddr, vaddr);
^1da177e4c3f41 Linus Torvalds     2005-04-16   92  	pgd = pgd_offset_k(vaddr);
^1da177e4c3f41 Linus Torvalds     2005-04-16   93  
^1da177e4c3f41 Linus Torvalds     2005-04-16   94  	do {
^1da177e4c3f41 Linus Torvalds     2005-04-16   95  		pmd_t *pmd;
^1da177e4c3f41 Linus Torvalds     2005-04-16   96  		unsigned long end2;
^1da177e4c3f41 Linus Torvalds     2005-04-16   97  
^1da177e4c3f41 Linus Torvalds     2005-04-16  @98  		if((pmd = pmd_alloc(&init_mm, pgd, vaddr)) == NULL) {
^1da177e4c3f41 Linus Torvalds     2005-04-16   99  			ret = -ENOMEM;
^1da177e4c3f41 Linus Torvalds     2005-04-16  100  			goto out;
^1da177e4c3f41 Linus Torvalds     2005-04-16  101  		}
^1da177e4c3f41 Linus Torvalds     2005-04-16  102  
^1da177e4c3f41 Linus Torvalds     2005-04-16  103  		if((end & PGDIR_MASK) > (vaddr & PGDIR_MASK))
^1da177e4c3f41 Linus Torvalds     2005-04-16  104  			end2 = (vaddr + (PGDIR_SIZE-1)) & PGDIR_MASK;
^1da177e4c3f41 Linus Torvalds     2005-04-16  105  		else
^1da177e4c3f41 Linus Torvalds     2005-04-16  106  			end2 = end;
^1da177e4c3f41 Linus Torvalds     2005-04-16  107  
^1da177e4c3f41 Linus Torvalds     2005-04-16  108  		do {
^1da177e4c3f41 Linus Torvalds     2005-04-16  109  			pte_t *pte;
^1da177e4c3f41 Linus Torvalds     2005-04-16  110  			unsigned long end3;
^1da177e4c3f41 Linus Torvalds     2005-04-16  111  
872fec16d9a0ed Hugh Dickins       2005-10-29  112  			if((pte = pte_alloc_kernel(pmd, vaddr)) == NULL) {
^1da177e4c3f41 Linus Torvalds     2005-04-16  113  				ret = -ENOMEM;
^1da177e4c3f41 Linus Torvalds     2005-04-16  114  				goto out;
^1da177e4c3f41 Linus Torvalds     2005-04-16  115  			}
^1da177e4c3f41 Linus Torvalds     2005-04-16  116  
^1da177e4c3f41 Linus Torvalds     2005-04-16  117  			if((end2 & PMD_MASK) > (vaddr & PMD_MASK))
^1da177e4c3f41 Linus Torvalds     2005-04-16  118  				end3 = (vaddr + (PMD_SIZE-1)) & PMD_MASK;
^1da177e4c3f41 Linus Torvalds     2005-04-16  119  			else
^1da177e4c3f41 Linus Torvalds     2005-04-16  120  				end3 = end2;
^1da177e4c3f41 Linus Torvalds     2005-04-16  121  
^1da177e4c3f41 Linus Torvalds     2005-04-16  122  			do {
4eee1e72ad06bd Geert Uytterhoeven 2016-12-06  123  				pr_debug("mapping %08lx phys to %08lx\n",
^1da177e4c3f41 Linus Torvalds     2005-04-16  124  					 __pa(kaddr), vaddr);
^1da177e4c3f41 Linus Torvalds     2005-04-16  125  				set_pte(pte, pfn_pte(virt_to_pfn(kaddr),
^1da177e4c3f41 Linus Torvalds     2005-04-16  126  						     PAGE_KERNEL));
^1da177e4c3f41 Linus Torvalds     2005-04-16  127  				pte++;
^1da177e4c3f41 Linus Torvalds     2005-04-16  128  				kaddr += PAGE_SIZE;
^1da177e4c3f41 Linus Torvalds     2005-04-16  129  				vaddr += PAGE_SIZE;
^1da177e4c3f41 Linus Torvalds     2005-04-16  130  			} while(vaddr < end3);
^1da177e4c3f41 Linus Torvalds     2005-04-16  131  
^1da177e4c3f41 Linus Torvalds     2005-04-16  132  		} while(vaddr < end2);
^1da177e4c3f41 Linus Torvalds     2005-04-16  133  
^1da177e4c3f41 Linus Torvalds     2005-04-16  134  	} while(vaddr < end);
^1da177e4c3f41 Linus Torvalds     2005-04-16  135  
^1da177e4c3f41 Linus Torvalds     2005-04-16  136  	flush_tlb_all();
^1da177e4c3f41 Linus Torvalds     2005-04-16  137  
^1da177e4c3f41 Linus Torvalds     2005-04-16  138   out:
^1da177e4c3f41 Linus Torvalds     2005-04-16  139  	return ret;
^1da177e4c3f41 Linus Torvalds     2005-04-16  140  }
^1da177e4c3f41 Linus Torvalds     2005-04-16  141  

:::::: The code at line 98 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@...970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@...970.osdl.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (14949 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ