All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ard Biesheuvel <ardb+git@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v2 3/3] btf: Avoid weak external references
Date: Wed, 10 Apr 2024 14:35:29 +0800	[thread overview]
Message-ID: <202404101451.ic99Xrk8-lkp@intel.com> (raw)
In-Reply-To: <20240409150132.4097042-8-ardb+git@google.com>

Hi Ard,

kernel test robot noticed the following build errors:

[auto build test ERROR on arnd-asm-generic/master]
[also build test ERROR on bpf-next/master bpf/master linus/master v6.9-rc3 next-20240409]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ard-Biesheuvel/kallsyms-Avoid-weak-references-for-kallsyms-symbols/20240409-230510
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master
patch link:    https://lore.kernel.org/r/20240409150132.4097042-8-ardb%2Bgit%40google.com
patch subject: [PATCH v2 3/3] btf: Avoid weak external references
config: s390-defconfig (https://download.01.org/0day-ci/archive/20240410/202404101451.ic99Xrk8-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 8b3b4a92adee40483c27f26c478a384cd69c6f05)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240410/202404101451.ic99Xrk8-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/202404101451.ic99Xrk8-lkp@intel.com/

All errors (new ones prefixed by >>):

   s390x-linux-ld: kernel/bpf/btf.o: in function `btf_parse_vmlinux':
>> kernel/bpf/btf.c:5910:(.text+0x3b72): undefined reference to `__start_BTF'
>> s390x-linux-ld: kernel/bpf/btf.c:5911:(.text+0x3b78): undefined reference to `__stop_BTF'


vim +5910 kernel/bpf/btf.c

49f4e6720748c7 Jiri Olsa               2020-07-11  5888  
8580ac9404f624 Alexei Starovoitov      2019-10-15  5889  struct btf *btf_parse_vmlinux(void)
8580ac9404f624 Alexei Starovoitov      2019-10-15  5890  {
8580ac9404f624 Alexei Starovoitov      2019-10-15  5891  	struct btf_verifier_env *env = NULL;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5892  	struct bpf_verifier_log *log;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5893  	struct btf *btf = NULL;
49f4e6720748c7 Jiri Olsa               2020-07-11  5894  	int err;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5895  
8580ac9404f624 Alexei Starovoitov      2019-10-15  5896  	env = kzalloc(sizeof(*env), GFP_KERNEL | __GFP_NOWARN);
8580ac9404f624 Alexei Starovoitov      2019-10-15  5897  	if (!env)
8580ac9404f624 Alexei Starovoitov      2019-10-15  5898  		return ERR_PTR(-ENOMEM);
8580ac9404f624 Alexei Starovoitov      2019-10-15  5899  
8580ac9404f624 Alexei Starovoitov      2019-10-15  5900  	log = &env->log;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5901  	log->level = BPF_LOG_KERNEL;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5902  
8580ac9404f624 Alexei Starovoitov      2019-10-15  5903  	btf = kzalloc(sizeof(*btf), GFP_KERNEL | __GFP_NOWARN);
8580ac9404f624 Alexei Starovoitov      2019-10-15  5904  	if (!btf) {
8580ac9404f624 Alexei Starovoitov      2019-10-15  5905  		err = -ENOMEM;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5906  		goto errout;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5907  	}
8580ac9404f624 Alexei Starovoitov      2019-10-15  5908  	env->btf = btf;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5909  
90ceddcb495008 Fangrui Song            2020-03-18 @5910  	btf->data = __start_BTF;
90ceddcb495008 Fangrui Song            2020-03-18 @5911  	btf->data_size = __stop_BTF - __start_BTF;
5329722057d41a Andrii Nakryiko         2020-11-09  5912  	btf->kernel_btf = true;
5329722057d41a Andrii Nakryiko         2020-11-09  5913  	snprintf(btf->name, sizeof(btf->name), "vmlinux");
8580ac9404f624 Alexei Starovoitov      2019-10-15  5914  
8580ac9404f624 Alexei Starovoitov      2019-10-15  5915  	err = btf_parse_hdr(env);
8580ac9404f624 Alexei Starovoitov      2019-10-15  5916  	if (err)
8580ac9404f624 Alexei Starovoitov      2019-10-15  5917  		goto errout;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5918  
8580ac9404f624 Alexei Starovoitov      2019-10-15  5919  	btf->nohdr_data = btf->data + btf->hdr.hdr_len;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5920  
8580ac9404f624 Alexei Starovoitov      2019-10-15  5921  	err = btf_parse_str_sec(env);
8580ac9404f624 Alexei Starovoitov      2019-10-15  5922  	if (err)
8580ac9404f624 Alexei Starovoitov      2019-10-15  5923  		goto errout;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5924  
8580ac9404f624 Alexei Starovoitov      2019-10-15  5925  	err = btf_check_all_metas(env);
8580ac9404f624 Alexei Starovoitov      2019-10-15  5926  	if (err)
8580ac9404f624 Alexei Starovoitov      2019-10-15  5927  		goto errout;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5928  
eb596b0905584a Kumar Kartikeya Dwivedi 2022-04-19  5929  	err = btf_check_type_tags(env, btf, 1);
eb596b0905584a Kumar Kartikeya Dwivedi 2022-04-19  5930  	if (err)
eb596b0905584a Kumar Kartikeya Dwivedi 2022-04-19  5931  		goto errout;
eb596b0905584a Kumar Kartikeya Dwivedi 2022-04-19  5932  
a2d0d62f4d9e35 Andrey Ignatov          2020-06-19  5933  	/* btf_parse_vmlinux() runs under bpf_verifier_lock */
49f4e6720748c7 Jiri Olsa               2020-07-11  5934  	bpf_ctx_convert.t = btf_type_by_id(btf, bpf_ctx_convert_btf_id[0]);
91cc1a99740e2e Alexei Starovoitov      2019-11-14  5935  
d3e42bb0a329fa Martin KaFai Lau        2020-01-27  5936  	bpf_struct_ops_init(btf, log);
27ae7997a66174 Martin KaFai Lau        2020-01-08  5937  
8580ac9404f624 Alexei Starovoitov      2019-10-15  5938  	refcount_set(&btf->refcnt, 1);
5329722057d41a Andrii Nakryiko         2020-11-09  5939  
5329722057d41a Andrii Nakryiko         2020-11-09  5940  	err = btf_alloc_id(btf);
5329722057d41a Andrii Nakryiko         2020-11-09  5941  	if (err)
5329722057d41a Andrii Nakryiko         2020-11-09  5942  		goto errout;
5329722057d41a Andrii Nakryiko         2020-11-09  5943  
5329722057d41a Andrii Nakryiko         2020-11-09  5944  	btf_verifier_env_free(env);
8580ac9404f624 Alexei Starovoitov      2019-10-15  5945  	return btf;
8580ac9404f624 Alexei Starovoitov      2019-10-15  5946  
8580ac9404f624 Alexei Starovoitov      2019-10-15  5947  errout:
8580ac9404f624 Alexei Starovoitov      2019-10-15  5948  	btf_verifier_env_free(env);
8580ac9404f624 Alexei Starovoitov      2019-10-15  5949  	if (btf) {
8580ac9404f624 Alexei Starovoitov      2019-10-15  5950  		kvfree(btf->types);
8580ac9404f624 Alexei Starovoitov      2019-10-15  5951  		kfree(btf);
8580ac9404f624 Alexei Starovoitov      2019-10-15  5952  	}
8580ac9404f624 Alexei Starovoitov      2019-10-15  5953  	return ERR_PTR(err);
8580ac9404f624 Alexei Starovoitov      2019-10-15  5954  }
8580ac9404f624 Alexei Starovoitov      2019-10-15  5955  

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

  parent reply	other threads:[~2024-04-10  6:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 15:01 [PATCH v2 0/3] kbuild: Avoid weak external linkage where possible Ard Biesheuvel
2024-04-09 15:01 ` [PATCH v2 1/3] kallsyms: Avoid weak references for kallsyms symbols Ard Biesheuvel
2024-04-09 15:04   ` Arnd Bergmann
2024-04-09 15:01 ` [PATCH v2 2/3] vmlinux: Avoid weak reference to notes section Ard Biesheuvel
2024-04-09 15:04   ` Arnd Bergmann
2024-04-09 15:01 ` [PATCH v2 3/3] btf: Avoid weak external references Ard Biesheuvel
2024-04-09 15:05   ` Arnd Bergmann
2024-04-10  4:59   ` kernel test robot
2024-04-10  6:35   ` kernel test robot [this message]
2024-04-10  8:21   ` Jiri Olsa
2024-04-10  8:37     ` Ard Biesheuvel
2024-04-10  9:30       ` Jiri Olsa

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=202404101451.ic99Xrk8-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ardb+git@google.com \
    --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 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.