netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] netfilter: xt_bpf: don't include linux/filter.h from uapi header
@ 2014-07-29 15:36 Pablo Neira Ayuso
  2014-07-29 15:36 ` [PATCH net-next 2/2] net: filter: don't release unattached filter through call_rcu() Pablo Neira Ayuso
  2014-07-29 15:43 ` [PATCH net-next 1/2] netfilter: xt_bpf: don't include linux/filter.h from uapi header Willem de Bruijn
  0 siblings, 2 replies; 8+ messages in thread
From: Pablo Neira Ayuso @ 2014-07-29 15:36 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev, ast, dborkman, willemb, keescook

In e6f30c7 ("netfilter: x_tables: add xt_bpf match"), the internal
linux/filter.h header slipped through in the user exposed xt_bpf.h
header as included file.

Fix this by defining struct sk_filter; so we skip the casting in
kernelspace. This is safe since userspace has no way to lurk with
that internal pointer.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
@David: This patch is very small and it can probably go into net, but it's
        quite late for changes in -rc7 probably. Your call :-). Thanks.

 include/uapi/linux/netfilter/xt_bpf.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/netfilter/xt_bpf.h b/include/uapi/linux/netfilter/xt_bpf.h
index 5dda450..93fca65 100644
--- a/include/uapi/linux/netfilter/xt_bpf.h
+++ b/include/uapi/linux/netfilter/xt_bpf.h
@@ -1,11 +1,12 @@
 #ifndef _XT_BPF_H
 #define _XT_BPF_H
 
-#include <linux/filter.h>
 #include <linux/types.h>
 
 #define XT_BPF_MAX_NUM_INSTR	64
 
+struct sk_filter;
+
 struct xt_bpf_info {
 	__u16 bpf_program_num_elem;
 	struct sock_filter bpf_program[XT_BPF_MAX_NUM_INSTR];
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-07-31  2:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-29 15:36 [PATCH net-next 1/2] netfilter: xt_bpf: don't include linux/filter.h from uapi header Pablo Neira Ayuso
2014-07-29 15:36 ` [PATCH net-next 2/2] net: filter: don't release unattached filter through call_rcu() Pablo Neira Ayuso
2014-07-29 16:09   ` Alexei Starovoitov
2014-07-31  2:57   ` David Miller
2014-07-29 15:43 ` [PATCH net-next 1/2] netfilter: xt_bpf: don't include linux/filter.h from uapi header Willem de Bruijn
2014-07-29 16:05   ` Pablo Neira Ayuso
2014-07-29 16:35     ` Willem de Bruijn
2014-07-29 17:03       ` Pablo Neira Ayuso

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).