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] [day] [month] [year] [list]
Message-ID: <202211042102.ZGrqWKqZ-lkp@intel.com>
Date:   Fri, 4 Nov 2022 21:45:21 +0800
From:   kernel test robot <lkp@...el.com>
To:     "zhijun.han" <hanzj.it@...il.com>, arnd@...db.de
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
        "zhijun.han" <hanzj.it@...il.com>
Subject: Re: [PATCH] mm: swap the definition of CONFIG_SPARSEMEM_VMEMMAP and
 CONFIG_SPARSEMEM

Hi zhijun.han",

Thank you for the patch! Yet something to improve:

[auto build test ERROR on akpm-mm/mm-everything]

url:    https://github.com/intel-lab-lkp/linux/commits/zhijun-han/mm-swap-the-definition-of-CONFIG_SPARSEMEM_VMEMMAP-and-CONFIG_SPARSEMEM/20221104-113343
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20221104032808.24565-1-hanzj.it%40gmail.com
patch subject: [PATCH] mm: swap the definition of CONFIG_SPARSEMEM_VMEMMAP and CONFIG_SPARSEMEM
config: x86_64-randconfig-k001
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
        # https://github.com/intel-lab-lkp/linux/commit/04bf0fed9ff385e0baa59523172d54a9d91519f9
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review zhijun-han/mm-swap-the-definition-of-CONFIG_SPARSEMEM_VMEMMAP-and-CONFIG_SPARSEMEM/20221104-113343
        git checkout 04bf0fed9ff385e0baa59523172d54a9d91519f9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 prepare

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

All errors (new ones prefixed by >>):

   make[5]: *** No rule to make target 'tools/include/uapi/linux/stddef.h', needed by 'tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf.o'.  Stop.
   make[4]: *** [Makefile:157: tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf-in.o] Error 2
   make[3]: *** [Makefile:55: tools/bpf/resolve_btfids//libbpf/libbpf.a] Error 2
   make[3]: *** Waiting for unfinished jobs....
   make[2]: *** [Makefile:76: bpf/resolve_btfids] Error 2
   make[1]: *** [Makefile:1423: tools/bpf/resolve_btfids] Error 2
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:20:
>> include/linux/mm.h:1495:9: error: implicit declaration of function 'page_to_section' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           return page_to_pfn(&folio->page);
                  ^
   include/asm-generic/memory_model.h:52:21: note: expanded from macro 'page_to_pfn'
   #define page_to_pfn __page_to_pfn
                       ^
   include/asm-generic/memory_model.h:29:14: note: expanded from macro '__page_to_pfn'
           int __sec = page_to_section(__pg);                      \
                       ^
   include/linux/mm.h:1495:9: note: did you mean '__nr_to_section'?
   include/asm-generic/memory_model.h:52:21: note: expanded from macro 'page_to_pfn'
   #define page_to_pfn __page_to_pfn
                       ^
   include/asm-generic/memory_model.h:29:14: note: expanded from macro '__page_to_pfn'
           int __sec = page_to_section(__pg);                      \
                       ^
   include/linux/mmzone.h:1687:35: note: '__nr_to_section' declared here
   static inline struct mem_section *__nr_to_section(unsigned long nr)
                                     ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:20:
   include/linux/mm.h:1577:11: error: implicit declaration of function 'page_to_section' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           int mt = get_pageblock_migratetype(page);
                    ^
   include/linux/mmzone.h:103:32: note: expanded from macro 'get_pageblock_migratetype'
           get_pfnblock_flags_mask(page, page_to_pfn(page), MIGRATETYPE_MASK)
                                         ^
   include/asm-generic/memory_model.h:52:21: note: expanded from macro 'page_to_pfn'
   #define page_to_pfn __page_to_pfn
                       ^
   include/asm-generic/memory_model.h:29:14: note: expanded from macro '__page_to_pfn'
           int __sec = page_to_section(__pg);                      \
                       ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:20:
   include/linux/mm.h:1583:18: error: implicit declaration of function 'page_to_section' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           if (is_zero_pfn(page_to_pfn(page)))
                           ^
   include/asm-generic/memory_model.h:52:21: note: expanded from macro 'page_to_pfn'
   #define page_to_pfn __page_to_pfn
                       ^
   include/asm-generic/memory_model.h:29:14: note: expanded from macro '__page_to_pfn'
           int __sec = page_to_section(__pg);                      \
                       ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:20:
   include/linux/mm.h:1723:9: error: implicit declaration of function 'page_to_section' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           return page_to_virt(page);
                  ^
   include/linux/mm.h:115:39: note: expanded from macro 'page_to_virt'
   #define page_to_virt(x) __va(PFN_PHYS(page_to_pfn(x)))
                                         ^
   include/asm-generic/memory_model.h:52:21: note: expanded from macro 'page_to_pfn'
   #define page_to_pfn __page_to_pfn
                       ^
   include/asm-generic/memory_model.h:29:14: note: expanded from macro '__page_to_pfn'
           int __sec = page_to_section(__pg);                      \
                       ^
   In file included from arch/x86/kernel/asm-offsets.c:22:
   In file included from arch/x86/kernel/../kvm/vmx/vmx.h:5:
   In file included from include/linux/kvm_host.h:45:
   In file included from arch/x86/include/asm/kvm_host.h:27:
   In file included from include/linux/hyperv.h:19:
>> include/linux/scatterlist.h:329:9: error: implicit declaration of function 'page_to_section' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           return page_to_phys(sg_page(sg)) + sg->offset;
                  ^
   arch/x86/include/asm/io.h:159:44: note: expanded from macro 'page_to_phys'
   #define page_to_phys(page)    ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
                                              ^
   include/asm-generic/memory_model.h:52:21: note: expanded from macro 'page_to_pfn'
   #define page_to_pfn __page_to_pfn
                       ^
   include/asm-generic/memory_model.h:29:14: note: expanded from macro '__page_to_pfn'
           int __sec = page_to_section(__pg);                      \
                       ^
   In file included from arch/x86/kernel/asm-offsets.c:22:
   In file included from arch/x86/kernel/../kvm/vmx/vmx.h:5:
   In file included from include/linux/kvm_host.h:45:
   In file included from arch/x86/include/asm/kvm_host.h:27:
>> include/linux/hyperv.h:1777:11: error: implicit declaration of function 'page_to_section' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   paddr = page_to_phys(vmalloc_to_page(addr)) +
                           ^
   arch/x86/include/asm/io.h:159:44: note: expanded from macro 'page_to_phys'
   #define page_to_phys(page)    ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
                                              ^
   include/asm-generic/memory_model.h:52:21: note: expanded from macro 'page_to_pfn'
   #define page_to_pfn __page_to_pfn
                       ^
   include/asm-generic/memory_model.h:29:14: note: expanded from macro '__page_to_pfn'
           int __sec = page_to_section(__pg);                      \
                       ^
   6 errors generated.
   make[2]: *** [scripts/Makefile.build:118: arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:1270: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:231: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/page_to_section +1495 include/linux/mm.h

d41dee369bff3b Andy Whitcroft          2005-06-23  1483  
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1484) /**
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1485)  * folio_pfn - Return the Page Frame Number of a folio.
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1486)  * @folio: The folio.
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1487)  *
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1488)  * A folio may contain multiple pages.  The pages have consecutive
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1489)  * Page Frame Numbers.
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1490)  *
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1491)  * Return: The Page Frame Number of the first page in the folio.
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1492)  */
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1493) static inline unsigned long folio_pfn(struct folio *folio)
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1494) {
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07 @1495) 	return page_to_pfn(&folio->page);
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1496) }
bf6bd276b374d4 Matthew Wilcox (Oracle  2021-05-07  1497) 

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (128295 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ