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: <CAEf4BzZRioYpgsUFP1TLsqtjtvA3WLyuWjSyq12ctUoMqkUorg@mail.gmail.com>
Date:   Thu, 28 Apr 2022 21:58:58 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Larysa Zaremba <larysa.zaremba@...el.com>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
        Alexander Lobakin <alexandr.lobakin@...el.com>
Subject: Re: [PATCH] bpftool: Use sysfs vmlinux when dumping BTF by ID

On Thu, Apr 28, 2022 at 4:17 AM Larysa Zaremba <larysa.zaremba@...el.com> wrote:
>
> Currently, dumping almost all BTFs specified by id requires

It should and will work only for kernel modules. It won't and
shouldn't work for BTFs coming from BPF programs. We shouldn't blindly
guess and substitute vmlinux BTF as base BTF, let's fetch
bpf_btf_info, check that BTF is from kernel and is not vmlinux, and
only in such case substitute vmlinux BTF as base BTF.

> using the -B option to pass the base BTF. For most cases
> the vmlinux BTF sysfs path should work.
>
> This patch simplifies dumping by ID usage by attempting to
> use vmlinux BTF from sysfs, if the first try of loading BTF by ID
> fails with certain conditions.
>
> Signed-off-by: Larysa Zaremba <larysa.zaremba@...el.com>
> Reviewed-by: Alexander Lobakin <alexandr.lobakin@...el.com>
> ---
>  tools/bpf/bpftool/btf.c | 35 ++++++++++++++++++++++++++---------
>  1 file changed, 26 insertions(+), 9 deletions(-)
>

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ