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>] [day] [month] [year] [list]
Message-ID: <202006110521.19lUQ0bi%lkp@intel.com>
Date:   Thu, 11 Jun 2020 05:09:25 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mike Rapoport <rppt@...ux.ibm.com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>
Subject: arch/powerpc/mm/pgtable.c:267:15: error: implicit declaration of
 function 'pmd_ptr'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   84fc461db99b2dc19e019c0a97725a3653687981
commit: e05c7b1f2bc4b7b28199b9a7572f73436d97317e mm: pgtable: add shortcuts for accessing kernel PMD and PTE
date:   29 hours ago
config: powerpc64-randconfig-r022-20200610 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        git checkout e05c7b1f2bc4b7b28199b9a7572f73436d97317e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

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

All errors (new ones prefixed by >>, old ones prefixed by <<):

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al;                                                    ^~~~~~~~~~~~~~
<scratch space>:105:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:541:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n)      readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/pgtable.c:24:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al;                                                    ^~~~~~~~~~~~~~
<scratch space>:107:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n)      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/pgtable.c:24:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al;                                                    ^~~~~~~~~~~~~~
<scratch space>:109:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n)      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/pgtable.c:24:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al;                                                    ^~~~~~~~~~~~~~
<scratch space>:111:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n)     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/pgtable.c:24:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al;                                                    ^~~~~~~~~~~~~~
<scratch space>:113:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n)     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/mm/pgtable.c:24:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al;                                                    ^~~~~~~~~~~~~~
<scratch space>:115:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n)     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> arch/powerpc/mm/pgtable.c:267:15: error: implicit declaration of function 'pmd_ptr' [-Werror,-Wimplicit-function-declaration]
pmd_t *pmd = pmd_ptr(mm, addr);
^
>> arch/powerpc/mm/pgtable.c:267:9: error: incompatible integer to pointer conversion initializing 'pmd_t *' with an expression of type 'int' [-Werror,-Wint-conversion]
pmd_t *pmd = pmd_ptr(mm, addr);
^     ~~~~~~~~~~~~~~~~~
arch/powerpc/mm/pgtable.c:341:8: error: no previous prototype for function '__find_linux_pte' [-Werror,-Wmissing-prototypes]
pte_t *__find_linux_pte(pgd_t *pgdir, unsigned long ea,
^
arch/powerpc/mm/pgtable.c:341:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
pte_t *__find_linux_pte(pgd_t *pgdir, unsigned long ea,
^
static
9 errors generated.

vim +/pmd_ptr +267 arch/powerpc/mm/pgtable.c

b12c07a4bb064c Christophe Leroy 2020-05-19  263  
b12c07a4bb064c Christophe Leroy 2020-05-19  264  #if defined(CONFIG_PPC_8xx)
b12c07a4bb064c Christophe Leroy 2020-05-19  265  void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte)
b12c07a4bb064c Christophe Leroy 2020-05-19  266  {
b250c8c08c79d1 Christophe Leroy 2020-05-19 @267  	pmd_t *pmd = pmd_ptr(mm, addr);
b250c8c08c79d1 Christophe Leroy 2020-05-19  268  	pte_basic_t val;
b250c8c08c79d1 Christophe Leroy 2020-05-19  269  	pte_basic_t *entry = &ptep->pte;
b250c8c08c79d1 Christophe Leroy 2020-05-19  270  	int num = is_hugepd(*((hugepd_t *)pmd)) ? 1 : SZ_512K / SZ_4K;
b250c8c08c79d1 Christophe Leroy 2020-05-19  271  	int i;
b250c8c08c79d1 Christophe Leroy 2020-05-19  272  
b12c07a4bb064c Christophe Leroy 2020-05-19  273  	/*
b12c07a4bb064c Christophe Leroy 2020-05-19  274  	 * Make sure hardware valid bit is not set. We don't do
b12c07a4bb064c Christophe Leroy 2020-05-19  275  	 * tlb flush for this update.
b12c07a4bb064c Christophe Leroy 2020-05-19  276  	 */
b12c07a4bb064c Christophe Leroy 2020-05-19  277  	VM_WARN_ON(pte_hw_valid(*ptep) && !pte_protnone(*ptep));
b12c07a4bb064c Christophe Leroy 2020-05-19  278  
b12c07a4bb064c Christophe Leroy 2020-05-19  279  	pte = pte_mkpte(pte);
b12c07a4bb064c Christophe Leroy 2020-05-19  280  
b12c07a4bb064c Christophe Leroy 2020-05-19  281  	pte = set_pte_filter(pte);
b12c07a4bb064c Christophe Leroy 2020-05-19  282  
b250c8c08c79d1 Christophe Leroy 2020-05-19  283  	val = pte_val(pte);
b250c8c08c79d1 Christophe Leroy 2020-05-19  284  	for (i = 0; i < num; i++, entry++, val += SZ_4K)
b250c8c08c79d1 Christophe Leroy 2020-05-19  285  		*entry = val;
b12c07a4bb064c Christophe Leroy 2020-05-19  286  }
b12c07a4bb064c Christophe Leroy 2020-05-19  287  #endif
f069ff396d657a Aneesh Kumar K.V 2018-05-29  288  #endif /* CONFIG_HUGETLB_PAGE */
f069ff396d657a Aneesh Kumar K.V 2018-05-29  289  

:::::: The code at line 267 was first introduced by commit
:::::: b250c8c08c79d1eb5354c7eaa84b7505f5f2d921 powerpc/8xx: Manage 512k huge pages as standard pages.

:::::: TO: Christophe Leroy <christophe.leroy@...roup.eu>
:::::: CC: Michael Ellerman <mpe@...erman.id.au>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ