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]
Message-ID: <202101281034.2yevf7Rg-lkp@intel.com>
Date:   Thu, 28 Jan 2021 10:29:58 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alejandro Colomar <alx.manpages@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        x86@...nel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: [tip:locking/core 1/3] include/linux/syscalls.h:238:18: error:
 conflicting types for 'sys_futex'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head:   59ea5f1508e15cecddd8e2ca828f7962ea37adab
commit: 3018a08401300005536817507dd14c2a7c4ffa69 [1/3] futex: Change utime parameter to be 'const ... *'
config: nios2-3c120_defconfig (attached as .config)
compiler: nios2-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
        # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=3018a08401300005536817507dd14c2a7c4ffa69
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip locking/core
        git checkout 3018a08401300005536817507dd14c2a7c4ffa69
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

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 kernel/futex.c:37:
>> include/linux/syscalls.h:238:18: error: conflicting types for 'sys_futex'
     238 |  asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
         |                  ^~~
   include/linux/syscalls.h:224:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     224 |  __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:218:36: note: in expansion of macro 'SYSCALL_DEFINEx'
     218 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
         |                                    ^~~~~~~~~~~~~~~
   kernel/futex.c:3792:1: note: in expansion of macro 'SYSCALL_DEFINE6'
    3792 | SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val,
         | ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:585:17: note: previous declaration of 'sys_futex' was here
     585 | asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val,
         |                 ^~~~~~~~~
>> include/linux/syscalls.h:238:18: error: conflicting types for 'sys_futex_time32'
     238 |  asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
         |                  ^~~
   include/linux/syscalls.h:224:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     224 |  __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |  ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:218:36: note: in expansion of macro 'SYSCALL_DEFINEx'
     218 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
         |                                    ^~~~~~~~~~~~~~~
   kernel/futex.c:3988:1: note: in expansion of macro 'SYSCALL_DEFINE6'
    3988 | SYSCALL_DEFINE6(futex_time32, u32 __user *, uaddr, int, op, u32, val,
         | ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:588:17: note: previous declaration of 'sys_futex_time32' was here
     588 | asmlinkage long sys_futex_time32(u32 __user *uaddr, int op, u32 val,
         |                 ^~~~~~~~~~~~~~~~


vim +/sys_futex +238 include/linux/syscalls.h

bed1ffca022cc876 Frederic Weisbecker 2009-03-13  212  
6c5979631b4b03c9 Heiko Carstens      2009-02-11  213  #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)
6c5979631b4b03c9 Heiko Carstens      2009-02-11  214  #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
6c5979631b4b03c9 Heiko Carstens      2009-02-11  215  #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
6c5979631b4b03c9 Heiko Carstens      2009-02-11  216  #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
6c5979631b4b03c9 Heiko Carstens      2009-02-11  217  #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
6c5979631b4b03c9 Heiko Carstens      2009-02-11 @218  #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
1a94bc34768e463a Heiko Carstens      2009-01-14  219  
609320c8a22715b7 Yonghong Song       2017-09-07  220  #define SYSCALL_DEFINE_MAXARGS	6
609320c8a22715b7 Yonghong Song       2017-09-07  221  
bed1ffca022cc876 Frederic Weisbecker 2009-03-13  222  #define SYSCALL_DEFINEx(x, sname, ...)				\
99e621f796d7f034 Al Viro             2013-03-05  223  	SYSCALL_METADATA(sname, x, __VA_ARGS__)			\
bed1ffca022cc876 Frederic Weisbecker 2009-03-13  224  	__SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
bed1ffca022cc876 Frederic Weisbecker 2009-03-13  225  
2cf0966683430b64 Al Viro             2013-01-21  226  #define __PROTECT(...) asmlinkage_protect(__VA_ARGS__)
1bd21c6c21e84899 Dominik Brodowski   2018-04-05  227  
e145242ea0df6b7d Dominik Brodowski   2018-04-09  228  /*
e145242ea0df6b7d Dominik Brodowski   2018-04-09  229   * The asmlinkage stub is aliased to a function named __se_sys_*() which
e145242ea0df6b7d Dominik Brodowski   2018-04-09  230   * sign-extends 32-bit ints to longs whenever needed. The actual work is
e145242ea0df6b7d Dominik Brodowski   2018-04-09  231   * done within __do_sys_*().
e145242ea0df6b7d Dominik Brodowski   2018-04-09  232   */
1bd21c6c21e84899 Dominik Brodowski   2018-04-05  233  #ifndef __SYSCALL_DEFINEx
bed1ffca022cc876 Frederic Weisbecker 2009-03-13  234  #define __SYSCALL_DEFINEx(x, name, ...)					\
bee20031772af3de Arnd Bergmann       2018-06-19  235  	__diag_push();							\
bee20031772af3de Arnd Bergmann       2018-06-19  236  	__diag_ignore(GCC, 8, "-Wattribute-alias",			\
bee20031772af3de Arnd Bergmann       2018-06-19  237  		      "Type aliasing is used to sanitize syscall arguments");\
83460ec8dcac1414 Andi Kleen          2013-11-12 @238  	asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))	\
e145242ea0df6b7d Dominik Brodowski   2018-04-09  239  		__attribute__((alias(__stringify(__se_sys##name))));	\
c9a211951c7c79cf Howard McLauchlan   2018-03-21  240  	ALLOW_ERROR_INJECTION(sys##name, ERRNO);			\
e145242ea0df6b7d Dominik Brodowski   2018-04-09  241  	static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
e145242ea0df6b7d Dominik Brodowski   2018-04-09  242  	asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__));	\
e145242ea0df6b7d Dominik Brodowski   2018-04-09  243  	asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__))	\
1a94bc34768e463a Heiko Carstens      2009-01-14  244  	{								\
e145242ea0df6b7d Dominik Brodowski   2018-04-09  245  		long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__));\
07fe6e00f6cca6fe Al Viro             2013-01-21  246  		__MAP(x,__SC_TEST,__VA_ARGS__);				\
2cf0966683430b64 Al Viro             2013-01-21  247  		__PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__));	\
2cf0966683430b64 Al Viro             2013-01-21  248  		return ret;						\
1a94bc34768e463a Heiko Carstens      2009-01-14  249  	}								\
bee20031772af3de Arnd Bergmann       2018-06-19  250  	__diag_pop();							\
e145242ea0df6b7d Dominik Brodowski   2018-04-09  251  	static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
1bd21c6c21e84899 Dominik Brodowski   2018-04-05  252  #endif /* __SYSCALL_DEFINEx */
1a94bc34768e463a Heiko Carstens      2009-01-14  253  

:::::: The code at line 238 was first introduced by commit
:::::: 83460ec8dcac14142e7860a01fa59c267ac4657c syscalls.h: use gcc alias instead of assembler aliases for syscalls

:::::: TO: Andi Kleen <ak@...ux.intel.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.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" (10643 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ