All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Andrii Nakryiko <andriin@fb.com>, bpf <bpf@vger.kernel.org>,
	Networking <netdev@vger.kernel.org>,
	Alexei Starovoitov <ast@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	john fastabend <john.fastabend@gmail.com>,
	Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH v2 bpf-next 3/3] selftests/bpf: add variable-length data concat pattern less than test
Date: Mon, 22 Jun 2020 19:28:57 -0700	[thread overview]
Message-ID: <CAEf4BzZFPoqdvVBdyqY=t9Ccfvf-_VysJ7UR9L9qQ5-SxdPeKg@mail.gmail.com> (raw)
In-Reply-To: <20200623003119.onlwey7ko5z6heyq@ast-mbp.dhcp.thefacebook.com>

On Mon, Jun 22, 2020 at 5:31 PM Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
>
> On Mon, Jun 22, 2020 at 05:09:04PM -0700, Andrii Nakryiko wrote:
> > Extend original variable-length tests with a case to catch a common
> > existing pattern of testing for < 0 for errors. Note because
> > verifier also tracks upper bounds and we know it can not be greater
> > than MAX_LEN here we can skip upper bound check.
> >
> > In ALU64 enabled compilation converting from long->int return types
> > in probe helpers results in extra instruction pattern, <<= 32, s >>= 32.
> > The trade-off is the non-ALU64 case works. If you really care about
> > every extra insn (XDP case?) then you probably should be using original
> > int type.
> >
> > In addition adding a sext insn to bpf might help the verifier in the
> > general case to avoid these types of tricks.
> >
> > Signed-off-by: John Fastabend <john.fastabend@gmail.com>
>
> Please keep John's 'Author:' on the patch.
> git commit --author= --amend
> or keep 'From:' when you applied to your local git.

I manually re-did the patch, because it wasn't applying cleanly. I'll
use --author, though, I didn't know about it, thanks.

> Also add your SOB after John's.
> Even if you didn't change the patch at all.
> Same thing if you've reworked the patch.

ok, will do

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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23  0:09 [PATCH v2 bpf-next 1/3] bpf: switch most helper return values from 32-bit int to 64-bit long Andrii Nakryiko
2020-06-23  0:09 ` [PATCH v2 bpf-next 2/3] selftests/bpf: add variable-length data concatenation pattern test Andrii Nakryiko
2020-06-23  0:09 ` [PATCH v2 bpf-next 3/3] selftests/bpf: add variable-length data concat pattern less than test Andrii Nakryiko
2020-06-23  0:31   ` Alexei Starovoitov
2020-06-23  2:28     ` Andrii Nakryiko [this message]
2020-06-23  2:18 ` [PATCH v2 bpf-next 1/3] bpf: switch most helper return values from 32-bit int to 64-bit long 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='CAEf4BzZFPoqdvVBdyqY=t9Ccfvf-_VysJ7UR9L9qQ5-SxdPeKg@mail.gmail.com' \
    --to=andrii.nakryiko@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kernel-team@fb.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.