[arnd-asm-generic:syscall-tbl-6.11 77/80] include/linux/syscalls.h:247:42: error: 'sys_mmap' undeclared; did you mean 'sys_mremap'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git syscall-tbl-6.11
head:   ece1b5ebc0b7064a8a130f64e85a81ec76381c3f
commit: ce67487a0460367a60a68fa3de3e66b8caaa3b7c [77/80] syscalls: check syscall prototypes
config: um-allyesconfig (https://download.01.org/0day-ci/archive/20240725/202407251910.EGPCqgCG-lkp@xxxxxxxxx/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240725/202407251910.EGPCqgCG-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407251910.EGPCqgCG-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from arch/x86/um/syscalls_64.c:10:
   arch/x86/um/syscalls_64.c: In function '__se_sys_mmap':
>> include/linux/syscalls.h:247:42: error: 'sys_mmap' undeclared (first use in this function); did you mean 'sys_mremap'?
     247 |                 (void)(__do_sys##name == sys##name);                    \
         |                                          ^~~
   include/linux/syscalls.h:229:9: note: in expansion of macro '__SYSCALL_DEFINEx'
     229 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:221:36: note: in expansion of macro 'SYSCALL_DEFINEx'
     221 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
         |                                    ^~~~~~~~~~~~~~~
   arch/x86/um/syscalls_64.c:56:1: note: in expansion of macro 'SYSCALL_DEFINE6'
      56 | SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
         | ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:247:42: note: each undeclared identifier is reported only once for each function it appears in
     247 |                 (void)(__do_sys##name == sys##name);                    \
         |                                          ^~~
   include/linux/syscalls.h:229:9: note: in expansion of macro '__SYSCALL_DEFINEx'
     229 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:221:36: note: in expansion of macro 'SYSCALL_DEFINEx'
     221 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
         |                                    ^~~~~~~~~~~~~~~
   arch/x86/um/syscalls_64.c:56:1: note: in expansion of macro 'SYSCALL_DEFINE6'
      56 | SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
         | ^~~~~~~~~~~~~~~


vim +247 include/linux/syscalls.h

   232	
   233	/*
   234	 * The asmlinkage stub is aliased to a function named __se_sys_*() which
   235	 * sign-extends 32-bit ints to longs whenever needed. The actual work is
   236	 * done within __do_sys_*().
   237	 */
   238	#ifndef __SYSCALL_DEFINEx
   239	#define __SYSCALL_DEFINEx(x, name, ...)					\
   240		ALLOW_ERROR_INJECTION(sys##name, ERRNO);			\
   241		static inline asmlinkage long					\
   242			__do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));		\
   243		asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__));	\
   244		asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__))	\
   245		{								\
   246			long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__));\
 > 247			(void)(__do_sys##name == sys##name);			\
   248			__MAP(x,__SC_TEST,__VA_ARGS__);				\
   249			__PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__));	\
   250			return ret;						\
   251		}								\
   252		__diag_push();							\
   253		__diag_ignore(GCC, 8, "-Wattribute-alias",			\
   254			      "Type aliasing is used to sanitize syscall arguments");\
   255		asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))	\
   256			__attribute__((alias(__stringify(__se_sys##name))));	\
   257		__diag_pop();							\
   258		static inline asmlinkage long					\
   259			__do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
   260	#endif /* __SYSCALL_DEFINEx */
   261	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux