Thread (28 messages) 28 messages, 5 authors, 2014-06-25
STALE4381d

[PATCH 07/17] MIPS: bpf: Add SEEN_SKB to flags when looking for the PKT_TYPE

From: Markos Chandras <hidden>
Date: 2014-06-23 09:39:32
Also in: linux-mips
Subsystem: bpf jit for mips (32-bit and 64-bit), bpf [general] (safe dynamic programs and tools), mips, the rest · Maintainers: Johan Almbladh, Paul Burton, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Eduard Zingerman, Kumar Kartikeya Dwivedi, Thomas Bogendoerfer, Linus Torvalds

The SKF_AD_PKTTYPE uses the skb pointer so make sure it's in the
flags so it will be initialized in time.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Daniel Borkmann <redacted>
Cc: Alexei Starovoitov <redacted>
Cc: netdev@vger.kernel.org
Signed-off-by: Markos Chandras <redacted>
---
 arch/mips/net/bpf_jit.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/arch/mips/net/bpf_jit.c b/arch/mips/net/bpf_jit.c
index fe5041bdc6fb..8cae27af03da 100644
--- a/arch/mips/net/bpf_jit.c
+++ b/arch/mips/net/bpf_jit.c
@@ -1322,6 +1322,8 @@ jmp_cmp:
 				emit_andi(r_A, r_s0, VLAN_TAG_PRESENT, ctx);
 			break;
 		case BPF_ANC | SKF_AD_PKTTYPE:
+			ctx->flags |= SEEN_SKB;
+
 			off = pkt_type_offset();
 
 			if (off < 0)
-- 
2.0.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help