netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf 0/5] Couple of BPF JIT fixes
@ 2017-12-14 20:07 Daniel Borkmann
  2017-12-14 20:07 ` [PATCH bpf 1/5] bpf, s390x: do not reload skb pointers in non-skb context Daniel Borkmann
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Daniel Borkmann @ 2017-12-14 20:07 UTC (permalink / raw)
  To: ast; +Cc: holzheu, naveen.n.rao, davem, netdev, Daniel Borkmann

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(-)

-- 
2.9.5

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-01-09 14:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-14 20:07 [PATCH bpf 0/5] Couple of BPF JIT fixes Daniel Borkmann
2017-12-14 20:07 ` [PATCH bpf 1/5] bpf, s390x: do not reload skb pointers in non-skb context Daniel Borkmann
2018-01-09 14:20   ` Michael Holzheu
2017-12-14 20:07 ` [PATCH bpf 2/5] bpf, ppc64: " Daniel Borkmann
2017-12-14 20:07 ` [PATCH bpf 3/5] bpf: guarantee r1 to be ctx in case of bpf_helper_changes_pkt_data Daniel Borkmann
2017-12-14 20:07 ` [PATCH bpf 4/5] bpf, sparc: fix usage of wrong reg for load_skb_regs after call Daniel Borkmann
2017-12-14 20:07 ` [PATCH bpf 5/5] bpf: add test case for ld_abs and helper changing pkt data Daniel Borkmann
2017-12-15 17:28 ` [PATCH bpf 0/5] Couple of BPF JIT fixes Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).