bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bpf PATCH 0/3] Fix sock_ops field read splat
@ 2020-07-28 15:43 John Fastabend
  2020-07-28 15:43 ` [bpf PATCH 1/3] bpf: sock_ops ctx access may stomp registers in corner case John Fastabend
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: John Fastabend @ 2020-07-28 15:43 UTC (permalink / raw)
  To: john.fastabend, kafai, daniel, ast; +Cc: netdev, bpf

Doing some refactoring resulted in a code splat when reading sock_ops
fields.

Patch 1, has the details and proposed fix.

Patch 2, gives a reproducer and test to verify the fix. I used the
netcnt program to test this because I wanted a splat to be generated
which can only be done if we have real traffic exercising the code.

Patch 3, is an optional patch. While doing above I wanted to also verify
loads were OK. The code looked good, but I wanted some xlated code to
review as well. It seems like a good idea to add it here or at least
shouldn't hurt. I could push it into bpf-next if folks want.

---

John Fastabend (3):
      bpf: sock_ops ctx access may stomp registers in corner case
      bpf, selftests: Add tests for ctx access in sock_ops with single register
      bpf, selftests: Add tests for sock_ops load with r9,r8.r7 registers


 net/core/filter.c                                  |   26 ++++++++++++++++++--
 .../testing/selftests/bpf/progs/test_tcpbpf_kern.c |   20 +++++++++++++++
 2 files changed, 44 insertions(+), 2 deletions(-)

--
Signature

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

end of thread, other threads:[~2020-07-29  1:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 15:43 [bpf PATCH 0/3] Fix sock_ops field read splat John Fastabend
2020-07-28 15:43 ` [bpf PATCH 1/3] bpf: sock_ops ctx access may stomp registers in corner case John Fastabend
2020-07-28 17:23   ` Martin KaFai Lau
2020-07-28 20:55     ` John Fastabend
2020-07-28 21:09       ` Daniel Borkmann
2020-07-28 21:15       ` Martin KaFai Lau
2020-07-29  0:44         ` John Fastabend
2020-07-29  1:14           ` Martin KaFai Lau
2020-07-28 15:44 ` [bpf PATCH 2/3] bpf, selftests: Add tests for ctx access in sock_ops with single register John Fastabend
2020-07-28 15:44 ` [bpf PATCH 3/3] bpf, selftests: Add tests for sock_ops load with r9, r8.r7 registers John Fastabend

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