lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210140856.Rbc0XDPl-lkp@intel.com>
Date:   Fri, 14 Oct 2022 08:15:41 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [jolsa-perf:bpf/tracing_multi_ng_4 23/23]
 kernel/bpf/trampoline.c:906: undefined reference to `btf_bitmap_free'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/tracing_multi_ng_4
head:   e3fa3b908cc734f85477c07a0ba93480bd80702c
commit: e3fa3b908cc734f85477c07a0ba93480bd80702c [23/23] bpf: Add support to attach multi trampolines
config: x86_64-rhel-8.3-func
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=e3fa3b908cc734f85477c07a0ba93480bd80702c
        git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
        git fetch --no-tags jolsa-perf bpf/tracing_multi_ng_4
        git checkout e3fa3b908cc734f85477c07a0ba93480bd80702c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   ld: kernel/bpf/trampoline.o: in function `__bpf_trampoline_put':
>> kernel/bpf/trampoline.c:906: undefined reference to `btf_bitmap_free'
   ld: kernel/bpf/trampoline.o: in function `bpf_trampoline_multi_attach':
>> kernel/bpf/trampoline.c:1186: undefined reference to `btf_bitmap_alloc'
>> ld: kernel/bpf/trampoline.c:1187: undefined reference to `btf_bitmap_alloc'
>> ld: kernel/bpf/trampoline.c:1191: undefined reference to `btf_bitmap_copy'
   ld: kernel/bpf/trampoline.o: in function `trampoline_multi_split':
>> kernel/bpf/trampoline.c:1149: undefined reference to `btf_bitmap_copy'
>> ld: kernel/bpf/trampoline.c:1158: undefined reference to `btf_bitmap_andnot'
   ld: kernel/bpf/trampoline.o: in function `bpf_trampoline_multi_attach':
>> kernel/bpf/trampoline.c:1202: undefined reference to `btf_bitmap_andnot'
>> ld: kernel/bpf/trampoline.c:1194: undefined reference to `btf_bitmap_and'
>> ld: kernel/bpf/trampoline.c:1195: undefined reference to `btf_bitmap_empty'
   ld: kernel/bpf/trampoline.o: in function `trampoline_multi_split':
   kernel/bpf/trampoline.c:1126: undefined reference to `btf_bitmap_alloc'
   ld: kernel/bpf/trampoline.c:1127: undefined reference to `btf_bitmap_alloc'
>> ld: kernel/bpf/trampoline.c:1144: undefined reference to `btf_bitmap_free'
   ld: kernel/bpf/trampoline.c:1145: undefined reference to `btf_bitmap_free'
   ld: kernel/bpf/trampoline.o: in function `bpf_trampoline_multi_attach':
   kernel/bpf/trampoline.c:1237: undefined reference to `btf_bitmap_free'
   ld: kernel/bpf/trampoline.c:1238: undefined reference to `btf_bitmap_free'
   ld: kernel/bpf/trampoline.o: in function `trampoline_multi_split':
   kernel/bpf/trampoline.c:1154: undefined reference to `btf_bitmap_free'
   ld: kernel/bpf/trampoline.o: in function `bpf_trampoline_multi_attach':
>> kernel/bpf/trampoline.c:1205: undefined reference to `btf_bitmap_empty'
   ld: kernel/bpf/trampoline.o: in function `trampoline_multi_split':
   kernel/bpf/trampoline.c:1129: undefined reference to `btf_bitmap_free'
   ld: kernel/bpf/trampoline.c:1130: undefined reference to `btf_bitmap_free'
   ld: kernel/bpf/trampoline.c:1136: undefined reference to `btf_bitmap_free'


vim +906 kernel/bpf/trampoline.c

   881	
   882	static void __bpf_trampoline_put(struct bpf_trampoline *tr)
   883	{
   884		int i;
   885	
   886		if (!refcount_dec_and_test(&tr->refcnt))
   887			return;
   888		WARN_ON_ONCE(mutex_is_locked(&tr->mutex));
   889	
   890		for (i = 0; i < BPF_TRAMP_MAX; i++) {
   891			if (!tr->progs_array[i])
   892				continue;
   893			if (WARN_ON_ONCE(!bpf_prog_array_is_empty(tr->progs_array[i])))
   894				return;
   895		}
   896	
   897		/* This code will be executed even when the last bpf_tramp_image
   898		 * is alive. All progs are detached from the trampoline and the
   899		 * trampoline image is patched with jmp into epilogue to skip
   900		 * fexit progs. The fentry-only trampoline will be freed via
   901		 * multiple rcu callbacks.
   902		 */
   903		if (list_empty(&tr->multi.list)) {
   904			hlist_del(&tr->hlist);
   905		} else {
 > 906			btf_bitmap_free(tr->multi.bmap);
   907			list_del(&tr->multi.list);
   908		}
   909	
   910		hlist_del(&tr->hlist);
   911		if (tr->fops) {
   912			ftrace_free_filter(tr->fops);
   913			kfree(tr->fops);
   914		}
   915		kfree(tr);
   916	}
   917	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (168690 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ