* [PATCH] bpf: fix sysctl.c warning
@ 2019-03-04 20:34 Arnd Bergmann
2019-03-04 20:47 ` Kees Cook
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2019-03-04 20:34 UTC (permalink / raw)
To: Luis Chamberlain, Kees Cook, Alexei Starovoitov, Daniel Borkmann
Cc: Arnd Bergmann, Martin KaFai Lau, Song Liu, Yonghong Song,
Andrew Morton, Christian Brauner, linux-kernel, linux-fsdevel,
netdev, bpf
When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get
a warning about an unused function:
kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_stats' defined but not used [-Werror=unused-function]
static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
The CONFIG_BPF_SYSCALL check was already handled, but the SYSCTL check
is needed on top.
Fixes: 492ecee892c2 ("bpf: enable program stats")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
kernel/sysctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 46a0d0a14a66..b3df3ab7ac28 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -3330,7 +3330,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
#endif /* CONFIG_PROC_SYSCTL */
-#ifdef CONFIG_BPF_SYSCALL
+#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_SYSCTL)
static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp,
loff_t *ppos)
--
2.20.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] bpf: fix sysctl.c warning
2019-03-04 20:34 [PATCH] bpf: fix sysctl.c warning Arnd Bergmann
@ 2019-03-04 20:47 ` Kees Cook
2019-03-04 20:57 ` Christian Brauner
2019-03-07 10:05 ` Daniel Borkmann
2 siblings, 0 replies; 5+ messages in thread
From: Kees Cook @ 2019-03-04 20:47 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Luis Chamberlain, Alexei Starovoitov, Daniel Borkmann,
Martin KaFai Lau, Song Liu, Yonghong Song, Andrew Morton,
Christian Brauner, LKML, linux-fsdevel, Network Development, bpf
On Mon, Mar 4, 2019 at 12:34 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get
> a warning about an unused function:
>
> kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_stats' defined but not used [-Werror=unused-function]
> static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
>
> The CONFIG_BPF_SYSCALL check was already handled, but the SYSCTL check
> is needed on top.
>
> Fixes: 492ecee892c2 ("bpf: enable program stats")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
-Kees
> ---
> kernel/sysctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 46a0d0a14a66..b3df3ab7ac28 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -3330,7 +3330,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
>
> #endif /* CONFIG_PROC_SYSCTL */
>
> -#ifdef CONFIG_BPF_SYSCALL
> +#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_SYSCTL)
> static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
> void __user *buffer, size_t *lenp,
> loff_t *ppos)
> --
> 2.20.0
>
--
Kees Cook
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bpf: fix sysctl.c warning
2019-03-04 20:34 [PATCH] bpf: fix sysctl.c warning Arnd Bergmann
2019-03-04 20:47 ` Kees Cook
@ 2019-03-04 20:57 ` Christian Brauner
2019-03-04 20:58 ` Song Liu
2019-03-07 10:05 ` Daniel Borkmann
2 siblings, 1 reply; 5+ messages in thread
From: Christian Brauner @ 2019-03-04 20:57 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Luis Chamberlain, Kees Cook, Alexei Starovoitov, Daniel Borkmann,
Martin KaFai Lau, Song Liu, Yonghong Song, Andrew Morton,
linux-kernel, linux-fsdevel, netdev, bpf
On Mon, Mar 04, 2019 at 09:34:12PM +0100, Arnd Bergmann wrote:
> When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get
> a warning about an unused function:
>
> kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_stats' defined but not used [-Werror=unused-function]
> static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
>
> The CONFIG_BPF_SYSCALL check was already handled, but the SYSCTL check
> is needed on top.
>
> Fixes: 492ecee892c2 ("bpf: enable program stats")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Christian Brauner <christian@brauner.io>
> ---
> kernel/sysctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 46a0d0a14a66..b3df3ab7ac28 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -3330,7 +3330,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
>
> #endif /* CONFIG_PROC_SYSCTL */
>
> -#ifdef CONFIG_BPF_SYSCALL
> +#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_SYSCTL)
> static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
> void __user *buffer, size_t *lenp,
> loff_t *ppos)
> --
> 2.20.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bpf: fix sysctl.c warning
2019-03-04 20:57 ` Christian Brauner
@ 2019-03-04 20:58 ` Song Liu
0 siblings, 0 replies; 5+ messages in thread
From: Song Liu @ 2019-03-04 20:58 UTC (permalink / raw)
To: Christian Brauner
Cc: Arnd Bergmann, Luis Chamberlain, Kees Cook, Alexei Starovoitov,
Daniel Borkmann, Martin Lau, Yonghong Song, Andrew Morton,
linux-kernel, linux-fsdevel, netdev, bpf
> On Mar 4, 2019, at 12:57 PM, Christian Brauner <christian@brauner.io> wrote:
>
> On Mon, Mar 04, 2019 at 09:34:12PM +0100, Arnd Bergmann wrote:
>> When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get
>> a warning about an unused function:
>>
>> kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_stats' defined but not used [-Werror=unused-function]
>> static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
>>
>> The CONFIG_BPF_SYSCALL check was already handled, but the SYSCTL check
>> is needed on top.
>>
>> Fixes: 492ecee892c2 ("bpf: enable program stats")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Reviewed-by: Christian Brauner <christian@brauner.io>
Acked-by: Song Liu <songliubraving@fb.com>
>
>> ---
>> kernel/sysctl.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
>> index 46a0d0a14a66..b3df3ab7ac28 100644
>> --- a/kernel/sysctl.c
>> +++ b/kernel/sysctl.c
>> @@ -3330,7 +3330,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
>>
>> #endif /* CONFIG_PROC_SYSCTL */
>>
>> -#ifdef CONFIG_BPF_SYSCALL
>> +#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_SYSCTL)
>> static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
>> void __user *buffer, size_t *lenp,
>> loff_t *ppos)
>> --
>> 2.20.0
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] bpf: fix sysctl.c warning
2019-03-04 20:34 [PATCH] bpf: fix sysctl.c warning Arnd Bergmann
2019-03-04 20:47 ` Kees Cook
2019-03-04 20:57 ` Christian Brauner
@ 2019-03-07 10:05 ` Daniel Borkmann
2 siblings, 0 replies; 5+ messages in thread
From: Daniel Borkmann @ 2019-03-07 10:05 UTC (permalink / raw)
To: Arnd Bergmann, Luis Chamberlain, Kees Cook, Alexei Starovoitov
Cc: Martin KaFai Lau, Song Liu, Yonghong Song, Andrew Morton,
Christian Brauner, linux-kernel, linux-fsdevel, netdev, bpf
On 03/04/2019 09:34 PM, Arnd Bergmann wrote:
> When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get
> a warning about an unused function:
>
> kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_stats' defined but not used [-Werror=unused-function]
> static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
>
> The CONFIG_BPF_SYSCALL check was already handled, but the SYSCTL check
> is needed on top.
>
> Fixes: 492ecee892c2 ("bpf: enable program stats")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-03-07 10:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 20:34 [PATCH] bpf: fix sysctl.c warning Arnd Bergmann
2019-03-04 20:47 ` Kees Cook
2019-03-04 20:57 ` Christian Brauner
2019-03-04 20:58 ` Song Liu
2019-03-07 10:05 ` Daniel Borkmann
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).