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: <CAEf4BzY=P0pL5wwBD=w=02ooueJcg4h8SoeZuC2pz86R3s1wnw@mail.gmail.com>
Date:   Tue, 28 Jul 2020 23:16:27 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Song Liu <song@...nel.org>
Cc:     Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>,
        YiFei Zhu <zhuyifei@...gle.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: don't destroy failed link

On Tue, Jul 28, 2020 at 10:47 PM Song Liu <song@...nel.org> wrote:
>
> On Tue, Jul 28, 2020 at 9:54 PM Andrii Nakryiko <andriin@...com> wrote:
> >
> > Check that link is NULL or proper pointer before invoking bpf_link__destroy().
> > Not doing this causes crash in test_progs, when cg_storage_multi selftest
> > fails.
> >
> > Cc: YiFei Zhu <zhuyifei@...gle.com>
> > Fixes: 3573f384014f ("selftests/bpf: Test CGROUP_STORAGE behavior on shared egress + ingress")
> > Signed-off-by: Andrii Nakryiko <andriin@...com>
>
> Acked-by: Song Liu <songliubraving@...com>
>
> btw: maybe we can move the IS_ERR() check to bpf_link__destroy()?

Yeah, given how common this mistake seems to be, that wouldn't be a bad idea.

>
> > ---
> >  .../bpf/prog_tests/cg_storage_multi.c         | 42 ++++++++++++-------
> >  1 file changed, 28 insertions(+), 14 deletions(-)
> >

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ