From: Daniel Borkmann <daniel@iogearbox.net>
To: Alexander Lobakin <alobakin@dlink.ru>
Cc: "David S. Miller" <davem@davemloft.net>,
Alexei Starovoitov <ast@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
Eric Dumazet <edumazet@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Soheil Hassas Yeganeh <soheil@google.com>,
Aaron Tomlin <atomlin@redhat.com>,
Matteo Croce <mcroce@redhat.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Edward Cree <ecree@solarflare.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org
Subject: Re: [PATCH net] net: core: sysctl: fix compiler warning when only cBPF is present
Date: Thu, 19 Dec 2019 17:20:51 +0100 [thread overview]
Message-ID: <20191219162051.GA11015@linux-9.fritz.box> (raw)
In-Reply-To: <20191218091821.7080-1-alobakin@dlink.ru>
On Wed, Dec 18, 2019 at 12:18:21PM +0300, Alexander Lobakin wrote:
> proc_dointvec_minmax_bpf_restricted() has been firstly introduced
> in commit 2e4a30983b0f ("bpf: restrict access to core bpf sysctls")
> under CONFIG_HAVE_EBPF_JIT. Then, this ifdef has been removed in
> ede95a63b5e8 ("bpf: add bpf_jit_limit knob to restrict unpriv
> allocations"), because a new sysctl, bpf_jit_limit, made use of it.
> Finally, this parameter has become long instead of integer with
> fdadd04931c2 ("bpf: fix bpf_jit_limit knob for PAGE_SIZE >= 64K")
> and thus, a new proc_dolongvec_minmax_bpf_restricted() has been
> added.
> With this last change, we got back to that
> proc_dointvec_minmax_bpf_restricted() is used only under
> CONFIG_HAVE_EBPF_JIT, but the corresponding ifdef has not been
> brought back.
>
> So, in configurations like CONFIG_BPF_JIT=y && CONFIG_HAVE_EBPF_JIT=n
> since v4.20 we have:
>
> CC net/core/sysctl_net_core.o
> net/core/sysctl_net_core.c:292:1: warning: ‘proc_dointvec_minmax_bpf_restricted’ defined but not used [-Wunused-function]
> 292 | proc_dointvec_minmax_bpf_restricted(struct ctl_table *table, int write,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Suppress this by guarding it with CONFIG_HAVE_EBPF_JIT again.
>
> Fixes: fdadd04931c2 ("bpf: fix bpf_jit_limit knob for PAGE_SIZE >= 64K")
> Signed-off-by: Alexander Lobakin <alobakin@dlink.ru>
Applied, thanks!
prev parent reply other threads:[~2019-12-19 16:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 9:18 [PATCH net] net: core: sysctl: fix compiler warning when only cBPF is present Alexander Lobakin
2019-12-19 16:20 ` Daniel Borkmann [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=20191219162051.GA11015@linux-9.fritz.box \
--to=daniel@iogearbox.net \
--cc=akpm@linux-foundation.org \
--cc=alobakin@dlink.ru \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=atomlin@redhat.com \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=ecree@solarflare.com \
--cc=edumazet@google.com \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcroce@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=soheil@google.com \
--cc=songliubraving@fb.com \
--cc=xiyou.wangcong@gmail.com \
--cc=yhs@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).