netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: net: add JIT support for loads from struct seccomp_data.
@ 2015-05-07 13:00 Nicolas Schichan
  2015-05-10  2:28 ` David Miller
  2015-05-12 22:20 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Schichan @ 2015-05-07 13:00 UTC (permalink / raw)
  To: Russell King, David S. Miller, Daniel Borkmann,
	Alexei Starovoitov, Nicolas Schichan, Mircea Gherzan,
	linux-arm-kernel, linux-kernel, netdev

Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
---

This patch was first sent as part of a serie modifying the core
seccomp code to allow the use of the classic BPF JIT. As the core
changes have been submitted to netdev by Daniel Borkmann, it is now
time to re-submit this patch separately.

While not physically dependent of the core seccomp changes they are
needed for the code added in this patch to be triggered.

 arch/arm/net/bpf_jit_32.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index f412b53..6bda637 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -863,6 +863,16 @@ b_epilogue:
 			off = offsetof(struct sk_buff, queue_mapping);
 			emit(ARM_LDRH_I(r_A, r_skb, off), ctx);
 			break;
+		case BPF_LDX | BPF_W | BPF_ABS:
+			/*
+			 * load a 32bit word from struct seccomp_data.
+			 * seccomp_check_filter() will already have checked
+			 * that k is 32bit aligned and lies within the
+			 * struct seccomp_data.
+			 */
+			ctx->seen |= SEEN_SKB;
+			emit(ARM_LDR_I(r_A, r_skb, k), ctx);
+			break;
 		default:
 			return -1;
 		}
-- 
1.9.1

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

* Re: [PATCH v2] ARM: net: add JIT support for loads from struct seccomp_data.
  2015-05-07 13:00 [PATCH v2] ARM: net: add JIT support for loads from struct seccomp_data Nicolas Schichan
@ 2015-05-10  2:28 ` David Miller
  2015-05-10 19:40   ` Russell King - ARM Linux
  2015-05-12 22:20 ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2015-05-10  2:28 UTC (permalink / raw)
  To: nschichan
  Cc: linux, dborkman, ast, mgherzan, linux-arm-kernel, linux-kernel, netdev

From: Nicolas Schichan <nschichan@freebox.fr>
Date: Thu,  7 May 2015 15:00:13 +0200

> Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
> ---
> 
> This patch was first sent as part of a serie modifying the core
> seccomp code to allow the use of the classic BPF JIT. As the core
> changes have been submitted to netdev by Daniel Borkmann, it is now
> time to re-submit this patch separately.
> 
> While not physically dependent of the core seccomp changes they are
> needed for the code added in this patch to be triggered.

Where would you like this to be applied, my tree?

This is an ongoing situation, where people have traditionally not
consistently wanted bpf JIT patches to go into the networking tree.

So I beg everyone posting such things to netdev to be _clear_
and _explicit_ about whether you expect me to integrate the patch
or not.

Thanks.

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

* Re: [PATCH v2] ARM: net: add JIT support for loads from struct seccomp_data.
  2015-05-10  2:28 ` David Miller
@ 2015-05-10 19:40   ` Russell King - ARM Linux
  2015-05-10 23:20     ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2015-05-10 19:40 UTC (permalink / raw)
  To: David Miller
  Cc: nschichan, dborkman, ast, mgherzan, linux-arm-kernel,
	linux-kernel, netdev

On Sat, May 09, 2015 at 10:28:58PM -0400, David Miller wrote:
> From: Nicolas Schichan <nschichan@freebox.fr>
> Date: Thu,  7 May 2015 15:00:13 +0200
> 
> > Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
> > ---
> > 
> > This patch was first sent as part of a serie modifying the core
> > seccomp code to allow the use of the classic BPF JIT. As the core
> > changes have been submitted to netdev by Daniel Borkmann, it is now
> > time to re-submit this patch separately.
> > 
> > While not physically dependent of the core seccomp changes they are
> > needed for the code added in this patch to be triggered.
> 
> Where would you like this to be applied, my tree?
> 
> This is an ongoing situation, where people have traditionally not
> consistently wanted bpf JIT patches to go into the networking tree.
> 
> So I beg everyone posting such things to netdev to be _clear_
> and _explicit_ about whether you expect me to integrate the patch
> or not.

I think you have taken previous ARM net JIT patches, so I think it
makes sense if you continue to do so.  I'm not knowledgable of the
JIT interface myself, all I can say about many of these patches is
that they look okay to me on a superficial basis.

I suspect you're doing more or less the same, but from a slightly
different perspective (presumably through not knowing ARM assembly.)

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

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

* Re: [PATCH v2] ARM: net: add JIT support for loads from struct seccomp_data.
  2015-05-10 19:40   ` Russell King - ARM Linux
@ 2015-05-10 23:20     ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-05-10 23:20 UTC (permalink / raw)
  To: linux
  Cc: nschichan, dborkman, ast, mgherzan, linux-arm-kernel,
	linux-kernel, netdev

From: Russell King - ARM Linux <linux@arm.linux.org.uk>
Date: Sun, 10 May 2015 20:40:28 +0100

> I think you have taken previous ARM net JIT patches, so I think it
> makes sense if you continue to do so.  I'm not knowledgable of the
> JIT interface myself, all I can say about many of these patches is
> that they look okay to me on a superficial basis.
> 
> I suspect you're doing more or less the same, but from a slightly
> different perspective (presumably through not knowing ARM assembly.)

Ok, I'll flow the ARM JIT patches through my tree then.

Thanks Russell.

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

* Re: [PATCH v2] ARM: net: add JIT support for loads from struct seccomp_data.
  2015-05-07 13:00 [PATCH v2] ARM: net: add JIT support for loads from struct seccomp_data Nicolas Schichan
  2015-05-10  2:28 ` David Miller
@ 2015-05-12 22:20 ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2015-05-12 22:20 UTC (permalink / raw)
  To: nschichan
  Cc: linux, dborkman, ast, mgherzan, linux-arm-kernel, linux-kernel, netdev

From: Nicolas Schichan <nschichan@freebox.fr>
Date: Thu,  7 May 2015 15:00:13 +0200

> Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>

Applied, thanks.

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

end of thread, other threads:[~2015-05-12 22:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-07 13:00 [PATCH v2] ARM: net: add JIT support for loads from struct seccomp_data Nicolas Schichan
2015-05-10  2:28 ` David Miller
2015-05-10 19:40   ` Russell King - ARM Linux
2015-05-10 23:20     ` David Miller
2015-05-12 22:20 ` David Miller

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