BPF List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: thinker.li@gmail.com, bpf@vger.kernel.org, ast@kernel.org,
	martin.lau@linux.dev, song@kernel.org, kernel-team@meta.com,
	andrii@kernel.org, drosen@google.com
Cc: oe-kbuild-all@lists.linux.dev, sinquersw@gmail.com,
	kuifeng@meta.com, Kui-Feng Lee <thinker.li@gmail.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next v9 09/12] bpf, net: switch to dynamic registration
Date: Thu, 2 Nov 2023 18:23:38 +0800	[thread overview]
Message-ID: <202311021810.n3qVl5OS-lkp@intel.com> (raw)
In-Reply-To: <20231101204519.677870-10-thinker.li@gmail.com>

Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/thinker-li-gmail-com/bpf-refactory-struct_ops-type-initialization-to-a-function/20231102-044820
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20231101204519.677870-10-thinker.li%40gmail.com
patch subject: [PATCH bpf-next v9 09/12] bpf, net: switch to dynamic registration
config: x86_64-randconfig-013-20231102 (https://download.01.org/0day-ci/archive/20231102/202311021810.n3qVl5OS-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231102/202311021810.n3qVl5OS-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/202311021810.n3qVl5OS-lkp@intel.com/

All errors (new ones prefixed by >>):

   ld: kernel/bpf/btf.o: in function `btf_add_struct_ops':
>> kernel/bpf/btf.c:8662: undefined reference to `bpf_struct_ops_desc_init'


vim +8662 kernel/bpf/btf.c

  8619	
  8620	static int
  8621	btf_add_struct_ops(struct btf *btf, struct bpf_struct_ops *st_ops,
  8622			   struct bpf_verifier_log *log)
  8623	{
  8624		struct btf_struct_ops_tab *tab, *new_tab;
  8625		int i, err;
  8626	
  8627		if (!btf)
  8628			return -ENOENT;
  8629	
  8630		/* Assume this function is called for a module when the module is
  8631		 * loading.
  8632		 */
  8633	
  8634		tab = btf->struct_ops_tab;
  8635		if (!tab) {
  8636			tab = kzalloc(offsetof(struct btf_struct_ops_tab, ops[4]),
  8637				      GFP_KERNEL);
  8638			if (!tab)
  8639				return -ENOMEM;
  8640			tab->capacity = 4;
  8641			btf->struct_ops_tab = tab;
  8642		}
  8643	
  8644		for (i = 0; i < tab->cnt; i++)
  8645			if (tab->ops[i].st_ops == st_ops)
  8646				return -EEXIST;
  8647	
  8648		if (tab->cnt == tab->capacity) {
  8649			new_tab = krealloc(tab,
  8650					   offsetof(struct btf_struct_ops_tab,
  8651						    ops[tab->capacity * 2]),
  8652					   GFP_KERNEL);
  8653			if (!new_tab)
  8654				return -ENOMEM;
  8655			tab = new_tab;
  8656			tab->capacity *= 2;
  8657			btf->struct_ops_tab = tab;
  8658		}
  8659	
  8660		tab->ops[btf->struct_ops_tab->cnt].st_ops = st_ops;
  8661	
> 8662		err = bpf_struct_ops_desc_init(&tab->ops[btf->struct_ops_tab->cnt], btf, log);
  8663		if (err)
  8664			return err;
  8665	
  8666		btf->struct_ops_tab->cnt++;
  8667	
  8668		return 0;
  8669	}
  8670	

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

  reply	other threads:[~2023-11-02 10:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01 20:45 [PATCH bpf-next v9 00/12] Registrating struct_ops types from modules thinker.li
2023-11-01 20:45 ` [PATCH bpf-next v9 01/12] bpf: refactory struct_ops type initialization to a function thinker.li
2023-11-01 20:45 ` [PATCH bpf-next v9 02/12] bpf: get type information with BPF_ID_LIST thinker.li
2023-11-01 20:45 ` [PATCH bpf-next v9 03/12] bpf, net: introduce bpf_struct_ops_desc thinker.li
2023-11-01 20:45 ` [PATCH bpf-next v9 04/12] bpf: add struct_ops_tab to btf thinker.li
2023-11-01 20:45 ` [PATCH bpf-next v9 05/12] bpf: lookup struct_ops types from a given module BTF thinker.li
2023-11-01 20:45 ` [PATCH bpf-next v9 06/12] bpf: hold module for bpf_struct_ops_map thinker.li
2023-11-01 20:45 ` [PATCH bpf-next v9 07/12] bpf: validate value_type thinker.li
2023-11-01 20:45 ` [PATCH bpf-next v9 08/12] bpf: pass attached BTF to the bpf_struct_ops subsystem thinker.li
2023-11-01 20:45 ` [PATCH bpf-next v9 09/12] bpf, net: switch to dynamic registration thinker.li
2023-11-02 10:23   ` kernel test robot [this message]
2023-11-03  5:57   ` kernel test robot
2023-11-01 20:45 ` [PATCH bpf-next v9 10/12] libbpf: Find correct module BTFs for struct_ops maps and progs thinker.li
2023-11-01 20:45 ` [PATCH bpf-next v9 11/12] bpf: export btf_ctx_access to modules thinker.li
2023-11-01 20:45 ` [PATCH bpf-next v9 12/12] selftests/bpf: test case for register_bpf_struct_ops() thinker.li

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=202311021810.n3qVl5OS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=drosen@google.com \
    --cc=kernel-team@meta.com \
    --cc=kuifeng@meta.com \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sinquersw@gmail.com \
    --cc=song@kernel.org \
    --cc=thinker.li@gmail.com \
    /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