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] [day] [month] [year] [list]
Date:   Fri, 31 May 2019 17:05:58 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Song Liu <liu.song.a23@...il.com>
Cc:     Michal Rostecki <mrostecki@...nsuse.org>,
        Andrii Nakryiko <andriin@...com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        "open list:BPF (Safe dynamic programs and tools)" 
        <netdev@...r.kernel.org>,
        "open list:BPF (Safe dynamic programs and tools)" 
        <bpf@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH bpf v4] libbpf: Return btf_fd for load_sk_storage_btf

On Thu, May 30, 2019 at 2:34 PM Song Liu <liu.song.a23@...il.com> wrote:
>
> On Wed, May 29, 2019 at 11:30 AM Michal Rostecki <mrostecki@...nsuse.org> wrote:
> >
> > Before this change, function load_sk_storage_btf expected that
> > libbpf__probe_raw_btf was returning a BTF descriptor, but in fact it was
> > returning an information about whether the probe was successful (0 or
> > 1). load_sk_storage_btf was using that value as an argument of the close
> > function, which was resulting in closing stdout and thus terminating the
> > process which called that function.
> >
> > That bug was visible in bpftool. `bpftool feature` subcommand was always
> > exiting too early (because of closed stdout) and it didn't display all
> > requested probes. `bpftool -j feature` or `bpftool -p feature` were not
> > returning a valid json object.
> >
> > This change renames the libbpf__probe_raw_btf function to
> > libbpf__load_raw_btf, which now returns a BTF descriptor, as expected in
> > load_sk_storage_btf.
> >
> > v2:
> > - Fix typo in the commit message.
> >
> > v3:
> > - Simplify BTF descriptor handling in bpf_object__probe_btf_* functions.
> > - Rename libbpf__probe_raw_btf function to libbpf__load_raw_btf and
> > return a BTF descriptor.
> >
> > v4:
> > - Fix typo in the commit message.
> >
> > Fixes: d7c4b3980c18 ("libbpf: detect supported kernel BTF features and sanitize BTF")
> > Signed-off-by: Michal Rostecki <mrostecki@...nsuse.org>
> > Acked-by: Andrii Nakryiko <andriin@...com>
>
> Acked-by: Song Liu <songliubraving@...com>

Applied. Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ