All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: "Tony Ambardar" <tony.ambardar@gmail.com>,
	<dwarves@vger.kernel.org>, <bpf@vger.kernel.org>
Cc: "Alan Maguire" <alan.maguire@oracle.com>,
	"Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>
Subject: Re: [PATCH dwarves v2] dwarf_loader: Fix skipped encoding of function BTF on 32-bit systems
Date: Thu, 08 May 2025 11:38:06 +0200	[thread overview]
Message-ID: <D9QOFW6WEIT0.2AJBVJINZRRBV@bootlin.com> (raw)
In-Reply-To: <20250502070318.1561924-1-tony.ambardar@gmail.com>

Hello,

On Fri May 2, 2025 at 9:03 AM CEST, Tony Ambardar wrote:
> I encountered an issue building BTF kernels for 32-bit armhf, where many
> functions are missing in BTF data:

[...]

> Fixes: a53c58158b76 ("dwarf_loader: Mark functions that do not use expected registers for params")
> Signed-off-by: Tony Ambardar <tony.ambardar@gmail.com>

I encountered some issues with pahole 1.30 when trying to generate BTF data
for functions having some __int128 values ([1]), and have been redirected
here by Tony. I gave a try to the patch below and confirm that it fixes my
issue: BTF data is now properly generated for my target function, so:

Tested-by: Alexis Lothoré <alexis.lothore@bootlin.com>

While at it, to follow-up on Alan's request for more testing, I did the
following:
- build kernel and bpf selftests with pahole 1.30, extract BTF raw data
  with bpftool
- repeat with pahole 1.30 + Tony's patch
- I build my kernel for arm64, it is based on bpf-next_base and I use a
  defconfig very close to the one used in BPF CI (so based on
  tools/testing/selftests/bpf/config*)

I observe the following when comparing the resulting BTF data with/without
Tony's patch:
- There is no difference on vmlinux BTF data
- For bpf_testmod.ko, there is a slight shift in the first BTF ID (first ID
  is 46 with pristine pahole, 47 with patched pahole), which in turns makes
  a lot of noise in the diff, but the actual diff seems to be about two new
  BTF entries related to my custom function now being properly detected
  (BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO)

Alexis

[1] https://lore.kernel.org/bpf/D9Q73OTLEOU4.LNAO9K4POETM@bootlin.com/

-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


  reply	other threads:[~2025-05-08  9:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10  8:33 [PATCH dwarves v1] dwarf_loader: Fix skipped encoding of function BTF on 32-bit systems Tony Ambardar
2025-04-10 12:20 ` Alan Maguire
2025-04-16 10:33   ` Tony Ambardar
2025-05-02  7:03     ` [PATCH dwarves v2] " Tony Ambardar
2025-05-08  9:38       ` Alexis Lothoré [this message]
2025-05-09  5:21         ` Tony Ambardar
2025-05-09  8:33           ` Alexis Lothoré
2025-05-12  8:41             ` Tony Ambardar
2025-05-08 13:24       ` Alan Maguire
2025-05-09  5:22         ` Tony Ambardar
2025-05-22  6:37       ` [PATCH dwarves v3] " Tony Ambardar
2025-06-24 16:14         ` Alan Maguire
2025-06-30 10:01           ` Alan Maguire
2025-06-30 13:51             ` Jiri Olsa
2025-06-30 17:32               ` Alan Maguire

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=D9QOFW6WEIT0.2AJBVJINZRRBV@bootlin.com \
    --to=alexis.lothore@bootlin.com \
    --cc=acme@kernel.org \
    --cc=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dwarves@vger.kernel.org \
    --cc=tony.ambardar@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.