From: Alan Maguire <alan.maguire@oracle.com>
To: Ihor Solodrai <ihor.solodrai@linux.dev>, andrii@kernel.org
Cc: acme@kernel.org, ast@kernel.org, eddyz87@gmail.com,
mykolal@fb.com, kernel-team@meta.com, bpf@vger.kernel.org,
dwarves@vger.kernel.org
Subject: Re: [PATCH bpf-next v3 0/4] btf_encoder: emit type tags for bpf_arena pointers
Date: Tue, 25 Feb 2025 09:36:06 +0000 [thread overview]
Message-ID: <deff78f8-1f99-4c79-a302-cff8dce4d803@oracle.com> (raw)
In-Reply-To: <f3b456f90256379d583f58e0d6fe2492d46eb866@linux.dev>
On 24/02/2025 20:32, Ihor Solodrai wrote:
> On 2/21/25 6:47 AM, Alan Maguire wrote:
>> On 19/02/2025 21:05, Ihor Solodrai wrote:
>>> This patch series implements emitting appropriate BTF type tags for
>>> argument and return types of kfuncs marked with KF_ARENA_* flags.
>>>
>>> For additional context see the description of BPF patch
>>> "bpf: define KF_ARENA_* flags for bpf_arena kfuncs" [1].
>>>
>>> The feature depends on recent changes in libbpf [2].
>>>
>>> [1] https://lore.kernel.org/bpf/20250206003148.2308659-1-ihor.solodrai@linux.dev/
>>> [2] https://lore.kernel.org/bpf/20250130201239.1429648-1-ihor.solodrai@linux.dev/
>>>
>>
>> hi Ihor, just realized that given that this change depends on recent
>> libbpf changes, we should look at updating the series to include a patch
>> updating our libbpf subproject checkpoint commit for libbpf to get those
>> changes for the case where the libbpf submodule is built (the default
>> these days). We should probably have a patch (pahole: sync with
>> libbpf-1.6) to cover this. An example of a subproject commit patch can
>> be found at
>>
>> https://lore.kernel.org/dwarves/20240729111317.140816-2-alan.maguire@oracle.com/
>>
>> However I don't think those bpf-next libbpf changes have been synced
>> with the github libbpf repo yet. If the next libbf sync won't be for a
>> while, I don't think this has to block this work - we could just note
>> that it needs to explicitly be built with latest v1.6 via shared library
>> for testing purposes in the interim - but if there's a sync planned soon
>> it'd be great to roll that in too.
>
> Hi Alan. I've just submitted a PR to sync libbpf with upstream.
> https://github.com/libbpf/libbpf/pull/886
>
> Will add a subproject commit patch.
>
Fantastic, thank you!
> Andrii suggested pahole could use __weak declarations of libbpf API
> and detect if they are linked at runtime. This way it's not necessary
> to check for libbpf version. There are just a few places where we
> currently do that.
>
> What do you think if I add patches for that too?
>
That would be great! The current approach of static build-time version
checking isn't ideal, especially for folks using a dynamically linked
libbpf.
Alan
> Thanks.
>
>>
>> Thanks!
>>
>> Alan
>>
>> > v2->v3:
>>> * Nits in patch #1
>>>
>>> v1->v2:
>>> * Rewrite patch #1 refactoring btf_encoder__tag_kfuncs(): now the
>>> post-processing step is removed entirely, and kfuncs are tagged in
>>> btf_encoder__add_func().
>>> * Nits and renames in patch #2
>>> * Add patch #4 editing man pages
>>>
>>> v2: https://lore.kernel.org/dwarves/20250212201552.1431219-1-ihor.solodrai@linux.dev/
>>> v1: https://lore.kernel.org/dwarves/20250207021442.155703-1-ihor.solodrai@linux.dev/
>>>
>>> Ihor Solodrai (4):
>>> btf_encoder: refactor btf_encoder__tag_kfuncs()
>>> btf_encoder: emit type tags for bpf_arena pointers
>>> pahole: introduce --btf_feature=attributes
>>> man-pages: describe attributes and remove reproducible_build
>>>
>>> btf_encoder.c | 279 +++++++++++++++++++++++----------------------
>>> dwarves.h | 1 +
>>> man-pages/pahole.1 | 7 +-
>>> pahole.c | 11 ++
>>> 4 files changed, 158 insertions(+), 140 deletions(-)
>>>
>>
prev parent reply other threads:[~2025-02-25 9:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 21:05 [PATCH bpf-next v3 0/4] btf_encoder: emit type tags for bpf_arena pointers Ihor Solodrai
2025-02-19 21:05 ` [PATCH bpf-next v3 1/4] btf_encoder: refactor btf_encoder__tag_kfuncs() Ihor Solodrai
2025-02-19 21:05 ` [PATCH bpf-next v3 2/4] btf_encoder: emit type tags for bpf_arena pointers Ihor Solodrai
2025-02-19 21:05 ` [PATCH bpf-next v3 3/4] pahole: introduce --btf_feature=attributes Ihor Solodrai
2025-02-19 21:05 ` [PATCH bpf-next v3 4/4] man-pages: describe attributes and remove reproducible_build Ihor Solodrai
2025-02-19 21:42 ` [PATCH bpf-next v3 0/4] btf_encoder: emit type tags for bpf_arena pointers Ihor Solodrai
2025-02-21 11:27 ` Alan Maguire
2025-02-21 14:47 ` Alan Maguire
2025-02-24 20:32 ` Ihor Solodrai
2025-02-25 9:36 ` Alan Maguire [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=deff78f8-1f99-4c79-a302-cff8dce4d803@oracle.com \
--to=alan.maguire@oracle.com \
--cc=acme@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=dwarves@vger.kernel.org \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=kernel-team@meta.com \
--cc=mykolal@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox