tree: https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next head: e233b65935c946ba420ba1b5a42f9b5625861da8 commit: ceec4ec8c41f622b7076157288804549b18fea04 [3/4] efi: use const* paramaters for get/setvar by-ref arguments annotated as IN config: x86_64-randconfig-a004-20210316 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 50c7504a93fdb90c26870db8c8ea7add895c7725) 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 x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=ceec4ec8c41f622b7076157288804549b18fea04 git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git git fetch --no-tags efi next git checkout ceec4ec8c41f622b7076157288804549b18fea04 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> arch/x86/platform/efi/efi_64.c:163:23: error: passing 'const void *' to parameter of type 'volatile void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] return virt_to_phys(va); ^~ arch/x86/include/asm/io.h:129:55: note: passing argument to parameter 'address' here static inline phys_addr_t virt_to_phys(volatile void *address) ^ >> arch/x86/platform/efi/efi_64.c:165:25: error: passing 'const void *' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] pa = slow_virt_to_phys(va); ^~ arch/x86/include/asm/pgtable_types.h:569:44: note: passing argument to parameter '__address' here extern phys_addr_t slow_virt_to_phys(void *__address); ^ 2 errors generated. vim +163 arch/x86/platform/efi/efi_64.c d2f7cbe7b26a74 Borislav Petkov 2013-10-31 150 f6697df36bdf0b Matt Fleming 2016-11-12 151 /* f6697df36bdf0b Matt Fleming 2016-11-12 152 * Wrapper for slow_virt_to_phys() that handles NULL addresses. f6697df36bdf0b Matt Fleming 2016-11-12 153 */ f6697df36bdf0b Matt Fleming 2016-11-12 154 static inline phys_addr_t ceec4ec8c41f62 Ard Biesheuvel 2021-03-12 155 virt_to_phys_or_null_size(const void *va, unsigned long size) f6697df36bdf0b Matt Fleming 2016-11-12 156 { 8319e9d5ad98ff Ard Biesheuvel 2020-02-21 157 phys_addr_t pa; f6697df36bdf0b Matt Fleming 2016-11-12 158 f6697df36bdf0b Matt Fleming 2016-11-12 159 if (!va) f6697df36bdf0b Matt Fleming 2016-11-12 160 return 0; f6697df36bdf0b Matt Fleming 2016-11-12 161 f6697df36bdf0b Matt Fleming 2016-11-12 162 if (virt_addr_valid(va)) f6697df36bdf0b Matt Fleming 2016-11-12 @163 return virt_to_phys(va); f6697df36bdf0b Matt Fleming 2016-11-12 164 8319e9d5ad98ff Ard Biesheuvel 2020-02-21 @165 pa = slow_virt_to_phys(va); f6697df36bdf0b Matt Fleming 2016-11-12 166 8319e9d5ad98ff Ard Biesheuvel 2020-02-21 167 /* check if the object crosses a page boundary */ 8319e9d5ad98ff Ard Biesheuvel 2020-02-21 168 if (WARN_ON((pa ^ (pa + size - 1)) & PAGE_MASK)) 8319e9d5ad98ff Ard Biesheuvel 2020-02-21 169 return 0; f6697df36bdf0b Matt Fleming 2016-11-12 170 8319e9d5ad98ff Ard Biesheuvel 2020-02-21 171 return pa; f6697df36bdf0b Matt Fleming 2016-11-12 172 } f6697df36bdf0b Matt Fleming 2016-11-12 173 :::::: The code at line 163 was first introduced by commit :::::: f6697df36bdf0bf7fce984605c2918d4a7b4269f x86/efi: Prevent mixed mode boot corruption with CONFIG_VMAP_STACK=y :::::: TO: Matt Fleming :::::: CC: Ingo Molnar --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org