Skip to content

Commit

Permalink
ARM: net: add support for BPF_ANC | SKF_AD_PAY_OFFSET in ARM JIT.
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Nicolas Schichan authored and David S. Miller committed Jul 27, 2015
1 parent 1447f93 commit 303249a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/arm/net/bpf_jit_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,14 @@ static int build_body(struct jit_ctx *ctx)
off = offsetof(struct sk_buff, queue_mapping);
emit(ARM_LDRH_I(r_A, r_skb, off), ctx);
break;
case BPF_ANC | SKF_AD_PAY_OFFSET:
ctx->seen |= SEEN_SKB | SEEN_CALL;

emit(ARM_MOV_R(ARM_R0, r_skb), ctx);
emit_mov_i(ARM_R3, (unsigned int)skb_get_poff, ctx);
emit_blx_r(ARM_R3, ctx);
emit(ARM_MOV_R(r_A, ARM_R0), ctx);
break;
case BPF_LDX | BPF_W | BPF_ABS:
/*
* load a 32bit word from struct seccomp_data.
Expand Down

0 comments on commit 303249a

Please sign in to comment.