summaryrefslogtreecommitdiff
path: root/arch/sparc/net/bpf_jit.h
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@plumgrid.com>2014-09-16 18:32:58 -0700
committerDavid S. Miller <davem@davemloft.net>2014-09-19 16:01:18 -0400
commitf6f2332dce0efeea8c5653b6e9d1e8c379ace65c (patch)
treeb3117a06fd0feb9b4c279c28efcd6422fd932675 /arch/sparc/net/bpf_jit.h
parent6a38792ca8a5da28f65dc42eeb73d9a431f8d0fd (diff)
sparc: bpf_jit: fix support for ldx/stx mem and SKF_AD_VLAN_TAG
fix several issues in sparc BPF JIT compiler. ldx/stx related: . classic BPF instructions that access mem[] slots were not setting SEEN_MEM flag, so stack wasn't allocated. Fix that by advertising correct flags . LDX/STX instructions were missing SEEN_XREG, so register value could have leaked to user space. Fix it. . since stack for mem[] slots is allocated with 'sub %sp' instead of 'save %sp', use %sp as base register instead of %fp. . ldx mem[0] means first slot in classic BPF which should have -4 offset instead of 0. . sparc64 needs 2047 stack bias as per ABI to access stack . emit_stmem() was using LD32I macro instead of ST32I SKF_AD_VLAN_TAG* related: . SKF_AD_VLAN_TAG_PRESENT must return 1 or 0 instead of '> 0' or 0 as per classic BPF de facto standard . SKF_AD_VLAN_TAG needs to mask the field correctly Fixes: 2809a2087cc4 ("net: filter: Just In Time compiler for sparc") Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/net/bpf_jit.h')
0 files changed, 0 insertions, 0 deletions