summaryrefslogtreecommitdiffstats
path: root/arch/arm/net
diff options
context:
space:
mode:
authorNicolas Schichan <nschichan@freebox.fr>2015-05-07 15:00:13 +0200
committerDavid S. Miller <davem@davemloft.net>2015-05-12 18:20:42 -0400
commit24e737c1ebacf0a19cb1d2671949de12b3361f4d (patch)
treef50357c1a2565efce502f0137250025676a082bb /arch/arm/net
parent8df2914598c5300a937760daa271fdbddce1108c (diff)
downloadop-kernel-dev-24e737c1ebacf0a19cb1d2671949de12b3361f4d.zip
op-kernel-dev-24e737c1ebacf0a19cb1d2671949de12b3361f4d.tar.gz
ARM: net: add JIT support for loads from struct seccomp_data.
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/arm/net')
-rw-r--r--arch/arm/net/bpf_jit_32.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index e1268f9..b5f470d 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -852,6 +852,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;
}
OpenPOWER on IntegriCloud