All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin KaFai Lau <kafai@fb.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: <daniel@iogearbox.net>, <ast@kernel.org>,
	<netdev@vger.kernel.org>, <bpf@vger.kernel.org>
Subject: Re: [bpf PATCH v2 0/5] Fix sock_ops field read splat
Date: Wed, 29 Jul 2020 14:57:32 -0700	[thread overview]
Message-ID: <20200729215717.mkgd4hnokybwzsda@kafai-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <159603940602.4454.2991262810036844039.stgit@john-Precision-5820-Tower>

On Wed, Jul 29, 2020 at 09:22:36AM -0700, John Fastabend wrote:
> Doing some refactoring resulted in a kernel splat when reading sock_ops
> fields.
> 
> Patch 1, has the details and proposed fix for sock_ops sk field access.
> 
> Patch 2, has the details and proposed fix for reading sock_ops->sk field
> 
> Patch 3, 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 4, 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.
> 
> Patch 5, Add reproducers for reading scok_ops->sk field.
> 
> I split Patch1 and Patch2 into two two patches because they have different
> fixes tags. Seems like this will help with backporting. They could be
> squashed though if folks want.
> 
> For selftests I was fairly verbose creating three patches each with the
> associated xlated code to handle each of the three cases. My hope is this
> helps the reader understand issues and review fixes. Its more or less
> how I debugged the issue and created reproducers so it at least helped
> me to have them logically different patches.
LGTM also.  Thanks for the fixes and the tests!

Acked-by: Martin KaFai Lau <kafai@fb.com>

      parent reply	other threads:[~2020-07-29 21:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 16:22 [bpf PATCH v2 0/5] Fix sock_ops field read splat John Fastabend
2020-07-29 16:22 ` [bpf PATCH v2 1/5] bpf: sock_ops ctx access may stomp registers in corner case John Fastabend
2020-07-29 21:29   ` Song Liu
2020-07-31 12:25   ` Daniel Borkmann
2020-07-31 22:46     ` John Fastabend
2020-07-29 16:23 ` [bpf PATCH v2 2/5] bpf: sock_ops sk access may stomp registers when dst_reg = src_reg John Fastabend
2020-07-29 21:30   ` Song Liu
2020-07-29 16:23 ` [bpf PATCH v2 3/5] bpf, selftests: Add tests for ctx access in sock_ops with single register John Fastabend
2020-07-29 21:35   ` Song Liu
2020-07-29 16:23 ` [bpf PATCH v2 4/5] bpf, selftests: Add tests for sock_ops load with r9, r8.r7 registers John Fastabend
2020-07-29 21:36   ` Song Liu
2020-07-29 16:24 ` [bpf PATCH v2 5/5] bpf, selftests: Add tests to sock_ops for loading sk John Fastabend
2020-07-29 21:36   ` Song Liu
2020-07-29 21:57 ` Martin KaFai Lau [this message]

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=20200729215717.mkgd4hnokybwzsda@kafai-mbp.dhcp.thefacebook.com \
    --to=kafai@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --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.