Skip to content

Couple of BPF JIT fixes

Daniel Borkmann netdev 1 version Applied

Status from this message: Applied, thanks Daniel!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5bpf, s390x: do not reload skb pointers in non-skb contextarch/s390/net/bpf_jit_comp.c+5 -61 reply
2/5bpf, ppc64: do not reload skb pointers in non-skb contextarch/powerpc/net/bpf_jit_comp64.c+4 -20 replies
3/5bpf: guarantee r1 to be ctx in case of bpf_helper_changes_pkt_datakernel/bpf/verifier.c+6 -00 replies
4/5bpf, sparc: fix usage of wrong reg for load_skb_regs after callarch/sparc/net/bpf_jit_comp_64.c+4 -20 replies
5/5bpf: add test case for ld_abs and helper changing pkt datalib/test_bpf.c tools/testing/selftests/bpf/test_verifier.c+67 -00 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchAlexei StarovoitovNaveen N. RaoSandipan DasDavid S. Miller
1/5A-b
2/5A-b R-b T-b
3/5A-b
4/5A-b A-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH bpf 0/5] Couple of BPF JIT fixes

Two fixes that deal with buggy usage of bpf_helper_changes_pkt_data() in the sense that they also reload cached skb data when there's no skb context but xdp one, for example. A fix where skb meta data is reloaded out of the wrong register on helper call, rest is test cases and making sure on verifier side that there's always the guarantee that ctx sits in r1. Thanks!

Daniel Borkmann (5):
bpf, s390x: do not reload skb pointers in non-skb context bpf, ppc64: do not reload skb pointers in non-skb context
bpf: guarantee r1 to be ctx in case of bpf_helper_changes_pkt_data bpf, sparc: fix usage of wrong reg for load_skb_regs after call
bpf: add test case for ld_abs and helper changing pkt data

 arch/powerpc/net/bpf_jit_comp64.c           |  6 ++--
 arch/s390/net/bpf_jit_comp.c                | 11 ++++----
 arch/sparc/net/bpf_jit_comp_64.c            |  6 ++--
 kernel/bpf/verifier.c                       |  6 ++++
 lib/test_bpf.c                              | 43 +++++++++++++++++++++++++++++
 tools/testing/selftests/bpf/test_verifier.c | 24 ++++++++++++++++
 6 files changed, 86 insertions(+), 10 deletions(-)
Signature · 1 line
2.9.5