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>
This commit is contained in:
Nicolas Schichan 2015-05-07 15:00:13 +02:00 committed by David S. Miller
parent 8df2914598
commit 24e737c1eb
1 changed files with 10 additions and 0 deletions

View File

@ -852,6 +852,16 @@ b_epilogue:
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;
} }