From: Jiri Olsa <olsajiri@gmail.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, Sasha Levin <sashal@kernel.org>,
Stanislav Fomichev <sdf@google.com>,
Alexei Starovoitov <ast@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [linux-stable-rc:queue/6.0 311/314] include/linux/bpf.h:2310:20: error: static declaration of 'bpf_prog_inc_misses_counter' follows non-static declaration
Date: Thu, 24 Nov 2022 10:32:25 +0100 [thread overview]
Message-ID: <Y386KQJ3/WN8apop@krava> (raw)
In-Reply-To: <202211232231.Y6OJy9KQ-lkp@intel.com>
On Wed, Nov 23, 2022 at 10:15:29PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git queue/6.0
> head: 18012ab4ede3cad45033b4403c744a54d0b81438
> commit: 618ec81a64fe23571a79b77c26b5d326425934f8 [311/314] bpf: Prevent bpf program recursion for raw tracepoint probes
> config: microblaze-randconfig-r032-20221120
> compiler: microblaze-linux-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=618ec81a64fe23571a79b77c26b5d326425934f8
> git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> git fetch --no-tags linux-stable-rc queue/6.0
> git checkout 618ec81a64fe23571a79b77c26b5d326425934f8
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=microblaze SHELL=/bin/bash kernel/bpf/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> In file included from tools/lib/bpf/relo_core.c:5:
> >> include/linux/bpf.h:2310:20: error: static declaration of 'bpf_prog_inc_misses_counter' follows non-static declaration
> 2310 | static inline void bpf_prog_inc_misses_counter(struct bpf_prog *prog)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/bpf.h:1970:14: note: previous declaration of 'bpf_prog_inc_misses_counter' with type 'void(struct bpf_prog *)'
> 1970 | void notrace bpf_prog_inc_misses_counter(struct bpf_prog *prog);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> --
> In file included from kernel/bpf/syscall.c:4:
> >> include/linux/bpf.h:2310:20: error: static declaration of 'bpf_prog_inc_misses_counter' follows non-static declaration
> 2310 | static inline void bpf_prog_inc_misses_counter(struct bpf_prog *prog)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/bpf.h:1970:14: note: previous declaration of 'bpf_prog_inc_misses_counter' with type 'void(struct bpf_prog *)'
> 1970 | void notrace bpf_prog_inc_misses_counter(struct bpf_prog *prog);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> kernel/bpf/syscall.c:2097:14: error: redefinition of 'bpf_prog_inc_misses_counter'
> 2097 | void notrace bpf_prog_inc_misses_counter(struct bpf_prog *prog)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/bpf.h:2310:20: note: previous definition of 'bpf_prog_inc_misses_counter' with type 'void(struct bpf_prog *)'
> 2310 | static inline void bpf_prog_inc_misses_counter(struct bpf_prog *prog)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> --
> In file included from include/linux/bpf_verifier.h:7,
> from kernel/bpf/btf.c:19:
> >> include/linux/bpf.h:2310:20: error: static declaration of 'bpf_prog_inc_misses_counter' follows non-static declaration
> 2310 | static inline void bpf_prog_inc_misses_counter(struct bpf_prog *prog)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/bpf.h:1970:14: note: previous declaration of 'bpf_prog_inc_misses_counter' with type 'void(struct bpf_prog *)'
> 1970 | void notrace bpf_prog_inc_misses_counter(struct bpf_prog *prog);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> kernel/bpf/btf.c: In function 'btf_seq_show':
> kernel/bpf/btf.c:6609:29: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> 6609 | seq_vprintf((struct seq_file *)show->target, fmt, args);
> | ^~~~~~~~
> kernel/bpf/btf.c: In function 'btf_snprintf_show':
> kernel/bpf/btf.c:6646:9: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> 6646 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
> | ^~~
>
>
> vim +/bpf_prog_inc_misses_counter +2310 include/linux/bpf.h
>
> 2309
> > 2310 static inline void bpf_prog_inc_misses_counter(struct bpf_prog *prog)
> 2311 {
> 2312 }
> 2313 #endif /* CONFIG_BPF_SYSCALL */
> 2314 #endif /* CONFIG_NET && CONFIG_BPF_SYSCALL */
hi,
I checked the linux-stable-rc.git queue/6.0 branch and it looks like the
backport patch shifted above inline stub into wrong ifdef block
with patch below I get it built
jirka
---
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index e0feae308408..73662fbabd78 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -2177,6 +2177,9 @@ static inline bool unprivileged_ebpf_enabled(void)
return false;
}
+static inline void bpf_prog_inc_misses_counter(struct bpf_prog *prog)
+{
+}
#endif /* CONFIG_BPF_SYSCALL */
void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
@@ -2306,10 +2309,6 @@ static inline int sock_map_bpf_prog_query(const union bpf_attr *attr,
{
return -EINVAL;
}
-
-static inline void bpf_prog_inc_misses_counter(struct bpf_prog *prog)
-{
-}
#endif /* CONFIG_BPF_SYSCALL */
#endif /* CONFIG_NET && CONFIG_BPF_SYSCALL */
prev parent reply other threads:[~2022-11-24 9:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 14:15 [linux-stable-rc:queue/6.0 311/314] include/linux/bpf.h:2310:20: error: static declaration of 'bpf_prog_inc_misses_counter' follows non-static declaration kernel test robot
2022-11-24 9:32 ` Jiri Olsa [this message]
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=Y386KQJ3/WN8apop@krava \
--to=olsajiri@gmail.com \
--cc=ast@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sashal@kernel.org \
--cc=sdf@google.com \
/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.