[arnd-asm-generic:syscall-tbl-6.11 44/80] arch/arm/kernel/sys_oabi-compat.c:407:1: error: conflicting types for 'sys_oabi_semtimedop'

[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: 2263955b209e2016dc9f30d129e356f4123310d5 [44/80] ARM: OABI SYSCALL_DEFINEx
config: arm-randconfig-002-20240724 (https://download.01.org/0day-ci/archive/20240724/202407241416.GGWdAKAR-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project ad154281230d83ee551e12d5be48bb956ef47ed3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240724/202407241416.GGWdAKAR-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/202407241416.GGWdAKAR-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from arch/arm/kernel/sys_oabi-compat.c:75:
   In file included from include/linux/syscalls.h:94:
   In file included from include/trace/syscall.h:7:
   In file included from include/linux/trace_events.h:6:
   In file included from include/linux/ring_buffer.h:5:
   In file included from include/linux/mm.h:2221:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> arch/arm/kernel/sys_oabi-compat.c:407:1: error: conflicting types for 'sys_oabi_semtimedop'
     407 | SYSCALL_DEFINE3(oabi_semtimedop, int, semid, struct oabi_sembuf __user *, tsops,
         | ^
   include/linux/syscalls.h:226:36: note: expanded from macro 'SYSCALL_DEFINE3'
     226 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:237:2: note: expanded from macro 'SYSCALL_DEFINEx'
     237 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:251:18: note: expanded from macro '__SYSCALL_DEFINEx'
     251 |         asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))       \
         |                         ^
   <scratch space>:16:1: note: expanded from here
      16 | sys_oabi_semtimedop
         | ^
   arch/arm/include/asm/syscalls.h:30:17: note: previous declaration is here
      30 | asmlinkage long sys_oabi_semtimedop(int semid,
         |                 ^
>> arch/arm/kernel/sys_oabi-compat.c:419:1: error: conflicting types for 'sys_oabi_ipc'
     419 | SYSCALL_DEFINE5(oabi_ipc, uint, call, int, first, int, second, int, third,
         | ^
   include/linux/syscalls.h:228:36: note: expanded from macro 'SYSCALL_DEFINE5'
     228 | #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:237:2: note: expanded from macro 'SYSCALL_DEFINEx'
     237 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:251:18: note: expanded from macro '__SYSCALL_DEFINEx'
     251 |         asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))       \
         |                         ^
   <scratch space>:132:1: note: expanded from here
     132 | sys_oabi_ipc
         | ^
   arch/arm/include/asm/syscalls.h:36:17: note: previous declaration is here
      36 | asmlinkage long sys_oabi_ipc(uint call, int first, int second, int third,
         |                 ^
>> arch/arm/kernel/sys_oabi-compat.c:448:1: error: conflicting types for 'sys_oabi_sendto'
     448 | SYSCALL_DEFINE4(oabi_sendto, int, fd, void __user *, buff, size_t, len,
         | ^
   include/linux/syscalls.h:227:36: note: expanded from macro 'SYSCALL_DEFINE4'
     227 | #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:237:2: note: expanded from macro 'SYSCALL_DEFINEx'
     237 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:251:18: note: expanded from macro '__SYSCALL_DEFINEx'
     251 |         asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))       \
         |                         ^
   <scratch space>:89:1: note: expanded from here
      89 | sys_oabi_sendto
         | ^
   arch/arm/include/asm/syscalls.h:41:17: note: previous declaration is here
      41 | asmlinkage long sys_oabi_sendto(int fd, void __user *buff,
         |                 ^
>> arch/arm/kernel/sys_oabi-compat.c:453:27: error: use of undeclared identifier 'addr'
     453 |             get_user(sa_family, &addr->sa_family) == 0 &&
         |                                  ^
>> arch/arm/kernel/sys_oabi-compat.c:453:27: error: use of undeclared identifier 'addr'
>> arch/arm/kernel/sys_oabi-compat.c:453:27: error: use of undeclared identifier 'addr'
>> arch/arm/kernel/sys_oabi-compat.c:452:6: error: use of undeclared identifier 'addrlen'; did you mean 'strlen'?
     452 |         if (addrlen == 112 &&
         |             ^~~~~~~
         |             strlen
   include/linux/string.h:196:24: note: 'strlen' declared here
     196 | extern __kernel_size_t strlen(const char *);
         |                        ^
   arch/arm/kernel/sys_oabi-compat.c:455:4: error: use of undeclared identifier 'addrlen'
     455 |                         addrlen = 110;
         |                         ^
   arch/arm/kernel/sys_oabi-compat.c:456:44: error: use of undeclared identifier 'addr'
     456 |         return __sys_sendto(fd, buff, len, flags, addr, addrlen);
         |                                                   ^
   arch/arm/kernel/sys_oabi-compat.c:456:50: error: use of undeclared identifier 'addrlen'
     456 |         return __sys_sendto(fd, buff, len, flags, addr, addrlen);
         |                                                         ^
>> arch/arm/kernel/sys_oabi-compat.c:483:37: error: too few arguments to function call, expected 4, have 3
     483 |         return __sys_sendmsg(fd, msg, flags);
         |                ~~~~~~~~~~~~~               ^
   include/linux/socket.h:411:13: note: '__sys_sendmsg' declared here
     411 | extern long __sys_sendmsg(int fd, struct user_msghdr __user *msg,
         |             ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     412 |                           unsigned int flags, bool forbid_cmsg_compat);
         |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning and 11 errors generated.


vim +/sys_oabi_semtimedop +407 arch/arm/kernel/sys_oabi-compat.c

   388	
   389	SYSCALL_DEFINE6(oabi_ipc, uint, call, int, first, int, second, int, third,
   390			void __user *, ptr, long, fifth)
   391	{
   392		switch (call & 0xffff) {
   393		case SEMOP:
   394			return  sys_oabi_semtimedop(first,
   395						    (struct oabi_sembuf __user *)ptr,
   396						    second, NULL);
   397		case SEMTIMEDOP:
   398			return  sys_oabi_semtimedop(first,
   399						    (struct oabi_sembuf __user *)ptr,
   400						    second,
   401						    (const struct old_timespec32 __user *)fifth);
   402		default:
   403			return sys_ipc(call, first, second, third, ptr, fifth);
   404		}
   405	}
   406	#else
 > 407	SYSCALL_DEFINE3(oabi_semtimedop, int, semid, struct oabi_sembuf __user *, tsops,
   408			unsigned, nsops, const struct old_timespec32 __user *, timeout)
   409	{
   410		return -ENOSYS;
   411	}
   412	
   413	SYSCALL_DEFINE3(oabi_semop, int, semid, struct oabi_sembuf __user *, tsops,
   414			unsigned, nsops)
   415	{
   416		return -ENOSYS;
   417	}
   418	
 > 419	SYSCALL_DEFINE5(oabi_ipc, uint, call, int, first, int, second, int, third,
   420			void __user *, ptr, long, fifth)
   421	{
   422		return -ENOSYS;
   423	}
   424	#endif
   425	
   426	SYSCALL_DEFINE3(oabi_bind, int, fd, struct sockaddr __user *, addr,
   427			int, addrlen)
   428	{
   429		sa_family_t sa_family;
   430		if (addrlen == 112 &&
   431		    get_user(sa_family, &addr->sa_family) == 0 &&
   432		    sa_family == AF_UNIX)
   433				addrlen = 110;
   434		return __sys_bind(fd, addr, addrlen);
   435	}
   436	
   437	SYSCALL_DEFINE3(oabi_connect, int, fd, struct sockaddr __user *, addr,
   438			int, addrlen)
   439	{
   440		sa_family_t sa_family;
   441		if (addrlen == 112 &&
   442		    get_user(sa_family, &addr->sa_family) == 0 &&
   443		    sa_family == AF_UNIX)
   444				addrlen = 110;
   445		return __sys_connect(fd, addr, addrlen);
   446	}
   447	
 > 448	SYSCALL_DEFINE4(oabi_sendto, int, fd, void __user *, buff, size_t, len,
   449			unsigned, flags, struct sockaddr __user *, addr, int, addrlen)
   450	{
   451		sa_family_t sa_family;
 > 452		if (addrlen == 112 &&
 > 453		    get_user(sa_family, &addr->sa_family) == 0 &&
   454		    sa_family == AF_UNIX)
   455				addrlen = 110;
   456		return __sys_sendto(fd, buff, len, flags, addr, addrlen);
   457	}
   458	
   459	SYSCALL_DEFINE3(oabi_sendmsg, int, fd, struct user_msghdr __user *, msg,
   460			unsigned, flags)
   461	{
   462		struct sockaddr __user *addr;
   463		int msg_namelen;
   464		sa_family_t sa_family;
   465		if (msg &&
   466		    get_user(msg_namelen, &msg->msg_namelen) == 0 &&
   467		    msg_namelen == 112 &&
   468		    get_user(addr, &msg->msg_name) == 0 &&
   469		    get_user(sa_family, &addr->sa_family) == 0 &&
   470		    sa_family == AF_UNIX)
   471		{
   472			/*
   473			 * HACK ALERT: there is a limit to how much backward bending
   474			 * we should do for what is actually a transitional
   475			 * compatibility layer.  This already has known flaws with
   476			 * a few ioctls that we don't intend to fix.  Therefore
   477			 * consider this blatent hack as another one... and take care
   478			 * to run for cover.  In most cases it will "just work fine".
   479			 * If it doesn't, well, tough.
   480			 */
   481			put_user(110, &msg->msg_namelen);
   482		}
 > 483		return __sys_sendmsg(fd, msg, flags);
   484	}
   485	

-- 
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