[arm-platforms:irq/domain_cleanup 11/17] arch/x86/include/asm/pgtable.h:1393:22: warning: shift count >= width of type

kernel test robot lkp at intel.com
Thu May 13 07:25:20 PDT 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/domain_cleanup
head:   d4796f65d6c7a6e596dbccb03d6e1141a63e49f9
commit: 0280c7950849a75ff5473618af7ddbfe624d2746 [11/17] irqdomain: Introduce irq_resolve_mapping()
config: x86_64-randconfig-a002-20210513 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
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/maz/arm-platforms.git/commit/?id=0280c7950849a75ff5473618af7ddbfe624d2746
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms irq/domain_cleanup
        git checkout 0280c7950849a75ff5473618af7ddbfe624d2746
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:29:
   In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
   In file included from arch/x86/entry/vdso/../../../../lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:137:
   In file included from arch/x86/include/asm/vdso/gettimeofday.h:21:
   In file included from include/clocksource/hyperv_timer.h:18:
   In file included from arch/x86/include/asm/mshyperv.h:7:
   In file included from include/linux/msi.h:7:
   In file included from arch/x86/include/asm/msi.h:5:
   In file included from arch/x86/include/asm/irqdomain.h:5:
   In file included from include/linux/irqdomain.h:34:
   In file included from include/linux/irq.h:21:
   In file included from include/linux/slab.h:136:
   In file included from include/linux/kasan.h:28:
   In file included from include/linux/pgtable.h:6:
>> arch/x86/include/asm/pgtable.h:1393:22: warning: shift count >= width of type [-Wshift-count-overflow]
           return (pte_flags & _PAGE_PKEY_MASK) >> _PAGE_BIT_PKEY_BIT0;
                               ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:71:26: note: expanded from macro '_PAGE_PKEY_MASK'
   #define _PAGE_PKEY_MASK (_PAGE_PKEY_BIT0 | \
                            ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:60:43: note: expanded from macro '_PAGE_PKEY_BIT0'
   #define _PAGE_PKEY_BIT0 (_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT0)
                                             ^  ~~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:29:
   In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
   In file included from arch/x86/entry/vdso/../../../../lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:137:
   In file included from arch/x86/include/asm/vdso/gettimeofday.h:21:
   In file included from include/clocksource/hyperv_timer.h:18:
   In file included from arch/x86/include/asm/mshyperv.h:7:
   In file included from include/linux/msi.h:7:
   In file included from arch/x86/include/asm/msi.h:5:
   In file included from arch/x86/include/asm/irqdomain.h:5:
   In file included from include/linux/irqdomain.h:34:
   In file included from include/linux/irq.h:21:
   In file included from include/linux/slab.h:136:
   In file included from include/linux/kasan.h:28:
   In file included from include/linux/pgtable.h:6:
>> arch/x86/include/asm/pgtable.h:1393:22: warning: shift count >= width of type [-Wshift-count-overflow]
           return (pte_flags & _PAGE_PKEY_MASK) >> _PAGE_BIT_PKEY_BIT0;
                               ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:72:5: note: expanded from macro '_PAGE_PKEY_MASK'
                            _PAGE_PKEY_BIT1 | \
                            ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:61:43: note: expanded from macro '_PAGE_PKEY_BIT1'
   #define _PAGE_PKEY_BIT1 (_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT1)
                                             ^  ~~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:29:
   In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
   In file included from arch/x86/entry/vdso/../../../../lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:137:
   In file included from arch/x86/include/asm/vdso/gettimeofday.h:21:
   In file included from include/clocksource/hyperv_timer.h:18:
   In file included from arch/x86/include/asm/mshyperv.h:7:
   In file included from include/linux/msi.h:7:
   In file included from arch/x86/include/asm/msi.h:5:
   In file included from arch/x86/include/asm/irqdomain.h:5:
   In file included from include/linux/irqdomain.h:34:
   In file included from include/linux/irq.h:21:
   In file included from include/linux/slab.h:136:
   In file included from include/linux/kasan.h:28:
   In file included from include/linux/pgtable.h:6:
>> arch/x86/include/asm/pgtable.h:1393:22: warning: shift count >= width of type [-Wshift-count-overflow]
           return (pte_flags & _PAGE_PKEY_MASK) >> _PAGE_BIT_PKEY_BIT0;
                               ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:73:5: note: expanded from macro '_PAGE_PKEY_MASK'
                            _PAGE_PKEY_BIT2 | \
                            ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:62:43: note: expanded from macro '_PAGE_PKEY_BIT2'
   #define _PAGE_PKEY_BIT2 (_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT2)
                                             ^  ~~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:29:
   In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
   In file included from arch/x86/entry/vdso/../../../../lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:137:
   In file included from arch/x86/include/asm/vdso/gettimeofday.h:21:
   In file included from include/clocksource/hyperv_timer.h:18:
   In file included from arch/x86/include/asm/mshyperv.h:7:
   In file included from include/linux/msi.h:7:
   In file included from arch/x86/include/asm/msi.h:5:
   In file included from arch/x86/include/asm/irqdomain.h:5:
   In file included from include/linux/irqdomain.h:34:
   In file included from include/linux/irq.h:21:
   In file included from include/linux/slab.h:136:
   In file included from include/linux/kasan.h:28:
   In file included from include/linux/pgtable.h:6:
>> arch/x86/include/asm/pgtable.h:1393:22: warning: shift count >= width of type [-Wshift-count-overflow]
           return (pte_flags & _PAGE_PKEY_MASK) >> _PAGE_BIT_PKEY_BIT0;
                               ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:74:5: note: expanded from macro '_PAGE_PKEY_MASK'
                            _PAGE_PKEY_BIT3)
                            ^~~~~~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:63:43: note: expanded from macro '_PAGE_PKEY_BIT3'
   #define _PAGE_PKEY_BIT3 (_AT(pteval_t, 1) << _PAGE_BIT_PKEY_BIT3)
                                             ^  ~~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:29:
   In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
   In file included from arch/x86/entry/vdso/../../../../lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:137:
   In file included from arch/x86/include/asm/vdso/gettimeofday.h:21:
   In file included from include/clocksource/hyperv_timer.h:18:
   In file included from arch/x86/include/asm/mshyperv.h:7:
   In file included from include/linux/msi.h:7:
   In file included from arch/x86/include/asm/msi.h:5:
   In file included from arch/x86/include/asm/irqdomain.h:5:
   In file included from include/linux/irqdomain.h:34:
   In file included from include/linux/irq.h:21:
   In file included from include/linux/slab.h:136:
   In file included from include/linux/kasan.h:28:
   In file included from include/linux/pgtable.h:6:
   arch/x86/include/asm/pgtable.h:1393:39: warning: shift count >= width of type [-Wshift-count-overflow]
           return (pte_flags & _PAGE_PKEY_MASK) >> _PAGE_BIT_PKEY_BIT0;
                                                ^  ~~~~~~~~~~~~~~~~~~~
   In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:29:
   In file included from arch/x86/entry/vdso/vdso32/../vclock_gettime.c:15:
   In file included from arch/x86/entry/vdso/../../../../lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:137:
   In file included from arch/x86/include/asm/vdso/gettimeofday.h:21:
   In file included from include/clocksource/hyperv_timer.h:18:
   In file included from arch/x86/include/asm/mshyperv.h:7:
   In file included from include/linux/msi.h:7:
   In file included from arch/x86/include/asm/msi.h:5:
   In file included from arch/x86/include/asm/irqdomain.h:5:
   In file included from include/linux/irqdomain.h:34:
   In file included from include/linux/irq.h:21:
   In file included from include/linux/slab.h:136:
   In file included from include/linux/kasan.h:28:
   include/linux/pgtable.h:1511:2: error: Missing MAX_POSSIBLE_PHYSMEM_BITS definition
   #error Missing MAX_POSSIBLE_PHYSMEM_BITS definition
    ^
   In file included from arch/x86/entry/vdso/vdso32/vclock_gettime.c:29:
   arch/x86/entry/vdso/vdso32/../vclock_gettime.c:70:5: warning: no previous prototype for function '__vdso_clock_gettime64' [-Wmissing-prototypes]
   int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts)
       ^
   arch/x86/entry/vdso/vdso32/../vclock_gettime.c:70:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts)
   ^
   static 
   6 warnings and 1 error generated.


vim +1393 arch/x86/include/asm/pgtable.h

33a709b25a760b Dave Hansen 2016-02-12  1388  
33a709b25a760b Dave Hansen 2016-02-12  1389  static inline u16 pte_flags_pkey(unsigned long pte_flags)
33a709b25a760b Dave Hansen 2016-02-12  1390  {
33a709b25a760b Dave Hansen 2016-02-12  1391  #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
33a709b25a760b Dave Hansen 2016-02-12  1392  	/* ifdef to avoid doing 59-bit shift on 32-bit values */
33a709b25a760b Dave Hansen 2016-02-12 @1393  	return (pte_flags & _PAGE_PKEY_MASK) >> _PAGE_BIT_PKEY_BIT0;
33a709b25a760b Dave Hansen 2016-02-12  1394  #else
33a709b25a760b Dave Hansen 2016-02-12  1395  	return 0;
33a709b25a760b Dave Hansen 2016-02-12  1396  #endif
33a709b25a760b Dave Hansen 2016-02-12  1397  }
33a709b25a760b Dave Hansen 2016-02-12  1398  

:::::: The code at line 1393 was first introduced by commit
:::::: 33a709b25a760b91184bb335cf7d7c32b8123013 mm/gup, x86/mm/pkeys: Check VMAs and PTEs for protection keys

:::::: TO: Dave Hansen <dave.hansen at linux.intel.com>
:::::: CC: Ingo Molnar <mingo at kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 40274 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210513/8ae16378/attachment-0001.gz>


More information about the linux-arm-kernel mailing list