All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexei Starovoitov <ast@kernel.org>
Cc: <oe-kbuild-all@lists.linux.dev>,
	Jeff Kirsher <jeff.kirsher@gmail.com>,
	Martin KaFai Lau <martin.lau@kernel.org>
Subject: [jkirsher-net-queue:master 4/4] kernel/bpf/verifier.c:6415:14: error: implicit declaration of function 'bpf_jit_supports_private_stack'; did you mean 'bpf_jit_supports_arena'?
Date: Wed, 9 Jul 2025 09:18:00 +0800	[thread overview]
Message-ID: <aG3DSGe2AecrHwnb@rli9-mobl> (raw)

[-- Attachment #1: Type: text/plain, Size: 6864 bytes --]

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 <lkp@intel.com>
| 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 <yonghong.song@linux.dev>
:::::: CC: Alexei Starovoitov <ast@kernel.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34837 bytes --]

[-- Attachment #3: reproduce --]
[-- Type: text/plain, Size: 825 bytes --]

reproduce (this is a W=1 build):
        git clone https://github.com/intel/lkp-tests.git ~/lkp-tests
        # https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue.git/commit/?id=db494b13c593e578fed58a6e41f4c9df619180d8
        git remote add jkirsher-net-queue https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue.git
        git fetch --no-tags jkirsher-net-queue master
        git checkout db494b13c593e578fed58a6e41f4c9df619180d8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-13.4.0 ~/lkp-tests/kbuild/make.cross W=1 O=build_dir ARCH=csky olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-13.4.0 ~/lkp-tests/kbuild/make.cross W=1 O=build_dir ARCH=csky SHELL=/bin/bash kernel/bpf/

                 reply	other threads:[~2025-07-09  1:18 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=aG3DSGe2AecrHwnb@rli9-mobl \
    --to=lkp@intel.com \
    --cc=ast@kernel.org \
    --cc=jeff.kirsher@gmail.com \
    --cc=martin.lau@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.