tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue.git master head: db494b13c593e578fed58a6e41f4c9df619180d8 commit: db494b13c593e578fed58a6e41f4c9df619180d8 [4/4] bpf: Add support for certain atomics in bpf_arena to x86 JIT :::::: branch date: 11 hours ago :::::: commit date: 11 hours ago config: csky-randconfig-001-20250708 (attached as .config) compiler: csky-linux-gcc (GCC) 13.4.0 reproduce (this is a W=1 build): (attached as 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 | Closes: https://lore.kernel.org/oe-kbuild-all/202507090038.pzxbP68P-lkp@intel.com/ All error/warnings (new ones prefixed by >>): kernel/bpf/verifier.c: In function 'bpf_enable_priv_stack': >> kernel/bpf/verifier.c:6415:14: error: implicit declaration of function 'bpf_jit_supports_private_stack'; did you mean 'bpf_jit_supports_arena'? [-Werror=implicit-function-declaration] 6415 | if (!bpf_jit_supports_private_stack()) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | bpf_jit_supports_arena kernel/bpf/verifier.c: In function 'check_atomic_load': >> kernel/bpf/verifier.c:7747:15: error: implicit declaration of function 'check_load_mem' [-Werror=implicit-function-declaration] 7747 | err = check_load_mem(env, insn, true, false, false, "atomic_load"); | ^~~~~~~~~~~~~~ kernel/bpf/verifier.c: In function 'check_atomic_store': >> kernel/bpf/verifier.c:7766:15: error: implicit declaration of function 'check_store_reg'; did you mean 'check_ptr_off_reg'? [-Werror=implicit-function-declaration] 7766 | err = check_store_reg(env, insn, true); | ^~~~~~~~~~~~~~~ | check_ptr_off_reg kernel/bpf/verifier.c: At top level: >> kernel/bpf/verifier.c:7780:12: error: conflicting types for 'check_atomic'; have 'int(struct bpf_verifier_env *, struct bpf_insn *)' 7780 | static int check_atomic(struct bpf_verifier_env *env, struct bpf_insn *insn) | ^~~~~~~~~~~~ kernel/bpf/verifier.c:7650:12: note: previous definition of 'check_atomic' with type 'int(struct bpf_verifier_env *, int, struct bpf_insn *)' 7650 | static int check_atomic(struct bpf_verifier_env *env, int insn_idx, struct bpf_insn *insn) | ^~~~~~~~~~~~ kernel/bpf/verifier.c: In function 'check_atomic': >> kernel/bpf/verifier.c:7793:24: error: implicit declaration of function 'check_atomic_rmw'; did you mean 'check_atomic'? [-Werror=implicit-function-declaration] 7793 | return check_atomic_rmw(env, insn); | ^~~~~~~~~~~~~~~~ | check_atomic kernel/bpf/verifier.c: In function 'convert_ctx_accesses': >> kernel/bpf/verifier.c:20957:1: warning: label 'patch_insn_buf' defined but not used [-Wunused-label] 20957 | patch_insn_buf: | ^~~~~~~~~~~~~~ >> kernel/bpf/verifier.c:20735:13: warning: unused variable 'epilogue_idx' [-Wunused-variable] 20735 | int epilogue_idx = 0; | ^~~~~~~~~~~~ kernel/bpf/verifier.c: In function 'do_misc_fixups': >> kernel/bpf/verifier.c:21667:46: error: implicit declaration of function 'bpf_arch_uaddress_limit' [-Werror=implicit-function-declaration] 21667 | u64 uaddress_limit = bpf_arch_uaddress_limit(); | ^~~~~~~~~~~~~~~~~~~~~~~ >> kernel/bpf/verifier.c:21765:47: error: implicit declaration of function 'bpf_jit_supports_timed_may_goto' [-Werror=implicit-function-declaration] 21765 | if (is_may_goto_insn(insn) && bpf_jit_supports_timed_may_goto()) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/verifier.c: At top level: >> kernel/bpf/verifier.c:7650:12: warning: 'check_atomic' defined but not used [-Wunused-function] 7650 | static int check_atomic(struct bpf_verifier_env *env, int insn_idx, struct bpf_insn *insn) | ^~~~~~~~~~~~ cc1: some warnings being treated as errors vim +6415 kernel/bpf/verifier.c 969bf05eb3cedd Alexei Starovoitov 2016-05-05 6412 a76ab5731e32d5 Yonghong Song 2024-11-12 6413 static enum priv_stack_mode bpf_enable_priv_stack(struct bpf_prog *prog) a76ab5731e32d5 Yonghong Song 2024-11-12 6414 { a76ab5731e32d5 Yonghong Song 2024-11-12 @6415 if (!bpf_jit_supports_private_stack()) a76ab5731e32d5 Yonghong Song 2024-11-12 6416 return NO_PRIV_STACK; a76ab5731e32d5 Yonghong Song 2024-11-12 6417 a76ab5731e32d5 Yonghong Song 2024-11-12 6418 /* bpf_prog_check_recur() checks all prog types that use bpf trampoline a76ab5731e32d5 Yonghong Song 2024-11-12 6419 * while kprobe/tp/perf_event/raw_tp don't use trampoline hence checked a76ab5731e32d5 Yonghong Song 2024-11-12 6420 * explicitly. a76ab5731e32d5 Yonghong Song 2024-11-12 6421 */ a76ab5731e32d5 Yonghong Song 2024-11-12 6422 switch (prog->type) { a76ab5731e32d5 Yonghong Song 2024-11-12 6423 case BPF_PROG_TYPE_KPROBE: a76ab5731e32d5 Yonghong Song 2024-11-12 6424 case BPF_PROG_TYPE_TRACEPOINT: a76ab5731e32d5 Yonghong Song 2024-11-12 6425 case BPF_PROG_TYPE_PERF_EVENT: a76ab5731e32d5 Yonghong Song 2024-11-12 6426 case BPF_PROG_TYPE_RAW_TRACEPOINT: a76ab5731e32d5 Yonghong Song 2024-11-12 6427 return PRIV_STACK_ADAPTIVE; a76ab5731e32d5 Yonghong Song 2024-11-12 6428 case BPF_PROG_TYPE_TRACING: a76ab5731e32d5 Yonghong Song 2024-11-12 6429 case BPF_PROG_TYPE_LSM: a76ab5731e32d5 Yonghong Song 2024-11-12 6430 case BPF_PROG_TYPE_STRUCT_OPS: 5bd36da1e37e7a Yonghong Song 2024-11-12 6431 if (prog->aux->priv_stack_requested || bpf_prog_check_recur(prog)) a76ab5731e32d5 Yonghong Song 2024-11-12 6432 return PRIV_STACK_ADAPTIVE; a76ab5731e32d5 Yonghong Song 2024-11-12 6433 fallthrough; a76ab5731e32d5 Yonghong Song 2024-11-12 6434 default: a76ab5731e32d5 Yonghong Song 2024-11-12 6435 break; a76ab5731e32d5 Yonghong Song 2024-11-12 6436 } a76ab5731e32d5 Yonghong Song 2024-11-12 6437 a76ab5731e32d5 Yonghong Song 2024-11-12 6438 return NO_PRIV_STACK; a76ab5731e32d5 Yonghong Song 2024-11-12 6439 } a76ab5731e32d5 Yonghong Song 2024-11-12 6440 :::::: The code at line 6415 was first introduced by commit :::::: a76ab5731e32d50ff5b1ae97e9dc4b23f41c23f5 bpf: Find eligible subprogs for private stack support :::::: TO: Yonghong Song :::::: CC: Alexei Starovoitov -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki