tree:
https://github.com/weiny2/linux-kernel.git tip-pks-v4.6-5.12-rc
head: 0a042414603935649c022b18cc1fdef0e7f2d3f3
commit: 25071b452a26dedd517b374ed5baf42970361e0a [25/32] <WARN SUP_PKEYS change>:
kmap: Add stray access protection for device pages
config: x86_64-randconfig-a006-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://github.com/weiny2/linux-kernel/commit/25071b452a26dedd517b374ed5b...
git remote add weiny2
https://github.com/weiny2/linux-kernel.git
git fetch --no-tags weiny2 tip-pks-v4.6-5.12-rc
git checkout 25071b452a26dedd517b374ed5baf42970361e0a
# 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(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/mm/fault.c:20:
include/linux/efi.h:1093:34: warning: passing 1-byte aligned argument to 4-byte aligned
parameter 2 of 'get_var' may result in an unaligned pointer access
[-Walign-mismatch]
status = get_var(L"SecureBoot", &EFI_GLOBAL_VARIABLE_GUID, NULL,
&size,
^
include/linux/efi.h:1101:24: warning: passing 1-byte aligned argument to 4-byte aligned
parameter 2 of 'get_var' may result in an unaligned pointer access
[-Walign-mismatch]
get_var(L"SetupMode", &EFI_GLOBAL_VARIABLE_GUID, NULL, &size,
&setupmode);
^
> arch/x86/mm/fault.c:1220:6: error: redefinition of
'handle_pks'
bool handle_pks(struct pt_regs *regs, unsigned long
error_code,
^
arch/x86/include/asm/processor.h:898:20: note: previous definition is here
static inline bool handle_pks(struct pt_regs *regs, unsigned long error_code,
^
arch/x86/mm/fault.c:1241:14: error: implicit declaration of function
'extended_pt_regs' [-Werror,-Wimplicit-function-declaration]
ept_regs = extended_pt_regs(regs);
^
arch/x86/mm/fault.c:1241:12: warning: incompatible integer to pointer conversion
assigning to 'struct extended_pt_regs *' from 'int' [-Wint-conversion]
ept_regs = extended_pt_regs(regs);
^ ~~~~~~~~~~~~~~~~~~~~~~
arch/x86/mm/fault.c:1242:27: error: incomplete definition of type 'struct
extended_pt_regs'
update_pkey_val(ept_regs->thread_pkrs, pkey, 0);
~~~~~~~~^
arch/x86/mm/fault.c:1224:10: note: forward declaration of 'struct
extended_pt_regs'
struct extended_pt_regs *ept_regs;
^
3 warnings and 3 errors generated.
vim +/handle_pks +1220 arch/x86/mm/fault.c
1218
1219 #ifdef CONFIG_ARCH_HAS_SUPERVISOR_PKEYS
1220 bool handle_pks(struct pt_regs *regs, unsigned long error_code,
1221 unsigned long address)
1222 {
1223 if (error_code & X86_PF_PK) {
1224 struct extended_pt_regs *ept_regs;
1225 struct page *page;
1226 int pkey;
1227
1228 page = virt_to_page(address);
1229
1230 if (!page || !page_is_globally_mapped(page))
1231 return false;
1232
1233 if (pks_mode == PKS_MODE_STRICT)
1234 return false;
1235
1236 WARN_ONCE(pks_mode == PKS_MODE_RELAXED,
1237 "PKS fault on globally mapped device page 0x%lu pfn %lu",
1238 address, page_to_pfn(page));
1239
1240 pkey = dev_get_dev_pkey();
1241 ept_regs = extended_pt_regs(regs);
1242 update_pkey_val(ept_regs->thread_pkrs, pkey, 0);
1243 return true;
1244 }
1245
1246 return false;
1247 }
1248 #endif
1249
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org