0 day kernel build service
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: kernel/bpf/btf.c:8758:undefined reference to `btf_kobj'
Date: Mon, 07 Sep 2026 11:21:36 +0200	[thread overview]
Message-ID: <202609071155.KwITLv3v-lkp@intel.com> (raw)

:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Alan Maguire <alan.maguire@oracle.com>
CC: 0day robot <lkp@intel.com>

tree:   https://github.com/intel-lab-lkp/linux/commits/Alan-Maguire/btf-Extend-UAPI-to-support-BTF-location-inline-site-info/20260901-175740
head:   9e05e3a3098276adea1e7277934c60598cde310e
commit: ef28548058e47e9c824316fe339f88dfd00c35aa btf: Make vmlinux, module inline info available in /sys/kernel/btf
date:   6 days ago
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
config: i386-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260907/202609071155.KwITLv3v-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260907/202609071155.KwITLv3v-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/r/202609071155.KwITLv3v-lkp@intel.com/

All errors (new ones prefixed by >>):

   ld: kernel/bpf/btf.o: in function `sysfs_btf_add':
>> kernel/bpf/btf.c:8758:(.text+0x10363): undefined reference to `btf_kobj'


vim +8758 kernel/bpf/btf.c

18688de203b47e5 Kumar Kartikeya Dwivedi 2022-01-14  8737  
ef28548058e47e9 Alan Maguire            2026-09-01  8738  #if IS_ENABLED(CONFIG_SYSFS)
ef28548058e47e9 Alan Maguire            2026-09-01  8739  struct bin_attribute *sysfs_btf_add(const char *name, void *data, size_t data_size)
ef28548058e47e9 Alan Maguire            2026-09-01  8740  {
ef28548058e47e9 Alan Maguire            2026-09-01  8741  	struct bin_attribute *attr;
ef28548058e47e9 Alan Maguire            2026-09-01  8742  	int err;
ef28548058e47e9 Alan Maguire            2026-09-01  8743  
ef28548058e47e9 Alan Maguire            2026-09-01  8744  	attr = kzalloc_obj(*attr);
ef28548058e47e9 Alan Maguire            2026-09-01  8745  	if (!attr)
ef28548058e47e9 Alan Maguire            2026-09-01  8746  		return ERR_PTR(-ENOMEM);
ef28548058e47e9 Alan Maguire            2026-09-01  8747  
ef28548058e47e9 Alan Maguire            2026-09-01  8748  	sysfs_bin_attr_init(attr);
ef28548058e47e9 Alan Maguire            2026-09-01  8749  	attr->attr.mode = 0444;
ef28548058e47e9 Alan Maguire            2026-09-01  8750  	attr->size = data_size;
ef28548058e47e9 Alan Maguire            2026-09-01  8751  	attr->private = data;
ef28548058e47e9 Alan Maguire            2026-09-01  8752  	attr->read = sysfs_bin_attr_simple_read;
ef28548058e47e9 Alan Maguire            2026-09-01  8753  	attr->attr.name = kstrdup(name, GFP_KERNEL);
ef28548058e47e9 Alan Maguire            2026-09-01  8754  	if (!attr->attr.name) {
ef28548058e47e9 Alan Maguire            2026-09-01  8755  		err = -ENOMEM;
ef28548058e47e9 Alan Maguire            2026-09-01  8756  		goto err_free;
ef28548058e47e9 Alan Maguire            2026-09-01  8757  	}
ef28548058e47e9 Alan Maguire            2026-09-01 @8758  	err = sysfs_create_bin_file(btf_kobj, attr);
ef28548058e47e9 Alan Maguire            2026-09-01  8759  	if (err) {
ef28548058e47e9 Alan Maguire            2026-09-01  8760  		pr_warn("failed to register [%s] BTF in sysfs: %d\n", name, err);
ef28548058e47e9 Alan Maguire            2026-09-01  8761  		goto err_free;
ef28548058e47e9 Alan Maguire            2026-09-01  8762  	}
ef28548058e47e9 Alan Maguire            2026-09-01  8763  	return attr;
ef28548058e47e9 Alan Maguire            2026-09-01  8764  
ef28548058e47e9 Alan Maguire            2026-09-01  8765  err_free:
ef28548058e47e9 Alan Maguire            2026-09-01  8766  	kfree(attr->attr.name);
ef28548058e47e9 Alan Maguire            2026-09-01  8767  	kfree(attr);
ef28548058e47e9 Alan Maguire            2026-09-01  8768  	return ERR_PTR(err);
ef28548058e47e9 Alan Maguire            2026-09-01  8769  }
ef28548058e47e9 Alan Maguire            2026-09-01  8770  

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

                 reply	other threads:[~2026-09-07  9:22 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=202609071155.KwITLv3v-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild@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