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-prev] [day] [month] [year] [list]
Message-Id: <20170506162912.GQ3956@linux.vnet.ibm.com>
Date:   Sat, 6 May 2017 09:29:12 -0700
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     kbuild test robot <fengguang.wu@...el.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org
Subject: Re: [rcu:dev.2017.05.04c 87/92]
 include/linux/spinlock_api_smp.h:160:2: note: in expansion of macro
 'local_irq_restore'

On Sat, May 06, 2017 at 09:33:37PM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2017.05.04c
> head:   b015d142a08cdd2b69b9a59dd664a14a64e383bb
> commit: 7683511c453ce2bb1b7d30fde281ecdacca04f6b [87/92] rcu: Move ktime needs to rcutiny.h and remove ktime.h from rcupdate.h
> config: sparc64-allmodconfig (attached as .config)
> compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
>         wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 7683511c453ce2bb1b7d30fde281ecdacca04f6b
>         # save the attached .config to linux build tree
>         make.cross ARCH=sparc64 
> 
> All warnings (new ones prefixed by >>):

I believe that this one is fixed by 2b51535e5469 ("rcu: Refactor #includes
from include/linux/rcupdate.h"), which includes compiler.h.

The earlier reports were -very- helpful, however!  Some day I am going
to have to get cross-compilation set up on my systems, but in the
meantime...  ;-)

								Thanx, Paul

>    In file included from arch/sparc/include/asm/irqflags.h:4:0,
>                     from include/linux/irqflags.h:15,
>                     from include/linux/rcupdate.h:36,
>                     from net/ipv4/tcp_metrics.c:1:
>    arch/sparc/include/asm/irqflags_64.h:17:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
>     static inline notrace unsigned long arch_local_save_flags(void)
>                           ^~~~~~~~
>    arch/sparc/include/asm/irqflags_64.h:29:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
>     static inline notrace void arch_local_irq_restore(unsigned long flags)
>                           ^~~~
>    arch/sparc/include/asm/irqflags_64.h:39:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
>     static inline notrace void arch_local_irq_disable(void)
>                           ^~~~
>    arch/sparc/include/asm/irqflags_64.h:49:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
>     static inline notrace void arch_local_irq_enable(void)
>                           ^~~~
>    arch/sparc/include/asm/irqflags_64.h:59:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
>     static inline notrace int arch_irqs_disabled_flags(unsigned long flags)
>                           ^~~
>    arch/sparc/include/asm/irqflags_64.h:64:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
>     static inline notrace int arch_irqs_disabled(void)
>                           ^~~
>    arch/sparc/include/asm/irqflags_64.h:69:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
>     static inline notrace unsigned long arch_local_irq_save(void)
>                           ^~~~~~~~
>    In file included from include/linux/rcupdate.h:36:0,
>                     from net/ipv4/tcp_metrics.c:1:
>    include/asm-generic/cmpxchg-local.h: In function '__cmpxchg_local_generic':
>    include/linux/irqflags.h:64:11: error: implicit declaration of function 'arch_local_irq_save' [-Werror=implicit-function-declaration]
>       flags = arch_local_irq_save();  \
>               ^
>    include/asm-generic/cmpxchg-local.h:25:2: note: in expansion of macro 'raw_local_irq_save'
>      raw_local_irq_save(flags);
>      ^~~~~~~~~~~~~~~~~~
>    include/linux/irqflags.h:69:3: error: implicit declaration of function 'arch_local_irq_restore' [-Werror=implicit-function-declaration]
>       arch_local_irq_restore(flags);  \
>       ^
>    include/asm-generic/cmpxchg-local.h:46:2: note: in expansion of macro 'raw_local_irq_restore'
>      raw_local_irq_restore(flags);
>      ^~~~~~~~~~~~~~~~~~~~~
>    include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_irq':
>    include/linux/irqflags.h:59:34: error: implicit declaration of function 'arch_local_irq_disable' [-Werror=implicit-function-declaration]
>     #define raw_local_irq_disable()  arch_local_irq_disable()
>                                      ^
>    include/linux/irqflags.h:92:7: note: in expansion of macro 'raw_local_irq_disable'
>      do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0)
>           ^~~~~~~~~~~~~~~~~~~~~
>    include/linux/spinlock_api_smp.h:126:2: note: in expansion of macro 'local_irq_disable'
>      local_irq_disable();
>      ^~~~~~~~~~~~~~~~~
>    include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock_irqrestore':
>    include/linux/irqflags.h:79:3: error: implicit declaration of function 'arch_irqs_disabled_flags' [-Werror=implicit-function-declaration]
>       arch_irqs_disabled_flags(flags); \
>       ^
>    include/linux/irqflags.h:102:7: note: in expansion of macro 'raw_irqs_disabled_flags'
>       if (raw_irqs_disabled_flags(flags)) { \
>           ^~~~~~~~~~~~~~~~~~~~~~~
> >> include/linux/spinlock_api_smp.h:160:2: note: in expansion of macro 'local_irq_restore'
>      local_irq_restore(flags);
>      ^~~~~~~~~~~~~~~~~
>    include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock_irq':
>    include/linux/irqflags.h:60:33: error: implicit declaration of function 'arch_local_irq_enable' [-Werror=implicit-function-declaration]
>     #define raw_local_irq_enable()  arch_local_irq_enable()
>                                     ^
>    include/linux/irqflags.h:90:28: note: in expansion of macro 'raw_local_irq_enable'
>      do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0)
>                                ^~~~~~~~~~~~~~~~~~~~
>    include/linux/spinlock_api_smp.h:168:2: note: in expansion of macro 'local_irq_enable'
>      local_irq_enable();
>      ^~~~~~~~~~~~~~~~
>    In file included from arch/sparc/include/asm/bug.h:20:0,
>                     from include/linux/bug.h:4,
>                     from include/linux/thread_info.h:11,
>                     from include/asm-generic/preempt.h:4,
>                     from ./arch/sparc/include/generated/asm/preempt.h:1,
>                     from include/linux/preempt.h:80,
>                     from include/linux/rcupdate.h:37,
>                     from net/ipv4/tcp_metrics.c:1:
>    include/linux/dma-mapping.h: In function 'dma_free_attrs':
>    include/linux/irqflags.h:74:11: error: implicit declaration of function 'arch_local_save_flags' [-Werror=implicit-function-declaration]
>       flags = arch_local_save_flags(); \
>               ^
>    include/asm-generic/bug.h:92:25: note: in definition of macro 'WARN_ON'
>      int __ret_warn_on = !!(condition);    \
>                             ^~~~~~~~~
>    include/linux/irqflags.h:142:3: note: in expansion of macro 'raw_local_save_flags'
>       raw_local_save_flags(_flags);  \
>       ^~~~~~~~~~~~~~~~~~~~
>    include/linux/dma-mapping.h:505:10: note: in expansion of macro 'irqs_disabled'
>      WARN_ON(irqs_disabled());
>              ^~~~~~~~~~~~~
>    cc1: some warnings being treated as errors
> --
>    In file included from arch/sparc/include/asm/irqflags.h:4:0,
>                     from include/linux/irqflags.h:15,
>                     from include/linux/rcupdate.h:36,
>                     from lib/assoc_array.c:14:
>    arch/sparc/include/asm/irqflags_64.h:17:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
>     static inline notrace unsigned long arch_local_save_flags(void)
>                           ^~~~~~~~
>    arch/sparc/include/asm/irqflags_64.h:29:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
>     static inline notrace void arch_local_irq_restore(unsigned long flags)
>                           ^~~~
>    arch/sparc/include/asm/irqflags_64.h:39:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
>     static inline notrace void arch_local_irq_disable(void)
>                           ^~~~
>    arch/sparc/include/asm/irqflags_64.h:49:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
>     static inline notrace void arch_local_irq_enable(void)
>                           ^~~~
>    arch/sparc/include/asm/irqflags_64.h:59:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
>     static inline notrace int arch_irqs_disabled_flags(unsigned long flags)
>                           ^~~
>    arch/sparc/include/asm/irqflags_64.h:64:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
>     static inline notrace int arch_irqs_disabled(void)
>                           ^~~
>    arch/sparc/include/asm/irqflags_64.h:69:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
>     static inline notrace unsigned long arch_local_irq_save(void)
>                           ^~~~~~~~
>    In file included from include/linux/rcupdate.h:36:0,
>                     from lib/assoc_array.c:14:
>    include/asm-generic/cmpxchg-local.h: In function '__cmpxchg_local_generic':
>    include/linux/irqflags.h:64:11: error: implicit declaration of function 'arch_local_irq_save' [-Werror=implicit-function-declaration]
>       flags = arch_local_irq_save();  \
>               ^
>    include/asm-generic/cmpxchg-local.h:25:2: note: in expansion of macro 'raw_local_irq_save'
>      raw_local_irq_save(flags);
>      ^~~~~~~~~~~~~~~~~~
>    include/linux/irqflags.h:69:3: error: implicit declaration of function 'arch_local_irq_restore' [-Werror=implicit-function-declaration]
>       arch_local_irq_restore(flags);  \
>       ^
>    include/asm-generic/cmpxchg-local.h:46:2: note: in expansion of macro 'raw_local_irq_restore'
>      raw_local_irq_restore(flags);
>      ^~~~~~~~~~~~~~~~~~~~~
>    In file included from include/linux/rcupdate.h:36:0,
>                     from lib/assoc_array.c:14:
>    include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_irq':
>    include/linux/irqflags.h:59:34: error: implicit declaration of function 'arch_local_irq_disable' [-Werror=implicit-function-declaration]
>     #define raw_local_irq_disable()  arch_local_irq_disable()
>                                      ^
>    include/linux/irqflags.h:92:7: note: in expansion of macro 'raw_local_irq_disable'
>      do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0)
>           ^~~~~~~~~~~~~~~~~~~~~
>    include/linux/spinlock_api_smp.h:126:2: note: in expansion of macro 'local_irq_disable'
>      local_irq_disable();
>      ^~~~~~~~~~~~~~~~~
>    include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock_irqrestore':
>    include/linux/irqflags.h:79:3: error: implicit declaration of function 'arch_irqs_disabled_flags' [-Werror=implicit-function-declaration]
>       arch_irqs_disabled_flags(flags); \
>       ^
>    include/linux/irqflags.h:102:7: note: in expansion of macro 'raw_irqs_disabled_flags'
>       if (raw_irqs_disabled_flags(flags)) { \
>           ^~~~~~~~~~~~~~~~~~~~~~~
> >> include/linux/spinlock_api_smp.h:160:2: note: in expansion of macro 'local_irq_restore'
>      local_irq_restore(flags);
>      ^~~~~~~~~~~~~~~~~
>    include/linux/spinlock_api_smp.h: In function '__raw_spin_unlock_irq':
>    include/linux/irqflags.h:60:33: error: implicit declaration of function 'arch_local_irq_enable' [-Werror=implicit-function-declaration]
>     #define raw_local_irq_enable()  arch_local_irq_enable()
>                                     ^
>    include/linux/irqflags.h:90:28: note: in expansion of macro 'raw_local_irq_enable'
>      do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0)
>                                ^~~~~~~~~~~~~~~~~~~~
>    include/linux/spinlock_api_smp.h:168:2: note: in expansion of macro 'local_irq_enable'
>      local_irq_enable();
>      ^~~~~~~~~~~~~~~~
>    cc1: some warnings being treated as errors
> 
> vim +/local_irq_restore +160 include/linux/spinlock_api_smp.h
> 
> 69d0ee73 Heiko Carstens  2009-08-31  144  }
> 69d0ee73 Heiko Carstens  2009-08-31  145  
> ae58403f Chen Gang       2013-06-19  146  #endif /* !CONFIG_GENERIC_LOCKBREAK || CONFIG_DEBUG_LOCK_ALLOC */
> 69d0ee73 Heiko Carstens  2009-08-31  147  
> 9c1721aa Thomas Gleixner 2009-12-03  148  static inline void __raw_spin_unlock(raw_spinlock_t *lock)
> 69d0ee73 Heiko Carstens  2009-08-31  149  {
> 69d0ee73 Heiko Carstens  2009-08-31  150  	spin_release(&lock->dep_map, 1, _RET_IP_);
> 9828ea9d Thomas Gleixner 2009-12-03  151  	do_raw_spin_unlock(lock);
> 69d0ee73 Heiko Carstens  2009-08-31  152  	preempt_enable();
> 69d0ee73 Heiko Carstens  2009-08-31  153  }
> 69d0ee73 Heiko Carstens  2009-08-31  154  
> 9c1721aa Thomas Gleixner 2009-12-03  155  static inline void __raw_spin_unlock_irqrestore(raw_spinlock_t *lock,
> 69d0ee73 Heiko Carstens  2009-08-31  156  					    unsigned long flags)
> 69d0ee73 Heiko Carstens  2009-08-31  157  {
> 69d0ee73 Heiko Carstens  2009-08-31  158  	spin_release(&lock->dep_map, 1, _RET_IP_);
> 9828ea9d Thomas Gleixner 2009-12-03  159  	do_raw_spin_unlock(lock);
> 69d0ee73 Heiko Carstens  2009-08-31 @160  	local_irq_restore(flags);
> 69d0ee73 Heiko Carstens  2009-08-31  161  	preempt_enable();
> 69d0ee73 Heiko Carstens  2009-08-31  162  }
> 69d0ee73 Heiko Carstens  2009-08-31  163  
> 9c1721aa Thomas Gleixner 2009-12-03  164  static inline void __raw_spin_unlock_irq(raw_spinlock_t *lock)
> 69d0ee73 Heiko Carstens  2009-08-31  165  {
> 69d0ee73 Heiko Carstens  2009-08-31  166  	spin_release(&lock->dep_map, 1, _RET_IP_);
> 9828ea9d Thomas Gleixner 2009-12-03  167  	do_raw_spin_unlock(lock);
> 69d0ee73 Heiko Carstens  2009-08-31  168  	local_irq_enable();
> 
> :::::: The code at line 160 was first introduced by commit
> :::::: 69d0ee7377eef808e34ba5542b554ec97244b871 locking: Move spinlock function bodies to header file
> 
> :::::: TO: Heiko Carstens <heiko.carstens@...ibm.com>
> :::::: CC: Ingo Molnar <mingo@...e.hu>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ