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:   Fri, 3 Jun 2022 06:05:03 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Paul E. McKenney" <paulmck@...nel.org>
Cc:     kbuild-all@...ts.01.org,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org
Subject: [ammarfaizi2-block:paulmck/linux-rcu/dave.2022.06.02a 56/78]
 kernel/rcu/tasks.h:1239:9: error: aggregate value used where an integer was
 expected

tree:   https://github.com/ammarfaizi2/linux-block paulmck/linux-rcu/dave.2022.06.02a
head:   2efc5c4abe4cc1259378f7c1678a93540559673c
commit: cda3200416cdef7f25546cd6249fb411c8c32079 [56/78] rcu-tasks: Merge state into .b.need_qs and atomically update
config: nios2-randconfig-r005-20220602 (https://download.01.org/0day-ci/archive/20220603/202206030549.YOUkgBlA-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.3.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/ammarfaizi2/linux-block/commit/cda3200416cdef7f25546cd6249fb411c8c32079
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block paulmck/linux-rcu/dave.2022.06.02a
        git checkout cda3200416cdef7f25546cd6249fb411c8c32079
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=nios2 SHELL=/bin/bash kernel/

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 kernel/rcu/update.c:606:
   kernel/rcu/tasks.h: In function 'rcu_trc_cmpxchg_need_qs':
>> kernel/rcu/tasks.h:1239:9: error: aggregate value used where an integer was expected
    1239 |         ret = cmpxchg(&t->trc_reader_special, trs_old, trs_new);
         |         ^~~
>> kernel/rcu/tasks.h:1239:9: error: aggregate value used where an integer was expected
   In file included from ./arch/nios2/include/generated/asm/cmpxchg.h:1,
                    from include/asm-generic/atomic.h:12,
                    from ./arch/nios2/include/generated/asm/atomic.h:1,
                    from include/linux/atomic.h:7,
                    from include/asm-generic/bitops/lock.h:5,
                    from include/asm-generic/bitops.h:31,
                    from ./arch/nios2/include/generated/asm/bitops.h:1,
                    from include/linux/bitops.h:33,
                    from include/linux/kernel.h:22,
                    from kernel/rcu/update.c:21:
   include/asm-generic/cmpxchg.h:92:10: error: cast to union type from type not present in union
      92 |         ((__typeof__(*(ptr)))__generic_cmpxchg_local((ptr), (unsigned long)(o), \
         |          ^
   include/asm-generic/cmpxchg.h:105:33: note: in expansion of macro 'generic_cmpxchg_local'
     105 | #define arch_cmpxchg_local      generic_cmpxchg_local
         |                                 ^~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/cmpxchg.h:112:33: note: in expansion of macro 'arch_cmpxchg_local'
     112 | #define arch_cmpxchg            arch_cmpxchg_local
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1916:9: note: in expansion of macro 'arch_cmpxchg'
    1916 |         arch_cmpxchg(__ai_ptr, __VA_ARGS__); \
         |         ^~~~~~~~~~~~
   kernel/rcu/tasks.h:1239:15: note: in expansion of macro 'cmpxchg'
    1239 |         ret = cmpxchg(&t->trc_reader_special, trs_old, trs_new);
         |               ^~~~~~~


vim +1239 kernel/rcu/tasks.h

  1224	
  1225	/*
  1226	 * Do a cmpxchg() on ->trc_reader_special.b.need_qs, allowing for
  1227	 * the four-byte operand-size restriction of some platforms.
  1228	 * Returns the old value, which is often ignored.
  1229	 */
  1230	u8 rcu_trc_cmpxchg_need_qs(struct task_struct *t, u8 old, u8 new)
  1231	{
  1232		union rcu_special ret;
  1233		union rcu_special trs_old = READ_ONCE(t->trc_reader_special);
  1234		union rcu_special trs_new = trs_old;
  1235	
  1236		if (trs_old.b.need_qs != old)
  1237			return trs_old.b.need_qs;
  1238		trs_new.b.need_qs = new;
> 1239		ret = cmpxchg(&t->trc_reader_special, trs_old, trs_new);
  1240		return ret.b.need_qs;
  1241	}
  1242	EXPORT_SYMBOL_GPL(rcu_trc_cmpxchg_need_qs);
  1243	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ