* [efi:next 3/4] arch/x86/platform/efi/efi_64.c:163:23: error: passing 'const void to parameter of type 'volatile void discards qualifiers
@ 2021-03-16 22:28 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-16 22:28 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: kbuild-all, clang-built-linux, linux-efi
[-- Attachment #1: Type: text/plain, Size: 4278 bytes --]
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 <lkp@intel.com>
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 <matt@codeblueprint.co.uk>
:::::: CC: Ingo Molnar <mingo@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32114 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [efi:next 3/4] arch/x86/platform/efi/efi_64.c:163:23: error: passing 'const void to parameter of type 'volatile void discards qualifiers
@ 2021-03-16 22:28 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-16 22:28 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4353 bytes --]
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 <lkp@intel.com>
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 <matt@codeblueprint.co.uk>
:::::: CC: Ingo Molnar <mingo@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32114 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-16 22:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 22:28 [efi:next 3/4] arch/x86/platform/efi/efi_64.c:163:23: error: passing 'const void to parameter of type 'volatile void discards qualifiers kernel test robot
2021-03-16 22:28 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.