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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202007261137.CXV59i6b%lkp@intel.com>
Date:   Sun, 26 Jul 2020 11:28:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        "Paul E. McKenney" <paulmck@...nel.org>
Subject: [rcu:dev.2020.07.14a 64/73] include/linux/rculist.h:727:30: error:
 left-hand operand of comma expression has no effect

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2020.07.14a
head:   aace6daf32cce6b644083754c7be6260aae439db
commit: 93d62a873f87bf69209a5c29d62b9497888de6d6 [64/73] kvm: mmu: page_track: Fix RCU list API usage
config: i386-randconfig-a006-20200726 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        git checkout 93d62a873f87bf69209a5c29d62b9497888de6d6
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

Note: the rcu/dev.2020.07.14a HEAD aace6daf32cce6b644083754c7be6260aae439db builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/kvm_host.h:12,
                    from arch/x86/kvm/mmu/page_track.c:14:
   arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_write':
>> include/linux/rculist.h:727:30: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
     727 |  for (__list_check_srcu(cond),     \
         |                              ^
   arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
     232 |  hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_flush_slot':
>> include/linux/rculist.h:727:30: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
     727 |  for (__list_check_srcu(cond),     \
         |                              ^
   arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
     258 |  hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors

vim +727 include/linux/rculist.h

82524746c27fa41 Franck Bui-Huu          2008-05-12  688  
1cc523271ef0b63 stephen hemminger       2010-02-22  689  #define __hlist_for_each_rcu(pos, head)				\
67bdbffd696f29a Arnd Bergmann           2010-02-25  690  	for (pos = rcu_dereference(hlist_first_rcu(head));	\
75d65a425c0163d Linus Torvalds          2011-05-19  691  	     pos;						\
67bdbffd696f29a Arnd Bergmann           2010-02-25  692  	     pos = rcu_dereference(hlist_next_rcu(pos)))
1cc523271ef0b63 stephen hemminger       2010-02-22  693  
82524746c27fa41 Franck Bui-Huu          2008-05-12  694  /**
82524746c27fa41 Franck Bui-Huu          2008-05-12  695   * hlist_for_each_entry_rcu - iterate over rcu list of given type
b67bfe0d42cac56 Sasha Levin             2013-02-27  696   * @pos:	the type * to use as a loop cursor.
82524746c27fa41 Franck Bui-Huu          2008-05-12  697   * @head:	the head for your list.
82524746c27fa41 Franck Bui-Huu          2008-05-12  698   * @member:	the name of the hlist_node within the struct.
ddc465936643108 Jonathan Neuschäfer     2020-03-05  699   * @cond:	optional lockdep expression if called from non-RCU protection.
82524746c27fa41 Franck Bui-Huu          2008-05-12  700   *
82524746c27fa41 Franck Bui-Huu          2008-05-12  701   * This list-traversal primitive may safely run concurrently with
82524746c27fa41 Franck Bui-Huu          2008-05-12  702   * the _rcu list-mutation primitives such as hlist_add_head_rcu()
82524746c27fa41 Franck Bui-Huu          2008-05-12  703   * as long as the traversal is guarded by rcu_read_lock().
82524746c27fa41 Franck Bui-Huu          2008-05-12  704   */
28875945ba98d1b Joel Fernandes (Google  2019-07-16  705) #define hlist_for_each_entry_rcu(pos, head, member, cond...)		\
28875945ba98d1b Joel Fernandes (Google  2019-07-16  706) 	for (__list_check_rcu(dummy, ## cond, 0),			\
28875945ba98d1b Joel Fernandes (Google  2019-07-16  707) 	     pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
b67bfe0d42cac56 Sasha Levin             2013-02-27  708  			typeof(*(pos)), member);			\
b67bfe0d42cac56 Sasha Levin             2013-02-27  709  		pos;							\
b67bfe0d42cac56 Sasha Levin             2013-02-27  710  		pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu(\
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  711  			&(pos)->member)), typeof(*(pos)), member))
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  712  
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  713  /**
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  714   * hlist_for_each_entry_srcu - iterate over rcu list of given type
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  715   * @pos:	the type * to use as a loop cursor.
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  716   * @head:	the head for your list.
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  717   * @member:	the name of the hlist_node within the struct.
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  718   * @cond:	lockdep expression for the lock required to traverse the list.
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  719   *
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  720   * This list-traversal primitive may safely run concurrently with
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  721   * the _rcu list-mutation primitives such as hlist_add_head_rcu()
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  722   * as long as the traversal is guarded by srcu_read_lock().
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  723   * The lockdep expression srcu_read_lock_held() can be passed as the
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  724   * cond argument from read side.
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  725   */
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  726  #define hlist_for_each_entry_srcu(pos, head, member, cond)		\
bd4444c47de914a Madhuparna Bhowmik      2020-07-12 @727  	for (__list_check_srcu(cond),					\
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  728  	     pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  729  			typeof(*(pos)), member);			\
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  730  		pos;							\
bd4444c47de914a Madhuparna Bhowmik      2020-07-12  731  		pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu(\
b67bfe0d42cac56 Sasha Levin             2013-02-27  732  			&(pos)->member)), typeof(*(pos)), member))
82524746c27fa41 Franck Bui-Huu          2008-05-12  733  

:::::: The code at line 727 was first introduced by commit
:::::: bd4444c47de914a27b650f029d46efbbb6809765 rculist : Introduce list/hlist_for_each_entry_srcu() macros

:::::: TO: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
:::::: CC: Paul E. McKenney <paulmck@...nel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (31919 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ