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: <202503192004.mvMWNurt-lkp@intel.com>
Date: Wed, 19 Mar 2025 20:45:07 +0800
From: kernel test robot <lkp@...el.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	linux-kernel@...r.kernel.org, x86@...nel.org
Subject: [tip:WIP.x86/core 1/1]
 arch/riscv/include/asm/vdso/gettimeofday.h:24:43: error: meaningless
 'inline' on asm outside function

Hi Ingo,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/core
head:   9262ee6499954dd387e4507e03b84512ab100706
commit: 9262ee6499954dd387e4507e03b84512ab100706 [1/1] compiler/gcc: Make asm() templates asm __inline__() by default
config: riscv-randconfig-001-20250319 (https://download.01.org/0day-ci/archive/20250319/202503192004.mvMWNurt-lkp@intel.com/config)
compiler: clang version 20.1.0 (https://github.com/llvm/llvm-project 24a30daaa559829ad079f2ff7f73eb4e18095f88)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250319/202503192004.mvMWNurt-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503192004.mvMWNurt-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
>> arch/riscv/include/asm/vdso/gettimeofday.h:24:43: error: meaningless 'inline' on asm outside function
      24 |         register struct __kernel_old_timeval *tv asm("a0") = _tv;
         |                                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:25:31: error: meaningless 'inline' on asm outside function
      25 |         register struct timezone *tz asm("a1") = _tz;
         |                                      ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:26:20: error: meaningless 'inline' on asm outside function
      26 |         register long ret asm("a0");
         |                           ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:27:19: error: meaningless 'inline' on asm outside function
      27 |         register long nr asm("a7") = __NR_gettimeofday;
         |                          ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:40:27: error: meaningless 'inline' on asm outside function
      40 |         register clockid_t clkid asm("a0") = _clkid;
         |                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:41:40: error: meaningless 'inline' on asm outside function
      41 |         register struct __kernel_timespec *ts asm("a1") = _ts;
         |                                               ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:42:20: error: meaningless 'inline' on asm outside function
      42 |         register long ret asm("a0");
         |                           ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:43:19: error: meaningless 'inline' on asm outside function
      43 |         register long nr asm("a7") = __NR_clock_gettime;
         |                          ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:56:27: error: meaningless 'inline' on asm outside function
      56 |         register clockid_t clkid asm("a0") = _clkid;
         |                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:57:40: error: meaningless 'inline' on asm outside function
      57 |         register struct __kernel_timespec *ts asm("a1") = _ts;
         |                                               ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:58:20: error: meaningless 'inline' on asm outside function
      58 |         register long ret asm("a0");
         |                           ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:59:19: error: meaningless 'inline' on asm outside function
      59 |         register long nr asm("a7") = __NR_clock_getres;
         |                          ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   12 errors generated.
   make[3]: *** [scripts/Makefile.build:207: arch/riscv/kernel/vdso/vgettimeofday.o] Error 1 shuffle=889927436
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
>> arch/riscv/include/asm/vdso/gettimeofday.h:24:43: error: meaningless 'inline' on asm outside function
      24 |         register struct __kernel_old_timeval *tv asm("a0") = _tv;
         |                                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:25:31: error: meaningless 'inline' on asm outside function
      25 |         register struct timezone *tz asm("a1") = _tz;
         |                                      ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:26:20: error: meaningless 'inline' on asm outside function
      26 |         register long ret asm("a0");
         |                           ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:27:19: error: meaningless 'inline' on asm outside function
      27 |         register long nr asm("a7") = __NR_gettimeofday;
         |                          ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:40:27: error: meaningless 'inline' on asm outside function
      40 |         register clockid_t clkid asm("a0") = _clkid;
         |                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:41:40: error: meaningless 'inline' on asm outside function
      41 |         register struct __kernel_timespec *ts asm("a1") = _ts;
         |                                               ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:42:20: error: meaningless 'inline' on asm outside function
      42 |         register long ret asm("a0");
         |                           ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:43:19: error: meaningless 'inline' on asm outside function
      43 |         register long nr asm("a7") = __NR_clock_gettime;
         |                          ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:56:27: error: meaningless 'inline' on asm outside function
      56 |         register clockid_t clkid asm("a0") = _clkid;
         |                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:57:40: error: meaningless 'inline' on asm outside function
      57 |         register struct __kernel_timespec *ts asm("a1") = _ts;


vim +/inline +24 arch/riscv/include/asm/vdso/gettimeofday.h

ad5d1122b82fbd6 Vincent Chen 2020-06-09  19  
ad5d1122b82fbd6 Vincent Chen 2020-06-09  20  static __always_inline
ad5d1122b82fbd6 Vincent Chen 2020-06-09  21  int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
ad5d1122b82fbd6 Vincent Chen 2020-06-09  22  			  struct timezone *_tz)
ad5d1122b82fbd6 Vincent Chen 2020-06-09  23  {
ad5d1122b82fbd6 Vincent Chen 2020-06-09 @24  	register struct __kernel_old_timeval *tv asm("a0") = _tv;
ad5d1122b82fbd6 Vincent Chen 2020-06-09  25  	register struct timezone *tz asm("a1") = _tz;
ad5d1122b82fbd6 Vincent Chen 2020-06-09  26  	register long ret asm("a0");
ad5d1122b82fbd6 Vincent Chen 2020-06-09  27  	register long nr asm("a7") = __NR_gettimeofday;
ad5d1122b82fbd6 Vincent Chen 2020-06-09  28  
ad5d1122b82fbd6 Vincent Chen 2020-06-09  29  	asm volatile ("ecall\n"
ad5d1122b82fbd6 Vincent Chen 2020-06-09  30  		      : "=r" (ret)
ad5d1122b82fbd6 Vincent Chen 2020-06-09  31  		      : "r"(tv), "r"(tz), "r"(nr)
ad5d1122b82fbd6 Vincent Chen 2020-06-09  32  		      : "memory");
ad5d1122b82fbd6 Vincent Chen 2020-06-09  33  
ad5d1122b82fbd6 Vincent Chen 2020-06-09  34  	return ret;
ad5d1122b82fbd6 Vincent Chen 2020-06-09  35  }
ad5d1122b82fbd6 Vincent Chen 2020-06-09  36  

:::::: The code at line 24 was first introduced by commit
:::::: ad5d1122b82fbd6a816d1b9d26ee01a6dbc2d757 riscv: use vDSO common flow to reduce the latency of the time-related functions

:::::: TO: Vincent Chen <vincent.chen@...ive.com>
:::::: CC: Palmer Dabbelt <palmerdabbelt@...gle.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ