All of lore.kernel.org
 help / color / mirror / Atom feed
* [weiny2:tip-pks-v4.6-5.12-rc 25/32] arch/x86/mm/fault.c:1220:6: error: redefinition of 'handle_pks'
@ 2021-03-16 13:17 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-16 13:17 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3760 bytes --]

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-m001-20210316 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/weiny2/linux-kernel/commit/25071b452a26dedd517b374ed5baf42970361e0a
        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
        make W=1 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/mm/fault.c:1220:6: error: redefinition of 'handle_pks'
    1220 | bool handle_pks(struct pt_regs *regs, unsigned long error_code,
         |      ^~~~~~~~~~
   In file included from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:58,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/rcupdate.h:27,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from arch/x86/mm/fault.c:7:
   arch/x86/include/asm/processor.h:898:20: note: previous definition of 'handle_pks' was here
     898 | static inline bool handle_pks(struct pt_regs *regs, unsigned long error_code,
         |                    ^~~~~~~~~~
   arch/x86/mm/fault.c: In function 'handle_pks':
   arch/x86/mm/fault.c:1241:14: error: implicit declaration of function 'extended_pt_regs' [-Werror=implicit-function-declaration]
    1241 |   ept_regs = extended_pt_regs(regs);
         |              ^~~~~~~~~~~~~~~~
   arch/x86/mm/fault.c:1241:12: warning: assignment to 'struct extended_pt_regs *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1241 |   ept_regs = extended_pt_regs(regs);
         |            ^
   arch/x86/mm/fault.c:1242:27: error: dereferencing pointer to incomplete type 'struct extended_pt_regs'
    1242 |   update_pkey_val(ept_regs->thread_pkrs, pkey, 0);
         |                           ^~
   cc1: some warnings being treated as errors


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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31823 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [weiny2:tip-pks-v4.6-5.12-rc 25/32] arch/x86/mm/fault.c:1220:6: error: redefinition of 'handle_pks'
@ 2021-03-16 12:36 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-03-16 12:36 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4319 bytes --]

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/25071b452a26dedd517b374ed5baf42970361e0a
        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@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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36506 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-16 13:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 13:17 [weiny2:tip-pks-v4.6-5.12-rc 25/32] arch/x86/mm/fault.c:1220:6: error: redefinition of 'handle_pks' kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-03-16 12:36 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.