lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 21 Apr 2022 14:31:58 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [mingo-tip:sched/headers 2352/2579]
 arch/powerpc/include/asm/cmpxchg.h:80:1: error: use of undeclared identifier
 'BITS_PER_BYTE'

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head:   49e1ec6c70a6eb4b7de9250a455b8b63eb42afbe
commit: 021ec7b4f3ec8280761a254fd8241779fd7b5bfb [2352/2579] headers/deps: bvec: Reduce <linux/bvec.h> dependencies, remove <linux/bvec_api.h> inclusion
config: powerpc64-randconfig-r015-20220420 (https://download.01.org/0day-ci/archive/20220420/202204201949.xIif2NO7-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project bac6cd5bf85669e3376610cfc4c4f9ca015e7b9b)
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 powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=021ec7b4f3ec8280761a254fd8241779fd7b5bfb
        git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
        git fetch --no-tags mingo-tip sched/headers
        git checkout 021ec7b4f3ec8280761a254fd8241779fd7b5bfb
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc prepare

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

All errors (new ones prefixed by >>):

   In file included from kernel/bounds.c:12:
   In file included from include/linux/page-flags.h:9:
   In file included from include/linux/jump_label.h:257:
   In file included from include/linux/atomic_api.h:8:
   In file included from arch/powerpc/include/asm/atomic.h:11:
>> arch/powerpc/include/asm/cmpxchg.h:80:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   XCHG_GEN(u8, _local, "memory");
   ^
   arch/powerpc/include/asm/cmpxchg.h:22:11: note: expanded from macro 'XCHG_GEN'
           bitoff = BITOFF_CAL(sizeof(type), off);                 \
                    ^
   arch/powerpc/include/asm/cmpxchg.h:11:61: note: expanded from macro 'BITOFF_CAL'
   #define BITOFF_CAL(size, off)   ((sizeof(u32) - size - off) * BITS_PER_BYTE)
                                                                 ^
   arch/powerpc/include/asm/cmpxchg.h:81:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   XCHG_GEN(u8, _relaxed, "cc");
   ^
   arch/powerpc/include/asm/cmpxchg.h:22:11: note: expanded from macro 'XCHG_GEN'
           bitoff = BITOFF_CAL(sizeof(type), off);                 \
                    ^
   arch/powerpc/include/asm/cmpxchg.h:11:61: note: expanded from macro 'BITOFF_CAL'
   #define BITOFF_CAL(size, off)   ((sizeof(u32) - size - off) * BITS_PER_BYTE)
                                                                 ^
   arch/powerpc/include/asm/cmpxchg.h:82:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   XCHG_GEN(u16, _local, "memory");
   ^
   arch/powerpc/include/asm/cmpxchg.h:22:11: note: expanded from macro 'XCHG_GEN'
           bitoff = BITOFF_CAL(sizeof(type), off);                 \
                    ^
   arch/powerpc/include/asm/cmpxchg.h:11:61: note: expanded from macro 'BITOFF_CAL'
   #define BITOFF_CAL(size, off)   ((sizeof(u32) - size - off) * BITS_PER_BYTE)
                                                                 ^
   arch/powerpc/include/asm/cmpxchg.h:83:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   XCHG_GEN(u16, _relaxed, "cc");
   ^
   arch/powerpc/include/asm/cmpxchg.h:22:11: note: expanded from macro 'XCHG_GEN'
           bitoff = BITOFF_CAL(sizeof(type), off);                 \
                    ^
   arch/powerpc/include/asm/cmpxchg.h:11:61: note: expanded from macro 'BITOFF_CAL'
   #define BITOFF_CAL(size, off)   ((sizeof(u32) - size - off) * BITS_PER_BYTE)
                                                                 ^
   arch/powerpc/include/asm/cmpxchg.h:206:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   CMPXCHG_GEN(u8, , PPC_ATOMIC_ENTRY_BARRIER, PPC_ATOMIC_EXIT_BARRIER, "memory");
   ^
   arch/powerpc/include/asm/cmpxchg.h:47:11: note: expanded from macro 'CMPXCHG_GEN'
           bitoff = BITOFF_CAL(sizeof(type), off);                 \
                    ^
   arch/powerpc/include/asm/cmpxchg.h:11:61: note: expanded from macro 'BITOFF_CAL'
   #define BITOFF_CAL(size, off)   ((sizeof(u32) - size - off) * BITS_PER_BYTE)
                                                                 ^
   arch/powerpc/include/asm/cmpxchg.h:207:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   CMPXCHG_GEN(u8, _local, , , "memory");
   ^
   arch/powerpc/include/asm/cmpxchg.h:47:11: note: expanded from macro 'CMPXCHG_GEN'
           bitoff = BITOFF_CAL(sizeof(type), off);                 \
                    ^
   arch/powerpc/include/asm/cmpxchg.h:11:61: note: expanded from macro 'BITOFF_CAL'
   #define BITOFF_CAL(size, off)   ((sizeof(u32) - size - off) * BITS_PER_BYTE)
                                                                 ^
   arch/powerpc/include/asm/cmpxchg.h:208:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   CMPXCHG_GEN(u8, _acquire, , PPC_ACQUIRE_BARRIER, "memory");
   ^
   arch/powerpc/include/asm/cmpxchg.h:47:11: note: expanded from macro 'CMPXCHG_GEN'
           bitoff = BITOFF_CAL(sizeof(type), off);                 \
                    ^
   arch/powerpc/include/asm/cmpxchg.h:11:61: note: expanded from macro 'BITOFF_CAL'
   #define BITOFF_CAL(size, off)   ((sizeof(u32) - size - off) * BITS_PER_BYTE)
                                                                 ^
   arch/powerpc/include/asm/cmpxchg.h:209:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   CMPXCHG_GEN(u8, _relaxed, , , "cc");
   ^
   arch/powerpc/include/asm/cmpxchg.h:47:11: note: expanded from macro 'CMPXCHG_GEN'
           bitoff = BITOFF_CAL(sizeof(type), off);                 \
                    ^
   arch/powerpc/include/asm/cmpxchg.h:11:61: note: expanded from macro 'BITOFF_CAL'
   #define BITOFF_CAL(size, off)   ((sizeof(u32) - size - off) * BITS_PER_BYTE)
                                                                 ^
   arch/powerpc/include/asm/cmpxchg.h:210:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   CMPXCHG_GEN(u16, , PPC_ATOMIC_ENTRY_BARRIER, PPC_ATOMIC_EXIT_BARRIER, "memory");
   ^
   arch/powerpc/include/asm/cmpxchg.h:47:11: note: expanded from macro 'CMPXCHG_GEN'
           bitoff = BITOFF_CAL(sizeof(type), off);                 \
                    ^
   arch/powerpc/include/asm/cmpxchg.h:11:61: note: expanded from macro 'BITOFF_CAL'
   #define BITOFF_CAL(size, off)   ((sizeof(u32) - size - off) * BITS_PER_BYTE)
                                                                 ^
   arch/powerpc/include/asm/cmpxchg.h:211:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   CMPXCHG_GEN(u16, _local, , , "memory");
   ^
   arch/powerpc/include/asm/cmpxchg.h:47:11: note: expanded from macro 'CMPXCHG_GEN'
           bitoff = BITOFF_CAL(sizeof(type), off);                 \
                    ^
   arch/powerpc/include/asm/cmpxchg.h:11:61: note: expanded from macro 'BITOFF_CAL'
   #define BITOFF_CAL(size, off)   ((sizeof(u32) - size - off) * BITS_PER_BYTE)
                                                                 ^
   arch/powerpc/include/asm/cmpxchg.h:212:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   CMPXCHG_GEN(u16, _acquire, , PPC_ACQUIRE_BARRIER, "memory");
   ^
   arch/powerpc/include/asm/cmpxchg.h:47:11: note: expanded from macro 'CMPXCHG_GEN'
           bitoff = BITOFF_CAL(sizeof(type), off);                 \
                    ^
   arch/powerpc/include/asm/cmpxchg.h:11:61: note: expanded from macro 'BITOFF_CAL'
   #define BITOFF_CAL(size, off)   ((sizeof(u32) - size - off) * BITS_PER_BYTE)
                                                                 ^
   arch/powerpc/include/asm/cmpxchg.h:213:1: error: use of undeclared identifier 'BITS_PER_BYTE'
   CMPXCHG_GEN(u16, _relaxed, , , "cc");


vim +/BITS_PER_BYTE +80 arch/powerpc/include/asm/cmpxchg.h

d0563a1297e234 Pan Xinhui    2016-04-27  72  
ae3a197e3d0bfe David Howells 2012-03-28  73  /*
ae3a197e3d0bfe David Howells 2012-03-28  74   * Atomic exchange
ae3a197e3d0bfe David Howells 2012-03-28  75   *
26760fc19a7e66 Boqun Feng    2015-12-15  76   * Changes the memory location '*p' to be val and returns
ae3a197e3d0bfe David Howells 2012-03-28  77   * the previous value stored there.
ae3a197e3d0bfe David Howells 2012-03-28  78   */
26760fc19a7e66 Boqun Feng    2015-12-15  79  
d0563a1297e234 Pan Xinhui    2016-04-27 @80  XCHG_GEN(u8, _local, "memory");
d0563a1297e234 Pan Xinhui    2016-04-27  81  XCHG_GEN(u8, _relaxed, "cc");
d0563a1297e234 Pan Xinhui    2016-04-27  82  XCHG_GEN(u16, _local, "memory");
d0563a1297e234 Pan Xinhui    2016-04-27  83  XCHG_GEN(u16, _relaxed, "cc");
d0563a1297e234 Pan Xinhui    2016-04-27  84  

:::::: The code at line 80 was first introduced by commit
:::::: d0563a1297e234ed37f6b51c2e9321accebd1839 powerpc: Implement {cmp}xchg for u8 and u16

:::::: TO: Pan Xinhui <xinhui.pan@...ux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@...erman.id.au>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists