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

Reply via email to