From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Song Liu <liu.song.a23@gmail.com>
Cc: 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 15:47:25 -0700 [thread overview]
Message-ID: <20190826224724.edxfxbkv6r5wkg6o@ast-mbp> (raw)
In-Reply-To: <CAPhsuW54=MiBfLp+AL2ASqaoGOf+p9D_VXxBYcR5fFpBrdEGSg@mail.gmail.com>
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.
> > 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.
next prev parent reply other threads:[~2019-08-26 22:47 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 [this message]
2019-08-26 22:51 ` Song Liu
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=20190826224724.edxfxbkv6r5wkg6o@ast-mbp \
--to=alexei.starovoitov@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kernel-team@fb.com \
--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).