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]
Date:   Thu, 17 Mar 2022 21:59:35 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [mingo-tip:sched/headers 1458/2308]
 arch/mips/boot/compressed/decompress.c:127:16: error: implicit declaration
 of function 'ALIGN'

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head:   ef90a8d1de7ff54bfd0fcfe6371c20f544b14d6d
commit: 9b6346a2912e347c5bc76e9a5f0cdd804b65b381 [1458/2308] headers/deps: Optimize <linux/kernel.h>
config: mips-qi_lb60_defconfig (https://download.01.org/0day-ci/archive/20220317/202203172105.tknyOIoD-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6ec1e3d798f8eab43fb3a91028c6ab04e115fcb)
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 mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=9b6346a2912e347c5bc76e9a5f0cdd804b65b381
        git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
        git fetch --no-tags mingo-tip sched/headers
        git checkout 9b6346a2912e347c5bc76e9a5f0cdd804b65b381
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

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 >>):

   arch/mips/boot/compressed/decompress.c:42:6: warning: no previous prototype for function 'error' [-Wmissing-prototypes]
   void error(char *x)
        ^
   arch/mips/boot/compressed/decompress.c:42:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void error(char *x)
   ^
   static 
   arch/mips/boot/compressed/decompress.c:85:6: warning: no previous prototype for function '__stack_chk_fail' [-Wmissing-prototypes]
   void __stack_chk_fail(void)
        ^
   arch/mips/boot/compressed/decompress.c:85:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __stack_chk_fail(void)
   ^
   static 
>> arch/mips/boot/compressed/decompress.c:127:16: error: implicit declaration of function 'ALIGN' [-Werror,-Wimplicit-function-declaration]
                   image_size = ALIGN(image_size, STRUCT_ALIGNMENT);
                                ^
   arch/mips/boot/compressed/decompress.c:90:6: warning: no previous prototype for function 'decompress_kernel' [-Wmissing-prototypes]
   void decompress_kernel(unsigned long boot_heap_start)
        ^
   arch/mips/boot/compressed/decompress.c:90:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void decompress_kernel(unsigned long boot_heap_start)
   ^
   static 
   3 warnings and 1 error generated.


vim +/ALIGN +127 arch/mips/boot/compressed/decompress.c

3b628cac65fa57 Ben Chan      2014-06-24   84  
3b628cac65fa57 Ben Chan      2014-06-24  @85  void __stack_chk_fail(void)
3b628cac65fa57 Ben Chan      2014-06-24   86  {
3b628cac65fa57 Ben Chan      2014-06-24   87  	error("stack-protector: Kernel stack is corrupted\n");
3b628cac65fa57 Ben Chan      2014-06-24   88  }
3b628cac65fa57 Ben Chan      2014-06-24   89  
1b93b3c3e94be2 Wu Zhangjin   2009-10-14   90  void decompress_kernel(unsigned long boot_heap_start)
1b93b3c3e94be2 Wu Zhangjin   2009-10-14   91  {
1e1a77d6984a00 Wu Zhangjin   2010-06-16   92  	unsigned long zimage_start, zimage_size;
1b93b3c3e94be2 Wu Zhangjin   2009-10-14   93  
1e1a77d6984a00 Wu Zhangjin   2010-06-16   94  	zimage_start = (unsigned long)(&__image_begin);
1b93b3c3e94be2 Wu Zhangjin   2009-10-14   95  	zimage_size = (unsigned long)(&__image_end) -
1b93b3c3e94be2 Wu Zhangjin   2009-10-14   96  	    (unsigned long)(&__image_begin);
1b93b3c3e94be2 Wu Zhangjin   2009-10-14   97  
1b93b3c3e94be2 Wu Zhangjin   2009-10-14   98  	puts("zimage at:     ");
1e1a77d6984a00 Wu Zhangjin   2010-06-16   99  	puthex(zimage_start);
1b93b3c3e94be2 Wu Zhangjin   2009-10-14  100  	puts(" ");
1e1a77d6984a00 Wu Zhangjin   2010-06-16  101  	puthex(zimage_size + zimage_start);
1b93b3c3e94be2 Wu Zhangjin   2009-10-14  102  	puts("\n");
1b93b3c3e94be2 Wu Zhangjin   2009-10-14  103  
1e1a77d6984a00 Wu Zhangjin   2010-06-16  104  	/* This area are prepared for mallocing when decompressing */
1b93b3c3e94be2 Wu Zhangjin   2009-10-14  105  	free_mem_ptr = boot_heap_start;
1b93b3c3e94be2 Wu Zhangjin   2009-10-14  106  	free_mem_end_ptr = boot_heap_start + BOOT_HEAP_SIZE;
1b93b3c3e94be2 Wu Zhangjin   2009-10-14  107  
1e1a77d6984a00 Wu Zhangjin   2010-06-16  108  	/* Display standard Linux/MIPS boot prompt */
1b93b3c3e94be2 Wu Zhangjin   2009-10-14  109  	puts("Uncompressing Linux at load address ");
1b93b3c3e94be2 Wu Zhangjin   2009-10-14  110  	puthex(VMLINUX_LOAD_ADDRESS_ULL);
1b93b3c3e94be2 Wu Zhangjin   2009-10-14  111  	puts("\n");
1e1a77d6984a00 Wu Zhangjin   2010-06-16  112  
1b93b3c3e94be2 Wu Zhangjin   2009-10-14  113  	/* Decompress the kernel with according algorithm */
2d3862d26e67a5 Yinghai Lu    2015-09-09  114  	__decompress((char *)zimage_start, zimage_size, 0, 0,
2d3862d26e67a5 Yinghai Lu    2015-09-09  115  		   (void *)VMLINUX_LOAD_ADDRESS_ULL, 0, 0, error);
1e1a77d6984a00 Wu Zhangjin   2010-06-16  116  
b8f54f2cde7886 Jonas Gorski  2016-06-20  117  	if (IS_ENABLED(CONFIG_MIPS_RAW_APPENDED_DTB) &&
b8f54f2cde7886 Jonas Gorski  2016-06-20  118  	    fdt_magic((void *)&__appended_dtb) == FDT_MAGIC) {
b8f54f2cde7886 Jonas Gorski  2016-06-20  119  		unsigned int image_size, dtb_size;
b8f54f2cde7886 Jonas Gorski  2016-06-20  120  
b8f54f2cde7886 Jonas Gorski  2016-06-20  121  		dtb_size = fdt_totalsize((void *)&__appended_dtb);
b8f54f2cde7886 Jonas Gorski  2016-06-20  122  
b8f54f2cde7886 Jonas Gorski  2016-06-20  123  		/* last four bytes is always image size in little endian */
4d4f9c1a17a348 Paul Cercueil 2020-12-16  124  		image_size = get_unaligned_le32((void *)&__image_end - 4);
b8f54f2cde7886 Jonas Gorski  2016-06-20  125  
7a05293af39fc7 Paul Cercueil 2021-03-03  126  		/* The device tree's address must be properly aligned  */
7a05293af39fc7 Paul Cercueil 2021-03-03 @127  		image_size = ALIGN(image_size, STRUCT_ALIGNMENT);

:::::: The code at line 127 was first introduced by commit
:::::: 7a05293af39fc716d0f51c0164cbb727302396a2 MIPS: boot/compressed: Copy DTB to aligned address

:::::: TO: Paul Cercueil <paul@...pouillou.net>
:::::: CC: Thomas Bogendoerfer <tsbogend@...ha.franken.de>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ