All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bpf: fix: symbol 'btf_vmlinux' was not declared.
@ 2020-12-24  8:00 YANG LI
  2020-12-25 10:47 ` kernel test robot
  2020-12-25 11:39 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: YANG LI @ 2020-12-24  8:00 UTC (permalink / raw)
  To: ast
  Cc: daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
	kpsingh, davem, kuba, hawk, natechancellor, ndesaulniers, netdev,
	bpf, linux-kernel, clang-built-linux, YANG LI

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.

Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com>
Reported-by: Abaci <abaci@linux.alibaba.com>
---
 kernel/bpf/verifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 17270b8..535d364 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -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);
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] bpf: fix: symbol 'btf_vmlinux' was not declared.
  2020-12-24  8:00 [PATCH] bpf: fix: symbol 'btf_vmlinux' was not declared YANG LI
@ 2020-12-25 10:47 ` kernel test robot
  2020-12-25 11:39 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-12-25 10:47 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]

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
Reported-by: kernel test robot <lkp@intel.com>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24884 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bpf: fix: symbol 'btf_vmlinux' was not declared.
  2020-12-24  8:00 [PATCH] bpf: fix: symbol 'btf_vmlinux' was not declared YANG LI
  2020-12-25 10:47 ` kernel test robot
@ 2020-12-25 11:39 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-12-25 11:39 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2277 bytes --]

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
Reported-by: kernel test robot <lkp@intel.com>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29407 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-25 11:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24  8:00 [PATCH] bpf: fix: symbol 'btf_vmlinux' was not declared YANG LI
2020-12-25 10:47 ` kernel test robot
2020-12-25 11:39 ` kernel test robot

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.