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: <CAEf4BzbdVVkCffQjZGO81rQQZ0EUop36qv_Byit68xkA8m5iqw@mail.gmail.com>
Date:   Thu, 15 Jul 2021 21:44:18 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Quentin Monnet <quentin@...valent.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>
Subject: Re: [PATCH bpf-next 5/6] libbpf: add split BTF support for btf__load_from_kernel_by_id()

On Wed, Jul 14, 2021 at 7:15 AM Quentin Monnet <quentin@...valent.com> wrote:
>
> Add a new API function btf__load_from_kernel_by_id_split(), which takes
> a pointer to a base BTF object in order to support split BTF objects
> when retrieving BTF information from the kernel.
>
> Reference: https://github.com/libbpf/libbpf/issues/314
>
> Signed-off-by: Quentin Monnet <quentin@...valent.com>
> ---
>  tools/lib/bpf/btf.c      | 10 ++++++++--
>  tools/lib/bpf/btf.h      |  2 ++
>  tools/lib/bpf/libbpf.map |  1 +
>  3 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
> index 05b63b63083a..15967dd80ffb 100644
> --- a/tools/lib/bpf/btf.c
> +++ b/tools/lib/bpf/btf.c
> @@ -1383,7 +1383,8 @@ struct btf *btf_get_from_fd(int btf_fd, struct btf *base_btf)
>         return btf;
>  }
>
> -int btf__load_from_kernel_by_id(__u32 id, struct btf **btf)
> +int btf__load_from_kernel_by_id_split(__u32 id, struct btf **btf,
> +                                     struct btf *base_btf)

here all those struct btf pointers are even more confusing, let's
return the resulting struct btf * as a direct result value

>  {
>         struct btf *res;
>         int err, btf_fd;

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ