bpf: fix: symbol 'btf_vmlinux' was not declared.
Subsystems (4)
PATCH 1/1 bpf: fix: symbol 'btf_vmlinux' was not declared.
Symbol 'btf_vmlinux' was not declared in the header file and does not add extern, so no other file uses it. It's better to add static to it.
--- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/verifier.c +1 -1
@@ -244,7 +244,7 @@ struct bpf_call_arg_meta {u32 ret_btf_id; }; -struct btf *btf_vmlinux; +static struct btf *btf_vmlinux;static DEFINE_MUTEX (bpf_verifier_lock);
Signature · 1 line
1.8.3.1
kernel test robot
build botThank you for the patch! Yet something to improve:
Hi YANG,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
[also build test ERROR on bpf/master net-next/master net/master sparc-next/master v5.10 next-20201223] [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]
url: https://github.com/0day-ci/linux/commits/YANG-LI/bpf-fix-symbol-btf_vmlinux-was-not-declared/20201224-160318 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: nios2-randconfig-r001-20201223 (attached as .config) compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/e443ee8542971435ebeda1154d82c55c2786b92a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review YANG-LI/bpf-fix-symbol-btf_vmlinux-was-not-declared/20201224-160318 git checkout e443ee8542971435ebeda1154d82c55c2786b92a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
nios2-linux-ld: kernel/bpf/btf.o: in function `btf_get_prog_ctx_type.isra.0':
btf.c:(.text+0x4b84): undefined reference to `btf_vmlinux'
>> nios2-linux-ld: btf.c:(.text+0x4b88): undefined reference to `btf_vmlinux'
nios2-linux-ld: kernel/bpf/btf.o: in function `btf_ctx_access':
btf.c:(.text+0x8178): undefined reference to `btf_vmlinux'
nios2-linux-ld: btf.c:(.text+0x817c): undefined reference to `btf_vmlinux'
nios2-linux-ld: btf.c:(.text+0x81d8): undefined reference to `btf_vmlinux'
nios2-linux-ld: kernel/bpf/btf.o:btf.c:(.text+0x81dc): more undefined references to `btf_vmlinux' follow
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SERIAL_CORE_CONSOLE Depends on TTY && HAS_IOMEM
Selected by
- EARLY_PRINTK
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
kernel test robot
build botThank you for the patch! Yet something to improve:
Hi YANG,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
[also build test ERROR on bpf/master net-next/master net/master sparc-next/master v5.10 next-20201223] [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]
url: https://github.com/0day-ci/linux/commits/YANG-LI/bpf-fix-symbol-btf_vmlinux-was-not-declared/20201224-160318 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: powerpc64-randconfig-r005-20201223 (attached as .config) compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/e443ee8542971435ebeda1154d82c55c2786b92a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review YANG-LI/bpf-fix-symbol-btf_vmlinux-was-not-declared/20201224-160318 git checkout e443ee8542971435ebeda1154d82c55c2786b92a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
powerpc-linux-ld: kernel/bpf/btf.o: in function `btf_get_prog_ctx_type.isra.0':
btf.c:(.text+0x4dd2): undefined reference to `btf_vmlinux'
>> powerpc-linux-ld: btf.c:(.text+0x4dd6): undefined reference to `btf_vmlinux'
powerpc-linux-ld: btf.c:(.text+0x4dea): undefined reference to `btf_vmlinux'
powerpc-linux-ld: kernel/bpf/btf.o: in function `btf_ctx_access':
btf.c:(.text+0x93f6): undefined reference to `btf_vmlinux'
powerpc-linux-ld: btf.c:(.text+0x93fa): undefined reference to `btf_vmlinux'
powerpc-linux-ld: kernel/bpf/btf.o:btf.c:(.text+0x9402): more undefined references to `btf_vmlinux' follow
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org