diff options
author | David S. Miller <davem@davemloft.net> | 2016-01-07 04:54:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-07 04:54:18 +0100 |
commit | 9e0efaf6b41bf22c2eb81258fc2a6f1538a643e5 (patch) | |
tree | e2daa5fb47f707f44b6b7e9da82a6d8017af3f8c /arch/powerpc | |
parent | net: Add eth_platform_get_mac_address() helper. (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-9e0efaf6b41bf22c2eb81258fc2a6f1538a643e5.tar.xz linux-9e0efaf6b41bf22c2eb81258fc2a6f1538a643e5.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/net/bpf_jit_comp.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c index 04782164ee67..2d66a8446198 100644 --- a/arch/powerpc/net/bpf_jit_comp.c +++ b/arch/powerpc/net/bpf_jit_comp.c @@ -78,18 +78,9 @@ static void bpf_jit_build_prologue(struct bpf_prog *fp, u32 *image, PPC_LI(r_X, 0); } - switch (filter[0].code) { - case BPF_RET | BPF_K: - case BPF_LD | BPF_W | BPF_LEN: - case BPF_LD | BPF_W | BPF_ABS: - case BPF_LD | BPF_H | BPF_ABS: - case BPF_LD | BPF_B | BPF_ABS: - /* first instruction sets A register (or is RET 'constant') */ - break; - default: - /* make sure we dont leak kernel information to user */ + /* make sure we dont leak kernel information to user */ + if (bpf_needs_clear_a(&filter[0])) PPC_LI(r_A, 0); - } } static void bpf_jit_build_epilogue(u32 *image, struct codegen_context *ctx) |