[PATCH v2 bpf-next] bpfilter: Fix mismatch in function argument types

Subsystems: bpf [core], bpf [general] (safe dynamic programs and tools), the rest

STALE2943d

4 messages, 4 authors, 2018-07-21 · open the first message on its own page

[PATCH v2 bpf-next] bpfilter: Fix mismatch in function argument types

From: YueHaibing <hidden>
Date: 2018-07-19 07:57:40

Fix following warning:
net/ipv4/bpfilter/sockopt.c:28:5: error: symbol 'bpfilter_ip_set_sockopt' redeclared with different type
net/ipv4/bpfilter/sockopt.c:34:5: error: symbol 'bpfilter_ip_get_sockopt' redeclared with different type

Signed-off-by: YueHaibing <redacted>
---
 include/linux/bpfilter.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/bpfilter.h b/include/linux/bpfilter.h
index 687b176..f02cee0 100644
--- a/include/linux/bpfilter.h
+++ b/include/linux/bpfilter.h
@@ -5,10 +5,10 @@
 #include <uapi/linux/bpfilter.h>
 
 struct sock;
-int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char *optval,
+int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char __user *optval,
 			    unsigned int optlen);
-int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char *optval,
-			    int *optlen);
+int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
+			    int __user *optlen);
 extern int (*bpfilter_process_sockopt)(struct sock *sk, int optname,
 				       char __user *optval,
 				       unsigned int optlen, bool is_set);
-- 
2.7.0

Re: [PATCH v2 bpf-next] bpfilter: Fix mismatch in function argument types

From: Martin KaFai Lau <hidden>
Date: 2018-07-19 15:49:26

On Thu, Jul 19, 2018 at 03:56:59PM +0800, YueHaibing wrote:
Fix following warning:
net/ipv4/bpfilter/sockopt.c:28:5: error: symbol 'bpfilter_ip_set_sockopt' redeclared with different type
net/ipv4/bpfilter/sockopt.c:34:5: error: symbol 'bpfilter_ip_get_sockopt' redeclared with different type

Signed-off-by: YueHaibing <redacted>
LGTM.  Missing a Fixes tag though.

Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module")
Acked-by: Martin KaFai Lau <redacted>

Re: [PATCH v2 bpf-next] bpfilter: Fix mismatch in function argument types

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2018-07-19 15:51:51

On 07/19/2018 05:48 PM, Martin KaFai Lau wrote:
On Thu, Jul 19, 2018 at 03:56:59PM +0800, YueHaibing wrote:
quoted
Fix following warning:
net/ipv4/bpfilter/sockopt.c:28:5: error: symbol 'bpfilter_ip_set_sockopt' redeclared with different type
net/ipv4/bpfilter/sockopt.c:34:5: error: symbol 'bpfilter_ip_get_sockopt' redeclared with different type

Signed-off-by: YueHaibing <redacted>
LGTM.  Missing a Fixes tag though.

Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module")
Acked-by: Martin KaFai Lau <redacted>
(Should go to -net tree.)

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

Re: [PATCH v2 bpf-next] bpfilter: Fix mismatch in function argument types

From: David Miller <davem@davemloft.net>
Date: 2018-07-21 23:21:55

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Thu, 19 Jul 2018 17:51:41 +0200
On 07/19/2018 05:48 PM, Martin KaFai Lau wrote:
quoted
On Thu, Jul 19, 2018 at 03:56:59PM +0800, YueHaibing wrote:
quoted
Fix following warning:
net/ipv4/bpfilter/sockopt.c:28:5: error: symbol 'bpfilter_ip_set_sockopt' redeclared with different type
net/ipv4/bpfilter/sockopt.c:34:5: error: symbol 'bpfilter_ip_get_sockopt' redeclared with different type

Signed-off-by: YueHaibing <redacted>
LGTM.  Missing a Fixes tag though.

Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module")
Acked-by: Martin KaFai Lau <redacted>
(Should go to -net tree.)

Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help