All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andrii Nakryiko <andrii@kernel.org>,
	bpf@vger.kernel.org, netdev@vger.kernel.org, ast@fb.com,
	daniel@iogearbox.net
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	andrii@kernel.org, kernel-team@fb.com,
	Hao Luo <haoluo@google.com>
Subject: Re: [PATCH bpf-next  2/4] bpf: support BPF ksym variables in kernel modules
Date: Wed, 6 Jan 2021 16:31:22 +0800	[thread overview]
Message-ID: <202101061644.mcJBZ0T2-lkp@intel.com> (raw)
In-Reply-To: <20210106064048.2554276-3-andrii@kernel.org>

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

Hi Andrii,

I love your patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Andrii-Nakryiko/Support-kernel-module-ksym-variables/20210106-144531
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-a015-20210106 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5c951623bc8965fa1e89660f2f5f4a2944e4981a)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/1dde2eabb1a7670d0e764e46dae1ef0a9abf0466
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andrii-Nakryiko/Support-kernel-module-ksym-variables/20210106-144531
        git checkout 1dde2eabb1a7670d0e764e46dae1ef0a9abf0466
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   kernel/bpf/core.c:1350:12: warning: no previous prototype for function 'bpf_probe_read_kernel' [-Wmissing-prototypes]
   u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr)
              ^
   kernel/bpf/core.c:1350:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr)
   ^
   static 
   kernel/bpf/core.c:1704:6: warning: no previous prototype for function 'bpf_patch_call_args' [-Wmissing-prototypes]
   void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth)
        ^
   kernel/bpf/core.c:1704:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth)
   ^
   static 
   kernel/bpf/core.c:2102:6: warning: no previous prototype for function '__bpf_free_used_maps' [-Wmissing-prototypes]
   void __bpf_free_used_maps(struct bpf_prog_aux *aux,
        ^
   kernel/bpf/core.c:2102:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __bpf_free_used_maps(struct bpf_prog_aux *aux,
   ^
   static 
>> kernel/bpf/core.c:2122:6: warning: no previous prototype for function '__bpf_free_used_btfs' [-Wmissing-prototypes]
   void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
        ^
   kernel/bpf/core.c:2122:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
   ^
   static 
   4 warnings generated.


vim +/__bpf_free_used_btfs +2122 kernel/bpf/core.c

  2101	
> 2102	void __bpf_free_used_maps(struct bpf_prog_aux *aux,
  2103				  struct bpf_map **used_maps, u32 len)
  2104	{
  2105		struct bpf_map *map;
  2106		u32 i;
  2107	
  2108		for (i = 0; i < len; i++) {
  2109			map = used_maps[i];
  2110			if (map->ops->map_poke_untrack)
  2111				map->ops->map_poke_untrack(map, aux);
  2112			bpf_map_put(map);
  2113		}
  2114	}
  2115	
  2116	static void bpf_free_used_maps(struct bpf_prog_aux *aux)
  2117	{
  2118		__bpf_free_used_maps(aux, aux->used_maps, aux->used_map_cnt);
  2119		kfree(aux->used_maps);
  2120	}
  2121	
> 2122	void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
  2123				  struct btf_mod_pair *used_btfs, u32 len)
  2124	{
  2125	#ifdef CONFIG_BPF_SYSCALL
  2126		struct btf_mod_pair *btf_mod;
  2127		u32 i;
  2128	
  2129		for (i = 0; i < len; i++) {
  2130			btf_mod = &used_btfs[i];
  2131			if (btf_mod->module)
  2132				module_put(btf_mod->module);
  2133			btf_put(btf_mod->btf);
  2134		}
  2135	#endif
  2136	}
  2137	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH bpf-next 2/4] bpf: support BPF ksym variables in kernel modules
Date: Wed, 06 Jan 2021 16:31:22 +0800	[thread overview]
Message-ID: <202101061644.mcJBZ0T2-lkp@intel.com> (raw)
In-Reply-To: <20210106064048.2554276-3-andrii@kernel.org>

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

Hi Andrii,

I love your patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Andrii-Nakryiko/Support-kernel-module-ksym-variables/20210106-144531
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-a015-20210106 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5c951623bc8965fa1e89660f2f5f4a2944e4981a)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/1dde2eabb1a7670d0e764e46dae1ef0a9abf0466
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andrii-Nakryiko/Support-kernel-module-ksym-variables/20210106-144531
        git checkout 1dde2eabb1a7670d0e764e46dae1ef0a9abf0466
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   kernel/bpf/core.c:1350:12: warning: no previous prototype for function 'bpf_probe_read_kernel' [-Wmissing-prototypes]
   u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr)
              ^
   kernel/bpf/core.c:1350:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr)
   ^
   static 
   kernel/bpf/core.c:1704:6: warning: no previous prototype for function 'bpf_patch_call_args' [-Wmissing-prototypes]
   void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth)
        ^
   kernel/bpf/core.c:1704:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth)
   ^
   static 
   kernel/bpf/core.c:2102:6: warning: no previous prototype for function '__bpf_free_used_maps' [-Wmissing-prototypes]
   void __bpf_free_used_maps(struct bpf_prog_aux *aux,
        ^
   kernel/bpf/core.c:2102:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __bpf_free_used_maps(struct bpf_prog_aux *aux,
   ^
   static 
>> kernel/bpf/core.c:2122:6: warning: no previous prototype for function '__bpf_free_used_btfs' [-Wmissing-prototypes]
   void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
        ^
   kernel/bpf/core.c:2122:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
   ^
   static 
   4 warnings generated.


vim +/__bpf_free_used_btfs +2122 kernel/bpf/core.c

  2101	
> 2102	void __bpf_free_used_maps(struct bpf_prog_aux *aux,
  2103				  struct bpf_map **used_maps, u32 len)
  2104	{
  2105		struct bpf_map *map;
  2106		u32 i;
  2107	
  2108		for (i = 0; i < len; i++) {
  2109			map = used_maps[i];
  2110			if (map->ops->map_poke_untrack)
  2111				map->ops->map_poke_untrack(map, aux);
  2112			bpf_map_put(map);
  2113		}
  2114	}
  2115	
  2116	static void bpf_free_used_maps(struct bpf_prog_aux *aux)
  2117	{
  2118		__bpf_free_used_maps(aux, aux->used_maps, aux->used_map_cnt);
  2119		kfree(aux->used_maps);
  2120	}
  2121	
> 2122	void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
  2123				  struct btf_mod_pair *used_btfs, u32 len)
  2124	{
  2125	#ifdef CONFIG_BPF_SYSCALL
  2126		struct btf_mod_pair *btf_mod;
  2127		u32 i;
  2128	
  2129		for (i = 0; i < len; i++) {
  2130			btf_mod = &used_btfs[i];
  2131			if (btf_mod->module)
  2132				module_put(btf_mod->module);
  2133			btf_put(btf_mod->btf);
  2134		}
  2135	#endif
  2136	}
  2137	

---
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: 32992 bytes --]

  parent reply	other threads:[~2021-01-06  8:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06  6:40 [PATCH bpf-next 0/4] Support kernel module ksym variables Andrii Nakryiko
2021-01-06  6:40 ` [PATCH bpf-next 1/4] selftests/bpf: sync RCU before unloading bpf_testmod Andrii Nakryiko
2021-01-06  6:40 ` [PATCH bpf-next 2/4] bpf: support BPF ksym variables in kernel modules Andrii Nakryiko
2021-01-06  8:16   ` kernel test robot
2021-01-06  8:16     ` kernel test robot
2021-01-06  8:31   ` kernel test robot [this message]
2021-01-06  8:31     ` kernel test robot
2021-01-06  6:40 ` [PATCH bpf-next 3/4] libbpf: support kernel module ksym externs Andrii Nakryiko
2021-01-06  6:40 ` [PATCH bpf-next 4/4] selftests/bpf: test " Andrii Nakryiko

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=202101061644.mcJBZ0T2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    /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.