lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30110E6F-8895-4C7C-B5C6-36361D294A2C@fb.com>
Date:   Mon, 26 Aug 2019 22:51:55 +0000
From:   Song Liu <songliubraving@...com>
To:     Alexei Starovoitov <alexei.starovoitov@...il.com>
CC:     Song Liu <liu.song.a23@...il.com>,
        Alexei Starovoitov <ast@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Daniel Borkmann <daniel@...earbox.net>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH bpf-next 3/4] selftests/bpf: verifier precise tests



> On Aug 26, 2019, at 3:47 PM, Alexei Starovoitov <alexei.starovoitov@...il.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@...nel.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@...nel.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@...com>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ