diff options
author | David S. Miller <davem@davemloft.net> | 2017-12-18 10:49:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-18 10:49:22 -0500 |
commit | b36025b19a2301ba0cac05e6ffad5668013d2c77 (patch) | |
tree | 2fff4e78df48f5d9af54b35d9aa4aa8dd1494188 /arch/sparc | |
parent | f870c1ff65a6d1f3a083f277280802ee09a5b44d (diff) | |
parent | c1b08ebe5003ae291470cb6e26923628ab19606f (diff) | |
download | op-kernel-dev-b36025b19a2301ba0cac05e6ffad5668013d2c77.zip op-kernel-dev-b36025b19a2301ba0cac05e6ffad5668013d2c77.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says:
====================
pull-request: bpf 2017-12-17
The following pull-request contains BPF updates for your *net* tree.
The main changes are:
1) Fix a corner case in generic XDP where we have non-linear skbs
but enough tailroom in the skb to not miss to linearizing there,
from Song.
2) Fix BPF JIT bugs in s390x and ppc64 to not recache skb data when
BPF context is not skb, from Daniel.
3) Fix a BPF JIT bug in sparc64 where recaching skb data after helper
call would use the wrong register for the skb, from Daniel.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/net/bpf_jit_comp_64.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sparc/net/bpf_jit_comp_64.c b/arch/sparc/net/bpf_jit_comp_64.c index 5765e7e..ff5f9cb 100644 --- a/arch/sparc/net/bpf_jit_comp_64.c +++ b/arch/sparc/net/bpf_jit_comp_64.c @@ -1245,14 +1245,16 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx) u8 *func = ((u8 *)__bpf_call_base) + imm; ctx->saw_call = true; + if (ctx->saw_ld_abs_ind && bpf_helper_changes_pkt_data(func)) + emit_reg_move(bpf2sparc[BPF_REG_1], L7, ctx); emit_call((u32 *)func, ctx); emit_nop(ctx); emit_reg_move(O0, bpf2sparc[BPF_REG_0], ctx); - if (bpf_helper_changes_pkt_data(func) && ctx->saw_ld_abs_ind) - load_skb_regs(ctx, bpf2sparc[BPF_REG_6]); + if (ctx->saw_ld_abs_ind && bpf_helper_changes_pkt_data(func)) + load_skb_regs(ctx, L7); break; } |