[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190206030333.lurnxegmblbxrqjw@ast-mbp>
Date: Tue, 5 Feb 2019 19:03:35 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Andrii Nakryiko <andriin@...com>
Cc: songliubraving@...com, yhs@...com, ast@...com, kafai@...com,
netdev@...r.kernel.org, daniel@...earbox.next,
andrii.nakryiko@...il.com
Subject: Re: [PATCH v2 bpf-next 1/2] btf: separate btf creation and loading
On Tue, Feb 05, 2019 at 04:29:48PM -0800, Andrii Nakryiko wrote:
> This change splits out previous btf__new functionality of constructing
> struct btf and loading it into kernel into two:
> - btf__new() just creates and initializes struct btf
> - btf__load() attempts to load existing struct btf into kernel
>
> btf__free will still close BTF fd, if it was ever loaded successfully
> into kernel.
>
> This change allows users of libbpf to manipulate BTF using its API,
> without the need to unnecessarily load it into kernel.
>
> One of the intended use cases is pahole using libbpf to do DWARF to BTF
> conversion and deduplication using libbpf, while handling ELF sections
> overwrites and other concerns on its own.
>
> Signed-off-by: Andrii Nakryiko <andriin@...com>
> Acked-by: Song Liu <songliubraving@...com>
should it be
Fixes: 2d3feca8c44f ("bpf: btf: print map dump and lookup with btf info")
?
Even back then btf__new() was doing the loading.
So that btf support in bpftool was silently double loading btf.
Powered by blists - more mailing lists