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: <202007300207.bfb4aRER%lkp@intel.com>
Date:   Thu, 30 Jul 2020 02:05:18 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Ahmed S. Darwish" <a.darwish@...utronix.de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        x86@...nel.org, Peter Zijlstra <peterz@...radead.org>
Subject: [tip:locking/core 9/30] arch/mips/include/asm/smp.h:28:19: error:
 static declaration of 'raw_smp_processor_id' follows non-static declaration

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head:   b5e6a027bd327daa679ca55182a920659e2cbb90
commit: 859247d39fb008ea812e8f0c398a58a20c12899e [9/30] seqlock: lockdep assert non-preemptibility on seqcount_t write
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.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
        git checkout 859247d39fb008ea812e8f0c398a58a20c12899e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

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

All errors (new ones prefixed by >>):

   In file included from arch/mips/include/asm/bug.h:42,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/mips/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:15,
                    from include/linux/time.h:6,
                    from include/linux/compat.h:10,
                    from arch/mips/kernel/asm-offsets.c:12:
   include/linux/seqlock.h: In function 'write_seqcount_begin_nested':
   include/asm-generic/percpu.h:31:40: error: implicit declaration of function 'raw_smp_processor_id' [-Werror=implicit-function-declaration]
      31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
         |                                        ^~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
     144 |  int __ret_warn_once = !!(condition);   \
         |                           ^~~~~~~~~
   include/linux/compiler.h:380:2: note: in expansion of macro '__compiletime_assert'
     380 |  __compiletime_assert(condition, msg, prefix, suffix)
         |  ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert'
     392 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:405:2: note: in expansion of macro 'compiletime_assert'
     405 |  compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:405:21: note: in expansion of macro '__native_word'
     405 |  compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
         |                     ^~~~~~~~~~~~~
   include/linux/compiler.h:291:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
     291 |  compiletime_assert_rwonce_type(x);    \
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/percpu.h:119:10: note: in expansion of macro 'READ_ONCE'
     119 |  __ret = READ_ONCE(*raw_cpu_ptr(&(pcp)));   \
         |          ^~~~~~~~~
   include/linux/percpu-defs.h:231:2: note: in expansion of macro 'RELOC_HIDE'
     231 |  RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
         |  ^~~~~~~~~~
   include/asm-generic/percpu.h:44:31: note: in expansion of macro 'SHIFT_PERCPU_PTR'
      44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
         |                               ^~~~~~~~~~~~~~~~
   include/asm-generic/percpu.h:31:25: note: in expansion of macro 'per_cpu_offset'
      31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
         |                         ^~~~~~~~~~~~~~
   include/asm-generic/percpu.h:44:53: note: in expansion of macro '__my_cpu_offset'
      44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
         |                                                     ^~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr'
     242 |  arch_raw_cpu_ptr(ptr);      \
         |  ^~~~~~~~~~~~~~~~
   include/asm-generic/percpu.h:119:21: note: in expansion of macro 'raw_cpu_ptr'
     119 |  __ret = READ_ONCE(*raw_cpu_ptr(&(pcp)));   \
         |                     ^~~~~~~~~~~
   include/asm-generic/percpu.h:138:11: note: in expansion of macro '__this_cpu_generic_read_nopreempt'
     138 |   __ret = __this_cpu_generic_read_nopreempt(pcp);  \
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/percpu.h:320:31: note: in expansion of macro 'this_cpu_generic_read'
     320 | #define this_cpu_read_1(pcp)  this_cpu_generic_read(pcp)
         |                               ^~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:321:23: note: in expansion of macro 'this_cpu_read_1'
     321 |  case 1: pscr_ret__ = stem##1(variable); break;   \
         |                       ^~~~
   include/linux/percpu-defs.h:507:29: note: in expansion of macro '__pcpu_size_call_return'
     507 | #define this_cpu_read(pcp)  __pcpu_size_call_return(this_cpu_read_, pcp)
         |                             ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/lockdep.h:565:9: note: in expansion of macro 'this_cpu_read'
     565 |         this_cpu_read(hardirqs_enabled)));  \
         |         ^~~~~~~~~~~~~
   include/linux/seqlock.h:285:2: note: in expansion of macro 'lockdep_assert_preemption_disabled'
     285 |  lockdep_assert_preemption_disabled();
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/smp.h:82,
                    from arch/mips/include/asm/cpu-type.h:12,
                    from arch/mips/include/asm/timex.h:19,
                    from include/linux/timex.h:65,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:74,
                    from include/linux/compat.h:10,
                    from arch/mips/kernel/asm-offsets.c:12:
   arch/mips/include/asm/smp.h: At top level:
>> arch/mips/include/asm/smp.h:28:19: error: static declaration of 'raw_smp_processor_id' follows non-static declaration
      28 | static inline int raw_smp_processor_id(void)
         |                   ^~~~~~~~~~~~~~~~~~~~
   In file included from arch/mips/include/asm/bug.h:42,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/mips/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:15,
                    from include/linux/time.h:6,
                    from include/linux/compat.h:10,
                    from arch/mips/kernel/asm-offsets.c:12:
   include/asm-generic/percpu.h:31:40: note: previous implicit declaration of 'raw_smp_processor_id' was here
      31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
         |                                        ^~~~~~~~~~~~~~~~~~~~
   include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
     144 |  int __ret_warn_once = !!(condition);   \
         |                           ^~~~~~~~~
   include/linux/compiler.h:380:2: note: in expansion of macro '__compiletime_assert'
     380 |  __compiletime_assert(condition, msg, prefix, suffix)
         |  ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert'
     392 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:405:2: note: in expansion of macro 'compiletime_assert'
     405 |  compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:405:21: note: in expansion of macro '__native_word'
     405 |  compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
         |                     ^~~~~~~~~~~~~
   include/linux/compiler.h:291:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
     291 |  compiletime_assert_rwonce_type(x);    \
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/percpu.h:119:10: note: in expansion of macro 'READ_ONCE'
     119 |  __ret = READ_ONCE(*raw_cpu_ptr(&(pcp)));   \
         |          ^~~~~~~~~
   include/linux/percpu-defs.h:231:2: note: in expansion of macro 'RELOC_HIDE'
     231 |  RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
         |  ^~~~~~~~~~
   include/asm-generic/percpu.h:44:31: note: in expansion of macro 'SHIFT_PERCPU_PTR'
      44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
         |                               ^~~~~~~~~~~~~~~~
   include/asm-generic/percpu.h:31:25: note: in expansion of macro 'per_cpu_offset'
      31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
         |                         ^~~~~~~~~~~~~~
   include/asm-generic/percpu.h:44:53: note: in expansion of macro '__my_cpu_offset'
      44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
         |                                                     ^~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr'
     242 |  arch_raw_cpu_ptr(ptr);      \
         |  ^~~~~~~~~~~~~~~~
   include/asm-generic/percpu.h:119:21: note: in expansion of macro 'raw_cpu_ptr'
     119 |  __ret = READ_ONCE(*raw_cpu_ptr(&(pcp)));   \
         |                     ^~~~~~~~~~~
   include/asm-generic/percpu.h:138:11: note: in expansion of macro '__this_cpu_generic_read_nopreempt'
     138 |   __ret = __this_cpu_generic_read_nopreempt(pcp);  \
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/percpu.h:320:31: note: in expansion of macro 'this_cpu_generic_read'
     320 | #define this_cpu_read_1(pcp)  this_cpu_generic_read(pcp)
         |                               ^~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:321:23: note: in expansion of macro 'this_cpu_read_1'
     321 |  case 1: pscr_ret__ = stem##1(variable); break;   \
         |                       ^~~~
   include/linux/percpu-defs.h:507:29: note: in expansion of macro '__pcpu_size_call_return'
     507 | #define this_cpu_read(pcp)  __pcpu_size_call_return(this_cpu_read_, pcp)
         |                             ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/lockdep.h:565:9: note: in expansion of macro 'this_cpu_read'
     565 |         this_cpu_read(hardirqs_enabled)));  \
         |         ^~~~~~~~~~~~~
   include/linux/seqlock.h:285:2: note: in expansion of macro 'lockdep_assert_preemption_disabled'
     285 |  lockdep_assert_preemption_disabled();
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for 'output_ptreg_defines' [-Wmissing-prototypes]
      26 | void output_ptreg_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for 'output_task_defines' [-Wmissing-prototypes]
      78 | void output_task_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:93:6: warning: no previous prototype for 'output_thread_info_defines' [-Wmissing-prototypes]
      93 | void output_thread_info_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:110:6: warning: no previous prototype for 'output_thread_defines' [-Wmissing-prototypes]
     110 | void output_thread_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:138:6: warning: no previous prototype for 'output_thread_fpu_defines' [-Wmissing-prototypes]
     138 | void output_thread_fpu_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:181:6: warning: no previous prototype for 'output_mm_defines' [-Wmissing-prototypes]
     181 | void output_mm_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:220:6: warning: no previous prototype for 'output_sc_defines' [-Wmissing-prototypes]
     220 | void output_sc_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:255:6: warning: no previous prototype for 'output_signal_defined' [-Wmissing-prototypes]
     255 | void output_signal_defined(void)
         |      ^~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/asm-offsets.c:322:6: warning: no previous prototype for 'output_pbe_defines' [-Wmissing-prototypes]
     322 | void output_pbe_defines(void)
         |      ^~~~~~~~~~~~~~~~~~

vim +/raw_smp_processor_id +28 arch/mips/include/asm/smp.h

0ab7aefc4d43a6d include/asm-mips/smp.h      Ralf Baechle   2007-03-02  27  
351fdddd366245c arch/mips/include/asm/smp.h Paul Burton    2017-12-12 @28  static inline int raw_smp_processor_id(void)
351fdddd366245c arch/mips/include/asm/smp.h Paul Burton    2017-12-12  29  {
351fdddd366245c arch/mips/include/asm/smp.h Paul Burton    2017-12-12  30  #if defined(__VDSO__)
351fdddd366245c arch/mips/include/asm/smp.h Paul Burton    2017-12-12  31  	extern int vdso_smp_processor_id(void)
351fdddd366245c arch/mips/include/asm/smp.h Paul Burton    2017-12-12  32  		__compiletime_error("VDSO should not call smp_processor_id()");
351fdddd366245c arch/mips/include/asm/smp.h Paul Burton    2017-12-12  33  	return vdso_smp_processor_id();
351fdddd366245c arch/mips/include/asm/smp.h Paul Burton    2017-12-12  34  #else
351fdddd366245c arch/mips/include/asm/smp.h Paul Burton    2017-12-12  35  	return current_thread_info()->cpu;
351fdddd366245c arch/mips/include/asm/smp.h Paul Burton    2017-12-12  36  #endif
351fdddd366245c arch/mips/include/asm/smp.h Paul Burton    2017-12-12  37  }
351fdddd366245c arch/mips/include/asm/smp.h Paul Burton    2017-12-12  38  #define raw_smp_processor_id raw_smp_processor_id
^1da177e4c3f415 include/asm-mips/smp.h      Linus Torvalds 2005-04-16  39  

:::::: The code at line 28 was first introduced by commit
:::::: 351fdddd366245c0fb4636f32edfb4198c8d6b8c MIPS: VDSO: Prevent use of smp_processor_id()

:::::: TO: Paul Burton <paul.burton@...s.com>
:::::: CC: Paul Burton <paul.burton@...s.com>

---
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" (67053 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ