netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Song Liu <liu.song.a23@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH bpf-next 3/4] selftests/bpf: verifier precise tests
Date: Mon, 26 Aug 2019 22:51:55 +0000	[thread overview]
Message-ID: <30110E6F-8895-4C7C-B5C6-36361D294A2C@fb.com> (raw)
In-Reply-To: <20190826224724.edxfxbkv6r5wkg6o@ast-mbp>



> On Aug 26, 2019, at 3:47 PM, Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
> 
> On Sun, Aug 25, 2019 at 10:22:13PM -0700, Song Liu wrote:
>> On Fri, Aug 23, 2019 at 2:59 AM Alexei Starovoitov <ast@kernel.org> wrote:
>>> 
>>> Use BPF_F_TEST_STATE_FREQ flag to check that precision
>>> tracking works as expected by comparing every step it takes.
>>> 
>>> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
>>> 
>>> +static bool cmp_str_seq(const char *log, const char *exp)
>> 
>> Maybe call it str_str_seq()?
> 
> imo cmp*() returns the result of comparison.
> Which is either boolean or -1,0,1.
> Whereas str*() should return the address, index, or offset.
> Hence I used cmp_ prefix here.

Good point. I didn't think about this. 

> 
>>> static void do_test_single(struct bpf_test *test, bool unpriv,
>>>                           int *passes, int *errors)
>>> {
>>> @@ -897,14 +929,20 @@ static void do_test_single(struct bpf_test *test, bool unpriv,
>>>                pflags |= BPF_F_STRICT_ALIGNMENT;
>>>        if (test->flags & F_NEEDS_EFFICIENT_UNALIGNED_ACCESS)
>>>                pflags |= BPF_F_ANY_ALIGNMENT;
>>> +       if (test->flags & ~3)
>>> +               pflags |= test->flags;
>> ^^^^^^ why do we need these two lines?
> 
> To pass flags from test into attr.prog_flags.
> Older F_NEEDS_* and F_LOAD_* may use some cleanup and can be removed,
> but it would be a different patch.

Sounds good. 

Acked-by: Song Liu <songliubraving@fb.com>

Thanks!


  reply	other threads:[~2019-08-26 22:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23  5:52 [PATCH bpf-next 0/4] bpf: precision tracking tests Alexei Starovoitov
2019-08-23  5:52 ` [PATCH bpf-next 1/4] bpf: introduce verifier internal test flag Alexei Starovoitov
2019-08-26  5:09   ` Song Liu
2019-08-23  5:52 ` [PATCH bpf-next 2/4] tools/bpf: sync bpf.h Alexei Starovoitov
2019-08-26  5:10   ` Song Liu
2019-08-23  5:52 ` [PATCH bpf-next 3/4] selftests/bpf: verifier precise tests Alexei Starovoitov
2019-08-26  5:22   ` Song Liu
2019-08-26 22:47     ` Alexei Starovoitov
2019-08-26 22:51       ` Song Liu [this message]
2019-08-23  5:52 ` [PATCH bpf-next 4/4] selftests/bpf: add precision tracking test Alexei Starovoitov
2019-08-26  5:33   ` Song Liu
2019-08-27 22:43 ` [PATCH bpf-next 0/4] bpf: precision tracking tests Daniel Borkmann

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=30110E6F-8895-4C7C-B5C6-36361D294A2C@fb.com \
    --to=songliubraving@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=liu.song.a23@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 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).