All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: alexei.starovoitov@gmail.com, daniel@iogearbox.net
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, john.fastabend@gmail.com
Subject: [bpf-next PATCH 0/3] fix ktls with sk_skb_verdict programs
Date: Fri, 29 May 2020 16:06:20 -0700	[thread overview]
Message-ID: <159079336010.5745.8538518572099799848.stgit@john-Precision-5820-Tower> (raw)

If a socket is running a BPF_SK_SKB_SREAM_VERDICT program and KTLS is
enabled the data stream may be broken if both TLS stream parser and
BPF stream parser try to handle data. Fix this here by making KTLS
stream parser run first to ensure TLS messages are received correctly
and then calling the verdict program. This analogous to how we handle
a similar conflict on the TX side.

Note, this is a fix but it doesn't make sense to push this late to
bpf tree so targeting bpf-next and keeping fixes tags.

---

John Fastabend (3):
      bpf: refactor sockmap redirect code so its easy to reuse
      bpf: fix running sk_skb program types with ktls
      bpf, selftests: add test for ktls with skb bpf ingress policy


 include/linux/skmsg.h                              |    8 +
 include/net/tls.h                                  |    9 +
 net/core/skmsg.c                                   |   98 +++++++++---
 net/tls/tls_sw.c                                   |   20 ++
 .../selftests/bpf/progs/test_sockmap_kern.h        |   46 ++++++
 tools/testing/selftests/bpf/test_sockmap.c         |  163 +++++++++++++++++---
 6 files changed, 296 insertions(+), 48 deletions(-)

--
Signature

             reply	other threads:[~2020-05-29 23:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 23:06 John Fastabend [this message]
2020-05-29 23:06 ` [bpf-next PATCH 1/3] bpf: refactor sockmap redirect code so its easy to reuse John Fastabend
2020-06-01 14:16   ` Jakub Sitnicki
2020-06-01 15:17     ` John Fastabend
2020-06-01 20:48   ` Song Liu
2020-06-06 16:26   ` Jakub Sitnicki
2020-05-29 23:06 ` [bpf-next PATCH 2/3] bpf: fix running sk_skb program types with ktls John Fastabend
2020-06-01 14:57   ` Jakub Sitnicki
2020-06-01 15:20     ` John Fastabend
2020-06-01 15:50       ` John Fastabend
2020-06-02  8:55         ` Jakub Sitnicki
2020-06-01 21:23       ` Alexei Starovoitov
2020-05-29 23:07 ` [bpf-next PATCH 3/3] bpf, selftests: add test for ktls with skb bpf ingress policy John Fastabend

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=159079336010.5745.8538518572099799848.stgit@john-Precision-5820-Tower \
    --to=john.fastabend@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.