From: Song Liu <liu.song.a23@gmail.com>
To: Alexei Starovoitov <ast@kernel.org>
Cc: "David S . Miller" <davem@davemloft.net>,
Daniel Borkmann <daniel@iogearbox.net>,
sfr@canb.auug.org.au, Networking <netdev@vger.kernel.org>,
bpf@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH bpf-next] bpf: fix build without bpf_syscall
Date: Thu, 28 Feb 2019 11:08:18 -0800 [thread overview]
Message-ID: <CAPhsuW5ujxPyAExPAT7fp=PzEdLKmPysh=5ZKAN5J2B85buShQ@mail.gmail.com> (raw)
In-Reply-To: <20190228023044.3802998-1-ast@kernel.org>
On Wed, Feb 27, 2019 at 6:32 PM Alexei Starovoitov <ast@kernel.org> wrote:
>
> wrap bpf_stats_enabled sysctl with #ifdef
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Fixes: 492ecee892c2 ("bpf: enable program stats")
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
> ---
> kernel/sysctl.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 86e0771352f2..7578e21a711b 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -224,9 +224,11 @@ static int proc_dostring_coredump(struct ctl_table *table, int write,
> #endif
> static int proc_dopipe_max_size(struct ctl_table *table, int write,
> void __user *buffer, size_t *lenp, loff_t *ppos);
> +#ifdef CONFIG_BPF_SYSCALL
> static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
> void __user *buffer, size_t *lenp,
> loff_t *ppos);
> +#endif
>
> #ifdef CONFIG_MAGIC_SYSRQ
> /* Note: sysrq code uses its own private copy */
> @@ -1232,7 +1234,6 @@ static struct ctl_table kern_table[] = {
> .extra1 = &one,
> .extra2 = &one,
> },
> -#endif
> {
> .procname = "bpf_stats_enabled",
> .data = &sysctl_bpf_stats_enabled,
> @@ -1242,6 +1243,7 @@ static struct ctl_table kern_table[] = {
> .extra1 = &zero,
> .extra2 = &one,
> },
> +#endif
> #if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU)
> {
> .procname = "panic_on_rcu_stall",
> @@ -3272,6 +3274,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
>
> #endif /* CONFIG_PROC_SYSCTL */
>
> +#ifdef CONFIG_BPF_SYSCALL
> static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
> void __user *buffer, size_t *lenp,
> loff_t *ppos)
> @@ -3293,7 +3296,7 @@ static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
> }
> return ret;
> }
> -
> +#endif
> /*
> * No sense putting this after each symbol definition, twice,
> * exception granted :-)
> --
> 2.20.0
>
prev parent reply other threads:[~2019-02-28 19:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 2:30 [PATCH bpf-next] bpf: fix build without bpf_syscall Alexei Starovoitov
2019-02-28 19:08 ` Song Liu [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='CAPhsuW5ujxPyAExPAT7fp=PzEdLKmPysh=5ZKAN5J2B85buShQ@mail.gmail.com' \
--to=liu.song.a23@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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).