All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next] kbuild, bpf: enable --btf_features=attributes
@ 2025-04-14 18:59 Ihor Solodrai
  2025-04-15  7:58 ` Eduard Zingerman
  2025-04-15 18:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Ihor Solodrai @ 2025-04-14 18:59 UTC (permalink / raw)
  To: andrii, ast, daniel, eddyz87; +Cc: bpf, mykolal, kernel-team

pahole v1.30 has a BTF encoding feature for arbitrary attributes, used
in particular for tagging bpf_arena_alloc_pages and
bpf_arena_free_pages BPF kfuncs [1][2].

Enable it for the kernel build.

[1] https://lore.kernel.org/bpf/20250130201239.1429648-1-ihor.solodrai@linux.dev/
[2] https://lore.kernel.org/bpf/20250228194654.1022535-1-ihor.solodrai@linux.dev/

Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
---
 scripts/Makefile.btf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/Makefile.btf b/scripts/Makefile.btf
index fbaaec2187e5..db76335dd917 100644
--- a/scripts/Makefile.btf
+++ b/scripts/Makefile.btf
@@ -23,6 +23,8 @@ else
 # Switch to using --btf_features for v1.26 and later.
 pahole-flags-$(call test-ge, $(pahole-ver), 126)  = -j$(JOBS) --btf_features=encode_force,var,float,enum64,decl_tag,type_tag,optimized_func,consistent_func,decl_tag_kfuncs
 
+pahole-flags-$(call test-ge, $(pahole-ver), 130) += --btf_features=attributes
+
 ifneq ($(KBUILD_EXTMOD),)
 module-pahole-flags-$(call test-ge, $(pahole-ver), 128) += --btf_features=distilled_base
 endif
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next] kbuild, bpf: enable --btf_features=attributes
  2025-04-14 18:59 [PATCH bpf-next] kbuild, bpf: enable --btf_features=attributes Ihor Solodrai
@ 2025-04-15  7:58 ` Eduard Zingerman
  2025-04-15 18:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Eduard Zingerman @ 2025-04-15  7:58 UTC (permalink / raw)
  To: Ihor Solodrai; +Cc: andrii, ast, daniel, bpf, mykolal, kernel-team

Ihor Solodrai <ihor.solodrai@linux.dev> writes:

> pahole v1.30 has a BTF encoding feature for arbitrary attributes, used
> in particular for tagging bpf_arena_alloc_pages and
> bpf_arena_free_pages BPF kfuncs [1][2].
>
> Enable it for the kernel build.
>
> [1] https://lore.kernel.org/bpf/20250130201239.1429648-1-ihor.solodrai@linux.dev/
> [2] https://lore.kernel.org/bpf/20250228194654.1022535-1-ihor.solodrai@linux.dev/
>
> Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
> ---

With this patch and a new pahole I see the following text in vmlinux.h:

  ...
  extern void __attribute__((address_space(1))) *bpf_arena_alloc_pages(void *p__map, void __attribute__((address_space(1))) *addr__ign, u32 page_cnt, int node_id, u64 flags) __weak __ksym;
  extern void bpf_arena_free_pages(void *p__map, void __attribute__((address_space(1))) *ptr__ign, u32 page_cnt) __weak __ksym;
  ...

test_progs are compiling and passing w/o issues.

Tested-by: Eduard Zingerman <eddyz87@gmail.com>

[...]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next] kbuild, bpf: enable --btf_features=attributes
  2025-04-14 18:59 [PATCH bpf-next] kbuild, bpf: enable --btf_features=attributes Ihor Solodrai
  2025-04-15  7:58 ` Eduard Zingerman
@ 2025-04-15 18:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-15 18:30 UTC (permalink / raw)
  To: Ihor Solodrai; +Cc: andrii, ast, daniel, eddyz87, bpf, mykolal, kernel-team

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Martin KaFai Lau <martin.lau@kernel.org>:

On Mon, 14 Apr 2025 11:59:18 -0700 you wrote:
> pahole v1.30 has a BTF encoding feature for arbitrary attributes, used
> in particular for tagging bpf_arena_alloc_pages and
> bpf_arena_free_pages BPF kfuncs [1][2].
> 
> Enable it for the kernel build.
> 
> [1] https://lore.kernel.org/bpf/20250130201239.1429648-1-ihor.solodrai@linux.dev/
> [2] https://lore.kernel.org/bpf/20250228194654.1022535-1-ihor.solodrai@linux.dev/
> 
> [...]

Here is the summary with links:
  - [bpf-next] kbuild, bpf: enable --btf_features=attributes
    https://git.kernel.org/bpf/bpf-next/c/21cb33c7e065

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-15 18:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14 18:59 [PATCH bpf-next] kbuild, bpf: enable --btf_features=attributes Ihor Solodrai
2025-04-15  7:58 ` Eduard Zingerman
2025-04-15 18:30 ` patchwork-bot+netdevbpf

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.