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, 10 Apr 2019 18:50:35 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Waiman Long <longman@...hat.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        tipbuild@...or.com, Ingo Molnar <mingo@...nel.org>
Subject: [tip:WIP.locking/core 28/29] kernel/locking/rwsem.h:335:9: error:
 implicit declaration of function 'is_rwsem_owner_reader'; did you mean
 'rwsem_owner_count'?

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.locking/core
head:   5c587ed687faed2eb0afdd669ddd167d0d940236
commit: 0d8bd477cd9602fb18bee6e3dae41c5fda9cebab [28/29] locking/rwsem: Merge owner into count on x86-64
config: riscv-tinyconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 0d8bd477cd9602fb18bee6e3dae41c5fda9cebab
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=riscv 

All errors (new ones prefixed by >>):

   In file included from include/linux/kernel.h:11,
                    from kernel/locking/rwsem.c:9:
   kernel/locking/rwsem.h: In function 'rwsem_set_nonspinnable':
   kernel/locking/rwsem.h:333:34: error: 'struct rw_semaphore' has no member named 'owner'
     long owner = (long)READ_ONCE(sem->owner);
                                     ^~
   include/linux/compiler.h:255:17: note: in definition of macro '__READ_ONCE'
     union { typeof(x) __val; char __c[1]; } __u;   \
                    ^
   kernel/locking/rwsem.h:333:21: note: in expansion of macro 'READ_ONCE'
     long owner = (long)READ_ONCE(sem->owner);
                        ^~~~~~~~~
   kernel/locking/rwsem.h:333:34: error: 'struct rw_semaphore' has no member named 'owner'
     long owner = (long)READ_ONCE(sem->owner);
                                     ^~
   include/linux/compiler.h:257:22: note: in definition of macro '__READ_ONCE'
      __read_once_size(&(x), __u.__c, sizeof(x));  \
                         ^
   kernel/locking/rwsem.h:333:21: note: in expansion of macro 'READ_ONCE'
     long owner = (long)READ_ONCE(sem->owner);
                        ^~~~~~~~~
   kernel/locking/rwsem.h:333:34: error: 'struct rw_semaphore' has no member named 'owner'
     long owner = (long)READ_ONCE(sem->owner);
                                     ^~
   include/linux/compiler.h:257:42: note: in definition of macro '__READ_ONCE'
      __read_once_size(&(x), __u.__c, sizeof(x));  \
                                             ^
   kernel/locking/rwsem.h:333:21: note: in expansion of macro 'READ_ONCE'
     long owner = (long)READ_ONCE(sem->owner);
                        ^~~~~~~~~
   kernel/locking/rwsem.h:333:34: error: 'struct rw_semaphore' has no member named 'owner'
     long owner = (long)READ_ONCE(sem->owner);
                                     ^~
   include/linux/compiler.h:259:30: note: in definition of macro '__READ_ONCE'
      __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
                                 ^
   kernel/locking/rwsem.h:333:21: note: in expansion of macro 'READ_ONCE'
     long owner = (long)READ_ONCE(sem->owner);
                        ^~~~~~~~~
   kernel/locking/rwsem.h:333:34: error: 'struct rw_semaphore' has no member named 'owner'
     long owner = (long)READ_ONCE(sem->owner);
                                     ^~
   include/linux/compiler.h:259:50: note: in definition of macro '__READ_ONCE'
      __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
                                                     ^
   kernel/locking/rwsem.h:333:21: note: in expansion of macro 'READ_ONCE'
     long owner = (long)READ_ONCE(sem->owner);
                        ^~~~~~~~~
   In file included from kernel/locking/rwsem.c:16:
>> kernel/locking/rwsem.h:335:9: error: implicit declaration of function 'is_rwsem_owner_reader'; did you mean 'rwsem_owner_count'? [-Werror=implicit-function-declaration]
     while (is_rwsem_owner_reader((struct task_struct *)owner)) {
            ^~~~~~~~~~~~~~~~~~~~~
            rwsem_owner_count
   kernel/locking/rwsem.h:336:8: error: implicit declaration of function 'is_rwsem_owner_spinnable'; did you mean 'rwsem_set_nonspinnable'? [-Werror=implicit-function-declaration]
      if (!is_rwsem_owner_spinnable((struct task_struct *)owner))
           ^~~~~~~~~~~~~~~~~~~~~~~~
           rwsem_set_nonspinnable
   In file included from arch/riscv/include/asm/atomic.h:23,
                    from include/linux/atomic.h:7,
                    from include/linux/rcupdate.h:25,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from kernel/locking/rwsem.c:10:
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:350:15: note: in definition of macro 'cmpxchg'
     __typeof__(*(ptr)) _o_ = (o);     \
                  ^~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:351:15: note: in definition of macro 'cmpxchg'
     __typeof__(*(ptr)) _n_ = (n);     \
                  ^~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:352:16: note: in definition of macro 'cmpxchg'
     (__typeof__(*(ptr))) __cmpxchg((ptr),    \
                   ^~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:312:13: note: in definition of macro '__cmpxchg'
     __typeof__(ptr) __ptr = (ptr);     \
                ^~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:312:27: note: in definition of macro '__cmpxchg'
     __typeof__(ptr) __ptr = (ptr);     \
                              ^~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:313:15: note: in definition of macro '__cmpxchg'
     __typeof__(*(ptr)) __old = (old);    \
                  ^~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:314:15: note: in definition of macro '__cmpxchg'
     __typeof__(*(ptr)) __new = (new);    \
                  ^~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:315:15: note: in definition of macro '__cmpxchg'
     __typeof__(*(ptr)) __ret;     \
                  ^~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   kernel/locking/rwsem.h:338:31: error: 'struct rw_semaphore' has no member named 'owner'
      owner = cmpxchg((long *)&sem->owner, owner,
                                  ^~
   arch/riscv/include/asm/cmpxchg.h:317:10: note: in definition of macro '__cmpxchg'
     switch (size) {       \
             ^~~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   arch/riscv/include/asm/cmpxchg.h:326:41: error: invalid type argument of unary '*' (have 'int')
       : "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \
                                            ^~~~~~
   arch/riscv/include/asm/cmpxchg.h:352:23: note: in expansion of macro '__cmpxchg'
     (__typeof__(*(ptr))) __cmpxchg((ptr),    \
                          ^~~~~~~~~
   kernel/locking/rwsem.h:338:11: note: in expansion of macro 'cmpxchg'
      owner = cmpxchg((long *)&sem->owner, owner,
              ^~~~~~~
   arch/riscv/include/asm/cmpxchg.h:338:41: error: invalid type argument of unary '*' (have 'int')
       : "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \
                                            ^~~~~~
   arch/riscv/include/asm/cmpxchg.h:352:23: note: in expansion of macro '__cmpxchg'
     (__typeof__(*(ptr))) __cmpxchg((ptr),    \

vim +335 kernel/locking/rwsem.h

12a30a7f Waiman Long 2019-04-04  326  
46ad0840 Waiman Long 2019-03-22  327  /*
2d6f2f61 Waiman Long 2019-04-05  328   * Set the RWSEM_ANONYMOUSLY_OWNED flag if the RWSEM_READER_OWNED flag
2d6f2f61 Waiman Long 2019-04-05  329   * remains set. Otherwise, the operation will be aborted.
2d6f2f61 Waiman Long 2019-04-05  330   */
2d6f2f61 Waiman Long 2019-04-05  331  static inline void rwsem_set_nonspinnable(struct rw_semaphore *sem)
2d6f2f61 Waiman Long 2019-04-05  332  {
2d6f2f61 Waiman Long 2019-04-05 @333  	long owner = (long)READ_ONCE(sem->owner);
2d6f2f61 Waiman Long 2019-04-05  334  
2d6f2f61 Waiman Long 2019-04-05 @335  	while (is_rwsem_owner_reader((struct task_struct *)owner)) {
2d6f2f61 Waiman Long 2019-04-05  336  		if (!is_rwsem_owner_spinnable((struct task_struct *)owner))
2d6f2f61 Waiman Long 2019-04-05  337  			break;
2d6f2f61 Waiman Long 2019-04-05  338  		owner = cmpxchg((long *)&sem->owner, owner,
2d6f2f61 Waiman Long 2019-04-05  339  				owner | RWSEM_ANONYMOUSLY_OWNED);
2d6f2f61 Waiman Long 2019-04-05  340  	}
2d6f2f61 Waiman Long 2019-04-05  341  }
2d6f2f61 Waiman Long 2019-04-05  342  

:::::: The code at line 335 was first introduced by commit
:::::: 2d6f2f61367455179ee140b3d4af6974d3e5d06d locking/rwsem: Enable time-based spinning on reader-owned rwsem

:::::: TO: Waiman Long <longman@...hat.com>
:::::: CC: Ingo Molnar <mingo@...nel.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

Powered by blists - more mailing lists