bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenz Bauer <lmb@cloudflare.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Alan Maguire <alan.maguire@oracle.com>, bpf <bpf@vger.kernel.org>,
	Networking <netdev@vger.kernel.org>
Subject: Re: [PATCH bpf 0/3] Fix csum unnecessary on bpf_skb_adjust_room
Date: Tue, 2 Jun 2020 16:19:34 +0100	[thread overview]
Message-ID: <CACAyw99em+nj55roygxHFZ6Ks71oSbaOP=nRUv28vUrR+RcjBg@mail.gmail.com> (raw)
In-Reply-To: <cover.1591108731.git.daniel@iogearbox.net>

On Tue, 2 Jun 2020 at 15:58, Daniel Borkmann <daniel@iogearbox.net> wrote:
>
> This series fixes an issue originally reported by Lorenz Bauer where using
> the bpf_skb_adjust_room() helper hid a checksum bug since it wasn't adjusting
> CHECKSUM_UNNECESSARY's skb->csum_level after decap. The fix is two-fold:
>  i) We do a safe reset in bpf_skb_adjust_room() to CHECKSUM_NONE with an opt-
>     out flag BPF_F_ADJ_ROOM_NO_CSUM_RESET.
> ii) We add a new bpf_csum_level() for the latter in order to allow users to
>     manually inc/dec the skb->csum_level when needed.
> The series is rebased against latest bpf-next tree. It can be applied there,
> or to bpf after the merge win sync from net-next.
>
> Thanks!
>
> Daniel Borkmann (3):
>   bpf: Fix up bpf_skb_adjust_room helper's skb csum setting
>   bpf: add csum_level helper for fixing up csum levels
>   bpf, selftests: adapt cls_redirect to call csum_level helper
>
>  include/linux/skbuff.h                        |  8 +++
>  include/uapi/linux/bpf.h                      | 51 ++++++++++++++++++-
>  net/core/filter.c                             | 46 ++++++++++++++++-
>  tools/include/uapi/linux/bpf.h                | 51 ++++++++++++++++++-
>  .../selftests/bpf/progs/test_cls_redirect.c   |  9 ++--
>  5 files changed, 158 insertions(+), 7 deletions(-)
>
> --
> 2.21.0
>

Thanks for pushing this out, Daniel!

-- 
Lorenz Bauer  |  Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK

www.cloudflare.com

  parent reply	other threads:[~2020-06-02 15:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 14:58 [PATCH bpf 0/3] Fix csum unnecessary on bpf_skb_adjust_room Daniel Borkmann
2020-06-02 14:58 ` [PATCH bpf 1/3] bpf: Fix up bpf_skb_adjust_room helper's skb csum setting Daniel Borkmann
2020-06-02 14:58 ` [PATCH bpf 2/3] bpf: Add csum_level helper for fixing up csum levels Daniel Borkmann
2020-06-02 15:19   ` Lorenz Bauer
2020-06-02 15:35     ` Daniel Borkmann
2020-06-02 16:41       ` Alan Maguire
2020-06-02 17:43         ` Daniel Borkmann
2020-06-02 14:58 ` [PATCH bpf 3/3] bpf, selftests: Adapt cls_redirect to call csum_level helper Daniel Borkmann
2020-06-02 15:13   ` Lorenz Bauer
2020-06-02 15:48     ` Daniel Borkmann
2020-06-02 15:19 ` Lorenz Bauer [this message]
2020-06-02 18:59 ` [PATCH bpf 0/3] Fix csum unnecessary on bpf_skb_adjust_room Alexei Starovoitov

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='CACAyw99em+nj55roygxHFZ6Ks71oSbaOP=nRUv28vUrR+RcjBg@mail.gmail.com' \
    --to=lmb@cloudflare.com \
    --cc=alan.maguire@oracle.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 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).