mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip:timers/vdso 10/18] kernel/sys.c:2878:1: warning: alias and aliasee have different types 'long (unsigned int *, unsigned int *, void *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0LL)) || __builtin_types_compat...
@ 2026-05-28  7:22 kernel test robot
  2026-05-28  7:50 ` Thomas Weißschuh
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2026-05-28  7:22 UTC (permalink / raw)
  To: Thomas Weißschuh 
  Cc: llvm, oe-kbuild-all, linux-kernel, x86, Thomas Gleixner

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/vdso
head:   034779fb06aba5bc45faf366922bd77e4d36543a
commit: 7158fc54b2c6f124eec0d7cd13bff69da0172e59 [10/18] vdso: Remove struct getcpu_cache
config: um-allnoconfig (https://download.01.org/0day-ci/archive/20260528/202605281540.qUDQmxib-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260528/202605281540.qUDQmxib-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605281540.qUDQmxib-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/sys.c:1793:1: warning: alias and aliasee have different types 'long (unsigned int, struct rlimit *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned int)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((struct rlimit *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((struct rlimit *)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long)') [-Wattribute-alias]
    1793 | SYSCALL_DEFINE2(setrlimit, unsigned int, resource, struct rlimit __user *, rlim)
         | ^
   include/linux/syscalls.h:226:36: note: expanded from macro 'SYSCALL_DEFINE2'
     226 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:251:18: note: expanded from macro '__SYSCALL_DEFINEx'
     251 |                 __attribute__((alias(__stringify(__se_sys##name))));    \
         |                                ^
   kernel/sys.c:1793:1: note: aliasee is declared here
   include/linux/syscalls.h:226:36: note: expanded from macro 'SYSCALL_DEFINE2'
     226 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:255:18: note: expanded from macro '__SYSCALL_DEFINEx'
     255 |         asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__))  \
         |                         ^
   <scratch space>:109:1: note: expanded from here
     109 | __se_sys_setrlimit
         | ^
   kernel/sys.c:1933:1: warning: alias and aliasee have different types 'long (int, struct rusage *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((int)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((struct rusage *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((struct rusage *)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long)') [-Wattribute-alias]
    1933 | SYSCALL_DEFINE2(getrusage, int, who, struct rusage __user *, ru)
         | ^
   include/linux/syscalls.h:226:36: note: expanded from macro 'SYSCALL_DEFINE2'
     226 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:251:18: note: expanded from macro '__SYSCALL_DEFINEx'
     251 |                 __attribute__((alias(__stringify(__se_sys##name))));    \
         |                                ^
   kernel/sys.c:1933:1: note: aliasee is declared here
   include/linux/syscalls.h:226:36: note: expanded from macro 'SYSCALL_DEFINE2'
     226 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:255:18: note: expanded from macro '__SYSCALL_DEFINEx'
     255 |         asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__))  \
         |                         ^
   <scratch space>:15:1: note: expanded from here
      15 | __se_sys_getrusage
         | ^
   kernel/sys.c:1959:1: warning: alias and aliasee have different types 'long (int)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((int)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long)') [-Wattribute-alias]
    1959 | SYSCALL_DEFINE1(umask, int, mask)
         | ^
   include/linux/syscalls.h:225:36: note: expanded from macro 'SYSCALL_DEFINE1'
     225 | #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:251:18: note: expanded from macro '__SYSCALL_DEFINEx'
     251 |                 __attribute__((alias(__stringify(__se_sys##name))));    \
         |                                ^
   kernel/sys.c:1959:1: note: aliasee is declared here
   include/linux/syscalls.h:225:36: note: expanded from macro 'SYSCALL_DEFINE1'
     225 | #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:255:18: note: expanded from macro '__SYSCALL_DEFINEx'
     255 |         asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__))  \
         |                         ^
   <scratch space>:42:1: note: expanded from here
      42 | __se_sys_umask
         | ^
   kernel/sys.c:2517:1: warning: alias and aliasee have different types 'long (int, unsigned long, unsigned long, unsigned long, unsigned long)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((int)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long, long, long, long)') [-Wattribute-alias]
    2517 | SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
         | ^
   include/linux/syscalls.h:229:36: note: expanded from macro 'SYSCALL_DEFINE5'
     229 | #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:251:18: note: expanded from macro '__SYSCALL_DEFINEx'
     251 |                 __attribute__((alias(__stringify(__se_sys##name))));    \
         |                                ^
   kernel/sys.c:2517:1: note: aliasee is declared here
   include/linux/syscalls.h:229:36: note: expanded from macro 'SYSCALL_DEFINE5'
     229 | #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:255:18: note: expanded from macro '__SYSCALL_DEFINEx'
     255 |         asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__))  \
         |                         ^
   <scratch space>:93:1: note: expanded from here
      93 | __se_sys_prctl
         | ^
>> kernel/sys.c:2878:1: warning: alias and aliasee have different types 'long (unsigned int *, unsigned int *, void *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((void *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((void *)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long, long)') [-Wattribute-alias]
    2878 | SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep, void __user *, unused)
         | ^
   include/linux/syscalls.h:227:36: note: expanded from macro 'SYSCALL_DEFINE3'
     227 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:251:18: note: expanded from macro '__SYSCALL_DEFINEx'
     251 |                 __attribute__((alias(__stringify(__se_sys##name))));    \
         |                                ^
   kernel/sys.c:2878:1: note: aliasee is declared here
   include/linux/syscalls.h:227:36: note: expanded from macro 'SYSCALL_DEFINE3'
     227 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:255:18: note: expanded from macro '__SYSCALL_DEFINEx'
     255 |         asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__))  \
         |                         ^
   <scratch space>:132:1: note: expanded from here
     132 | __se_sys_getcpu
         | ^
   kernel/sys.c:2957:1: warning: alias and aliasee have different types 'long (struct sysinfo *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((struct sysinfo *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((struct sysinfo *)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long)') [-Wattribute-alias]
    2957 | SYSCALL_DEFINE1(sysinfo, struct sysinfo __user *, info)
         | ^
   include/linux/syscalls.h:225:36: note: expanded from macro 'SYSCALL_DEFINE1'
     225 | #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:251:18: note: expanded from macro '__SYSCALL_DEFINEx'
     251 |                 __attribute__((alias(__stringify(__se_sys##name))));    \
         |                                ^
   kernel/sys.c:2957:1: note: aliasee is declared here
   include/linux/syscalls.h:225:36: note: expanded from macro 'SYSCALL_DEFINE1'
     225 | #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)
         |                                    ^
   include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
     236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
         |         ^
   include/linux/syscalls.h:255:18: note: expanded from macro '__SYSCALL_DEFINEx'
     255 |         asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__))  \
         |                         ^
   <scratch space>:160:1: note: expanded from here
     160 | __se_sys_sysinfo
         | ^
   31 warnings generated.


vim +2878 kernel/sys.c

  2877	
> 2878	SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep, void __user *, unused)
  2879	{
  2880		int err = 0;
  2881		int cpu = raw_smp_processor_id();
  2882	
  2883		if (cpup)
  2884			err |= put_user(cpu, cpup);
  2885		if (nodep)
  2886			err |= put_user(cpu_to_node(cpu), nodep);
  2887		return err ? -EFAULT : 0;
  2888	}
  2889	

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tip:timers/vdso 10/18] kernel/sys.c:2878:1: warning: alias and aliasee have different types 'long (unsigned int *, unsigned int *, void *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0LL)) || __builtin_types_compat...
  2026-05-28  7:22 [tip:timers/vdso 10/18] kernel/sys.c:2878:1: warning: alias and aliasee have different types 'long (unsigned int *, unsigned int *, void *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0LL)) || __builtin_types_compat kernel test robot
@ 2026-05-28  7:50 ` Thomas Weißschuh
  2026-05-28 16:44   ` Nathan Chancellor
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Weißschuh @ 2026-05-28  7:50 UTC (permalink / raw)
  To: kernel test robot; +Cc: llvm, oe-kbuild-all, linux-kernel, x86, Thomas Gleixner

On Thu, May 28, 2026 at 03:22:06PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/vdso
> head:   034779fb06aba5bc45faf366922bd77e4d36543a
> commit: 7158fc54b2c6f124eec0d7cd13bff69da0172e59 [10/18] vdso: Remove struct getcpu_cache
> config: um-allnoconfig (https://download.01.org/0day-ci/archive/20260528/202605281540.qUDQmxib-lkp@intel.com/config)
> compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260528/202605281540.qUDQmxib-lkp@intel.com/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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202605281540.qUDQmxib-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    kernel/sys.c:1793:1: warning: alias and aliasee have different types 'long (unsigned int, struct rlimit *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned int)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((struct rlimit *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((struct rlimit *)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long)') [-Wattribute-alias]

(...)

>    kernel/sys.c:1933:1: warning: alias and aliasee have different types 'long (int, struct rusage *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((int)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((struct rusage *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((struct rusage *)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long)') [-Wattribute-alias]
>    kernel/sys.c:1959:1: warning: alias and aliasee have different types 'long (int)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((int)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long)') [-Wattribute-alias]

(...)

>    kernel/sys.c:2517:1: warning: alias and aliasee have different types 'long (int, unsigned long, unsigned long, unsigned long, unsigned long)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((int)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long, long, long, long)') [-Wattribute-alias]

(...)

> >> kernel/sys.c:2878:1: warning: alias and aliasee have different types 'long (unsigned int *, unsigned int *, void *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((void *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((void *)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long, long)') [-Wattribute-alias]
>     2878 | SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep, void __user *, unused)
>          | ^
>    include/linux/syscalls.h:227:36: note: expanded from macro 'SYSCALL_DEFINE3'
>      227 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
>          |                                    ^
>    include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
>      236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
>          |         ^
>    include/linux/syscalls.h:251:18: note: expanded from macro '__SYSCALL_DEFINEx'
>      251 |                 __attribute__((alias(__stringify(__se_sys##name))));    \
>          |                                ^
>    kernel/sys.c:2878:1: note: aliasee is declared here
>    include/linux/syscalls.h:227:36: note: expanded from macro 'SYSCALL_DEFINE3'
>      227 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
>          |                                    ^
>    include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
>      236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
>          |         ^
>    include/linux/syscalls.h:255:18: note: expanded from macro '__SYSCALL_DEFINEx'
>      255 |         asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__))  \
>          |                         ^
>    <scratch space>:132:1: note: expanded from here
>      132 | __se_sys_getcpu
>          | ^

(...)

> vim +2878 kernel/sys.c
> 
>   2877	
> > 2878	SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep, void __user *, unused)
>   2879	{
>   2880		int err = 0;
>   2881		int cpu = raw_smp_processor_id();
>   2882	
>   2883		if (cpup)
>   2884			err |= put_user(cpu, cpup);
>   2885		if (nodep)
>   2886			err |= put_user(cpu_to_node(cpu), nodep);
>   2887		return err ? -EFAULT : 0;
>   2888	}
>   2889	

This warning is reported for  many/all system call definitions in this file.
The *new* warning is reported as the prototype of the system call has
changed and the warning is now slightly different from before.
So this report can be disregarded in my opinion.

It might be good to figure out why this warning happens in general,
but that shouldn't be urgent.

Also this patch is not in the current tip tree, but already released.
Is there an issue with the bot testing the wrong code?


Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tip:timers/vdso 10/18] kernel/sys.c:2878:1: warning: alias and aliasee have different types 'long (unsigned int *, unsigned int *, void *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0LL)) || __builtin_types_compat...
  2026-05-28  7:50 ` Thomas Weißschuh
@ 2026-05-28 16:44   ` Nathan Chancellor
  0 siblings, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2026-05-28 16:44 UTC (permalink / raw)
  To: Thomas Weißschuh
  Cc: kernel test robot, llvm, oe-kbuild-all, linux-kernel, x86,
	Thomas Gleixner

Hi Thomas,

On Thu, May 28, 2026 at 09:50:43AM +0200, Thomas Weißschuh wrote:
> On Thu, May 28, 2026 at 03:22:06PM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/vdso
> > head:   034779fb06aba5bc45faf366922bd77e4d36543a
> > commit: 7158fc54b2c6f124eec0d7cd13bff69da0172e59 [10/18] vdso: Remove struct getcpu_cache
> > config: um-allnoconfig (https://download.01.org/0day-ci/archive/20260528/202605281540.qUDQmxib-lkp@intel.com/config)
> > compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260528/202605281540.qUDQmxib-lkp@intel.com/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@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202605281540.qUDQmxib-lkp@intel.com/
> > 
> > All warnings (new ones prefixed by >>):
> > 
> >    kernel/sys.c:1793:1: warning: alias and aliasee have different types 'long (unsigned int, struct rlimit *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned int)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((struct rlimit *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((struct rlimit *)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long)') [-Wattribute-alias]
> 
> (...)
> 
> >    kernel/sys.c:1933:1: warning: alias and aliasee have different types 'long (int, struct rusage *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((int)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((struct rusage *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((struct rusage *)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long)') [-Wattribute-alias]
> >    kernel/sys.c:1959:1: warning: alias and aliasee have different types 'long (int)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((int)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long)') [-Wattribute-alias]
> 
> (...)
> 
> >    kernel/sys.c:2517:1: warning: alias and aliasee have different types 'long (int, unsigned long, unsigned long, unsigned long, unsigned long)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((int)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((int)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned long)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long, long, long, long)') [-Wattribute-alias]
> 
> (...)
> 
> > >> kernel/sys.c:2878:1: warning: alias and aliasee have different types 'long (unsigned int *, unsigned int *, void *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0ULL))), 0LL, 0L)), typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((void *)0), typeof (0LL)) || __builtin_types_compatible_p(typeof ((void *)0), typeof (0ULL))), 0LL, 0L)))' (aka 'long (long, long, long)') [-Wattribute-alias]
> >     2878 | SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep, void __user *, unused)
> >          | ^
> >    include/linux/syscalls.h:227:36: note: expanded from macro 'SYSCALL_DEFINE3'
> >      227 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
> >          |                                    ^
> >    include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
> >      236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
> >          |         ^
> >    include/linux/syscalls.h:251:18: note: expanded from macro '__SYSCALL_DEFINEx'
> >      251 |                 __attribute__((alias(__stringify(__se_sys##name))));    \
> >          |                                ^
> >    kernel/sys.c:2878:1: note: aliasee is declared here
> >    include/linux/syscalls.h:227:36: note: expanded from macro 'SYSCALL_DEFINE3'
> >      227 | #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
> >          |                                    ^
> >    include/linux/syscalls.h:236:2: note: expanded from macro 'SYSCALL_DEFINEx'
> >      236 |         __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
> >          |         ^
> >    include/linux/syscalls.h:255:18: note: expanded from macro '__SYSCALL_DEFINEx'
> >      255 |         asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__))  \
> >          |                         ^
> >    <scratch space>:132:1: note: expanded from here
> >      132 | __se_sys_getcpu
> >          | ^
> 
> (...)
> 
> > vim +2878 kernel/sys.c
> > 
> >   2877	
> > > 2878	SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep, void __user *, unused)
> >   2879	{
> >   2880		int err = 0;
> >   2881		int cpu = raw_smp_processor_id();
> >   2882	
> >   2883		if (cpup)
> >   2884			err |= put_user(cpu, cpup);
> >   2885		if (nodep)
> >   2886			err |= put_user(cpu_to_node(cpu), nodep);
> >   2887		return err ? -EFAULT : 0;
> >   2888	}
> >   2889	
> 
> This warning is reported for  many/all system call definitions in this file.
> The *new* warning is reported as the prototype of the system call has
> changed and the warning is now slightly different from before.
> So this report can be disregarded in my opinion.
> 
> It might be good to figure out why this warning happens in general,
> but that shouldn't be urgent.
> 
> Also this patch is not in the current tip tree, but already released.
> Is there an issue with the bot testing the wrong code?

Sorry for the noise. This is from a compiler upgrade, as tip of tree
clang has implemented -Wattribute-alias like GCC, which means it needs
to be turned off in the same way:

  https://git.kernel.org/nathan/c/175db11786bde9061db526bf1ac5107d915f5163

I plan to send that to Linus soon.

-- 
Cheers,
Nathan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-28 16:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-28  7:22 [tip:timers/vdso 10/18] kernel/sys.c:2878:1: warning: alias and aliasee have different types 'long (unsigned int *, unsigned int *, void *)' and 'long (typeof (__builtin_choose_expr((__builtin_types_compatible_p(typeof ((unsigned int *)0), typeof (0LL)) || __builtin_types_compat kernel test robot
2026-05-28  7:50 ` Thomas Weißschuh
2026-05-28 16:44   ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®