Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexei Starovoitov <ast@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [ast-bpf:rust-bpf 7/14] kernel/bpf/arena.c:927:15: error: unknown token in expression
Date: Thu, 30 Apr 2026 12:43:44 +0800	[thread overview]
Message-ID: <202604301210.c9phvLSr-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-04-30  4:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202604301210.c9phvLSr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ast@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox