From: Nicolas Schichan Date: Thu, 7 May 2015 13:00:13 +0000 (+0200) Subject: ARM: net: add JIT support for loads from struct seccomp_data. X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=24e737c1ebacf0a19cb1d2671949de12b3361f4d;p=openwrt%2Fstaging%2Fblogic.git ARM: net: add JIT support for loads from struct seccomp_data. Signed-off-by: Nicolas Schichan Signed-off-by: David S. Miller --- diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index e1268f905026..b5f470ddab6d 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; }