netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] net: filter: make bpf_migrate_filter available outside of net/core/filter.c
       [not found] <1430314657-2552-1-git-send-email-nschichan@freebox.fr>
@ 2015-04-29 13:37 ` Nicolas Schichan
  2015-04-29 16:46 ` [PATCH 0/4] Seccomp filter JIT support on ARM Alexei Starovoitov
  1 sibling, 0 replies; 2+ messages in thread
From: Nicolas Schichan @ 2015-04-29 13:37 UTC (permalink / raw)
  To: David S. Miller, Alexei Starovoitov, Daniel Borkmann,
	linux-kernel, netdev
  Cc: Nicolas Schichan

This is in preparation of its use in the seccomp code.

Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
---
 include/linux/filter.h | 1 +
 net/core/filter.c      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/filter.h b/include/linux/filter.h
index caac208..7e0811b 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -379,6 +379,7 @@ static inline void bpf_prog_unlock_free(struct bpf_prog *fp)
 
 int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog);
 void bpf_prog_destroy(struct bpf_prog *fp);
+struct bpf_prog *bpf_migrate_filter(struct bpf_prog *fp);
 
 int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
 int sk_attach_bpf(u32 ufd, struct sock *sk);
diff --git a/net/core/filter.c b/net/core/filter.c
index f6bdc2b..b8ce66e 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -876,7 +876,7 @@ bool sk_filter_charge(struct sock *sk, struct sk_filter *fp)
 	return false;
 }
 
-static struct bpf_prog *bpf_migrate_filter(struct bpf_prog *fp)
+struct bpf_prog *bpf_migrate_filter(struct bpf_prog *fp)
 {
 	struct sock_filter *old_prog;
 	struct bpf_prog *old_fp;
-- 
1.9.1

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

* Re: [PATCH 0/4] Seccomp filter JIT support on ARM.
       [not found] <1430314657-2552-1-git-send-email-nschichan@freebox.fr>
  2015-04-29 13:37 ` [PATCH 1/4] net: filter: make bpf_migrate_filter available outside of net/core/filter.c Nicolas Schichan
@ 2015-04-29 16:46 ` Alexei Starovoitov
  1 sibling, 0 replies; 2+ messages in thread
From: Alexei Starovoitov @ 2015-04-29 16:46 UTC (permalink / raw)
  To: Nicolas Schichan
  Cc: Russell King, Kees Cook, netdev, linux-kernel, Andy Lutomirski,
	Daniel Borkmann, Will Drewry, David S. Miller, linux-arm-kernel

On Wed, Apr 29, 2015 at 03:37:33PM +0200, Nicolas Schichan wrote:
> Greetings,
> 
> The following patches allow the use of the existing JIT code under
> arch/arm for seccomp filters.
> 
> The first patch makes bpf_migrate_filter() available so that seccomp
> code can use it.
> 
> The second patch invokes the classic BPF JIT code and if this fails
> reverts to the internal BPF. The open coded double call to
> bpf_convert_filter() and bpf_prog_select_runtime() is replaced by
> bpf_migrate_filter()
> 
> The third patch adds support for loads from the seccomp_data structure in
> the ARM BPF JIT code.

the patches 1,2,3 look fine.

> The fourth and final patch fixes a bug in the emit_udiv() function
> when used to convert a BPF_ALU | BPF_DIV | BPF_K instruction in the
> ARM BPF JIT code.

this one looks independent from first three and probably should
be sent to stable?

Your cc list is different for every patch, why? What tree are you
thinking to go through? 1st patch is trivial, but 2nd belongs in
seccomp, 3rd and 4th are in arm32... I'd would say arm tree if Kees
is ok with it.

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

end of thread, other threads:[~2015-04-29 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1430314657-2552-1-git-send-email-nschichan@freebox.fr>
2015-04-29 13:37 ` [PATCH 1/4] net: filter: make bpf_migrate_filter available outside of net/core/filter.c Nicolas Schichan
2015-04-29 16:46 ` [PATCH 0/4] Seccomp filter JIT support on ARM Alexei Starovoitov

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