Skip to content

Commit 303249a

Browse files
nschichandavem330
authored andcommitted
ARM: net: add support for BPF_ANC | SKF_AD_PAY_OFFSET in ARM JIT.
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1447f93 commit 303249a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

arch/arm/net/bpf_jit_32.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,14 @@ static int build_body(struct jit_ctx *ctx)
915915
off = offsetof(struct sk_buff, queue_mapping);
916916
emit(ARM_LDRH_I(r_A, r_skb, off), ctx);
917917
break;
918+
case BPF_ANC | SKF_AD_PAY_OFFSET:
919+
ctx->seen |= SEEN_SKB | SEEN_CALL;
920+
921+
emit(ARM_MOV_R(ARM_R0, r_skb), ctx);
922+
emit_mov_i(ARM_R3, (unsigned int)skb_get_poff, ctx);
923+
emit_blx_r(ARM_R3, ctx);
924+
emit(ARM_MOV_R(r_A, ARM_R0), ctx);
925+
break;
918926
case BPF_LDX | BPF_W | BPF_ABS:
919927
/*
920928
* load a 32bit word from struct seccomp_data.

0 commit comments

Comments
 (0)