Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [ast-bpf:rust-bpf 7/14] kernel/bpf/arena.c:927:15: error: unknown token in expression
@ 2026-04-30  4:43 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-30  4:43 UTC (permalink / raw)
  To: Alexei Starovoitov; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git rust-bpf
head:   1623628cc9588b205a0e913c5e62d267ef0f6d70
commit: 57b8503e842e4c2843af80176ba6fd68b478c5d0 [7/14] bpf_arena_memcmp
config: arm64-randconfig-003-20260430 (https://download.01.org/0day-ci/archive/20260430/202604301210.c9phvLSr-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260430/202604301210.c9phvLSr-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/202604301210.c9phvLSr-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/bpf/arena.c:927:15: error: unknown token in expression
     927 |         asm volatile("movq %%r12, %0" : "=r"(base));
         |                      ^
   <inline asm>:1:7: note: instantiated into assembly here
       1 |         movq %r12, x8
         |              ^
>> kernel/bpf/arena.c:927:15: error: invalid operand
     927 |         asm volatile("movq %%r12, %0" : "=r"(base));
         |                      ^
   <inline asm>:1:7: note: instantiated into assembly here
       1 |         movq %r12, x8
         |              ^
>> kernel/bpf/arena.c:927:15: error: unknown token in expression
     927 |         asm volatile("movq %%r12, %0" : "=r"(base));
         |                      ^
   <inline asm>:1:7: note: instantiated into assembly here
       1 |         movq %r12, x8
         |              ^
>> kernel/bpf/arena.c:927:15: error: invalid operand
     927 |         asm volatile("movq %%r12, %0" : "=r"(base));
         |                      ^
   <inline asm>:1:7: note: instantiated into assembly here
       1 |         movq %r12, x8
         |              ^
   4 errors generated.


vim +927 kernel/bpf/arena.c

   912	
   913	/*
   914	 * bpf_arena_memcmp / bpf_arena_memcpy — memcmp/memcpy over arena memory.
   915	 *
   916	 * Both pointers are arena user VAs. The JIT sets %r12 to arena_vm_start at
   917	 * prog prologue and the x86 ABI marks %r12 as callee-saved, so at the first
   918	 * instruction of this kfunc %r12 still holds that base. Read it via inline
   919	 * asm before the compiler has a chance to reuse the register, rebase the
   920	 * user-VA low-32 into the kernel VMA range, then call the regular
   921	 * memcmp()/memcpy(). No per-prog context lookup needed.
   922	 */
   923	static __always_inline unsigned long arena_kern_base(void)
   924	{
   925		unsigned long base;
   926	
 > 927		asm volatile("movq %%r12, %0" : "=r"(base));
   928		return base;
   929	}
   930	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-30  4:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30  4:43 [ast-bpf:rust-bpf 7/14] kernel/bpf/arena.c:927:15: error: unknown token in expression kernel test robot

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