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:   Wed, 20 Jul 2022 03:38:17 +0800
From:   kernel test robot <lkp@...el.com>
To:     Atish Patra <atishp@...osinc.com>
Cc:     kbuild-all@...ts.01.org, Atish Patra <Atish.Patra@....com>,
        linux-kernel@...r.kernel.org
Subject: [atishp04:kvm_perf_rfc 15/24]
 arch/openrisc/include/asm/cmpxchg.h:131:24: error: call to
 '__cmpxchg_called_with_bad_pointer' declared with attribute error: Bad
 argument size for cmpxchg

tree:   https://github.com/atishp04/linux kvm_perf_rfc
head:   f7c410879b9a723ff8fbc32e4acb668b7fee423a
commit: 20c5f15d297fb5a842bb1488be2781826b65a1dd [15/24] COVER
config: openrisc-randconfig-c024-20220718 (https://download.01.org/0day-ci/archive/20220720/202207200317.VLiEV0Zq-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.1.0
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
        # https://github.com/atishp04/linux/commit/20c5f15d297fb5a842bb1488be2781826b65a1dd
        git remote add atishp04 https://github.com/atishp04/linux
        git fetch --no-tags atishp04 kvm_perf_rfc
        git checkout 20c5f15d297fb5a842bb1488be2781826b65a1dd
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=openrisc SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   In file included from arch/openrisc/include/asm/atomic.h:131,
                    from include/linux/atomic.h:7,
                    from include/asm-generic/bitops/lock.h:5,
                    from arch/openrisc/include/asm/bitops.h:41,
                    from include/linux/bitops.h:33,
                    from include/linux/kernel.h:22,
                    from lib/atomic64_test.c:12:
   arch/openrisc/include/asm/cmpxchg.h: In function '__cmpxchg':
>> arch/openrisc/include/asm/cmpxchg.h:131:24: error: call to '__cmpxchg_called_with_bad_pointer' declared with attribute error: Bad argument size for cmpxchg
     131 |                 return __cmpxchg_called_with_bad_pointer();
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/__cmpxchg_called_with_bad_pointer +131 arch/openrisc/include/asm/cmpxchg.h

489e0f802db708 Stafford Horne 2017-03-23  113  
489e0f802db708 Stafford Horne 2017-03-23  114  /*
489e0f802db708 Stafford Horne 2017-03-23  115   * This function doesn't exist, so you'll get a linker error
489e0f802db708 Stafford Horne 2017-03-23  116   * if something tries to do an invalid cmpxchg().
489e0f802db708 Stafford Horne 2017-03-23  117   */
489e0f802db708 Stafford Horne 2017-03-23  118  extern unsigned long __cmpxchg_called_with_bad_pointer(void)
489e0f802db708 Stafford Horne 2017-03-23  119  	__compiletime_error("Bad argument size for cmpxchg");
489e0f802db708 Stafford Horne 2017-03-23  120  
489e0f802db708 Stafford Horne 2017-03-23  121  static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
489e0f802db708 Stafford Horne 2017-03-23  122  		unsigned long new, int size)
489e0f802db708 Stafford Horne 2017-03-23  123  {
489e0f802db708 Stafford Horne 2017-03-23  124  	switch (size) {
489e0f802db708 Stafford Horne 2017-03-23  125  	case 1:
489e0f802db708 Stafford Horne 2017-03-23  126  	case 2:
489e0f802db708 Stafford Horne 2017-03-23  127  		return cmpxchg_small(ptr, old, new, size);
489e0f802db708 Stafford Horne 2017-03-23  128  	case 4:
489e0f802db708 Stafford Horne 2017-03-23  129  		return cmpxchg_u32(ptr, old, new);
489e0f802db708 Stafford Horne 2017-03-23  130  	default:
489e0f802db708 Stafford Horne 2017-03-23 @131  		return __cmpxchg_called_with_bad_pointer();
489e0f802db708 Stafford Horne 2017-03-23  132  	}
489e0f802db708 Stafford Horne 2017-03-23  133  }
489e0f802db708 Stafford Horne 2017-03-23  134  

:::::: The code at line 131 was first introduced by commit
:::::: 489e0f802db708c69004f64d92a3e1b70731614a openrisc: add 1 and 2 byte cmpxchg support

:::::: TO: Stafford Horne <shorne@...il.com>
:::::: CC: Stafford Horne <shorne@...il.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ