Commit 24e737c1 authored by Nicolas Schichan's avatar Nicolas Schichan Committed by David S. Miller

ARM: net: add JIT support for loads from struct seccomp_data.

Signed-off-by: default avatarNicolas Schichan <nschichan@freebox.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8df29145
...@@ -852,6 +852,16 @@ static int build_body(struct jit_ctx *ctx) ...@@ -852,6 +852,16 @@ static int build_body(struct jit_ctx *ctx)
off = offsetof(struct sk_buff, queue_mapping); off = offsetof(struct sk_buff, queue_mapping);
emit(ARM_LDRH_I(r_A, r_skb, off), ctx); emit(ARM_LDRH_I(r_A, r_skb, off), ctx);
break; 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: default:
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment