public inbox for dwarves@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: dwarves@vger.kernel.org,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>
Subject: Re: [PATCH dwarves] pahole: distilled_base btf_feature should be reported for libbpf > 1.5
Date: Mon, 28 Oct 2024 13:28:27 -0300	[thread overview]
Message-ID: <Zx-7qyu-m9mR3zbA@x1> (raw)
In-Reply-To: <20241025171553.1850692-1-alan.maguire@oracle.com>

On Fri, Oct 25, 2024 at 06:15:53PM +0100, Alan Maguire wrote:
> Alexei ran into issues [1] generating distilled base BTF with pahole built
> against an older < 1.5 libbpf.  For older libbpf, we cannot support
> distilled base BTF (since the library API btf__distill_base() is not
> present) so we should not report it as a feature in that case.
> 
> [1] https://lore.kernel.org/bpf/CAADnVQKFjK8BnZ-rYzXKv-Zdw=HBJRoJ7jo5PN+0P6+qpJOxNg@mail.gmail.com/
> 
> Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>

Thanks, applied.

- Arnaldo

> ---
>  pahole.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/pahole.c b/pahole.c
> index 0b91a7e..55d04cf 100644
> --- a/pahole.c
> +++ b/pahole.c
> @@ -1206,7 +1206,9 @@ struct btf_feature {
>  	BTF_DEFAULT_FEATURE(consistent_func, skip_encoding_btf_inconsistent_proto, false),
>  	BTF_DEFAULT_FEATURE(decl_tag_kfuncs, btf_decl_tag_kfuncs, false),
>  	BTF_NON_DEFAULT_FEATURE(reproducible_build, reproducible_build, false),
> +#if LIBBPF_MAJOR_VERSION >= 1 && LIBBPF_MINOR_VERSION >= 5
>  	BTF_NON_DEFAULT_FEATURE(distilled_base, btf_gen_distilled_base, false),
> +#endif
>  	BTF_NON_DEFAULT_FEATURE(global_var, encode_btf_global_vars, false),
>  };
>  
> -- 
> 2.43.5

      reply	other threads:[~2024-10-28 16:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25 17:15 [PATCH dwarves] pahole: distilled_base btf_feature should be reported for libbpf > 1.5 Alan Maguire
2024-10-28 16:28 ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zx-7qyu-m9mR3zbA@x1 \
    --to=acme@kernel.org \
    --cc=alan.maguire@oracle.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=dwarves@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox