* Fwd: [PATCH v4 07/17] kbuild: generate module BTF based on vmlinux.unstripped
[not found] ` <20260113-module-hashes-v4-7-0b932db9b56b@weissschuh.net>
@ 2026-02-20 9:29 ` Thomas Weißschuh
2026-02-20 16:55 ` Ihor Solodrai
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Weißschuh @ 2026-02-20 9:29 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
Cc: bpf, linux-kernel
Hi BPF/BTF maintainers,
could you take a look at the patch quoted below?
It is part of a patch series which only tangentially touches BTF [0].
If you prefer to receive the full patch series, please let me know and
I'll do that for the next revision.
[0] https://lore.kernel.org/lkml/20260113-module-hashes-v4-6-0b932db9b56b@weissschuh.net/
Thomas
On 2026-01-13 13:28:51+0100, Thomas Weißschuh wrote:
> The upcoming module hashes functionality will build the modules in
> between the generation of the BTF data and the final link of vmlinux.
> At this point vmlinux is not yet built and therefore can't be used for
> module BTF generation. vmlinux.unstripped however is usable and
> sufficient for BTF generation.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> scripts/Makefile.modfinal | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal
> index adfef1e002a9..930db0524a0a 100644
> --- a/scripts/Makefile.modfinal
> +++ b/scripts/Makefile.modfinal
> @@ -40,11 +40,11 @@ quiet_cmd_ld_ko_o = LD [M] $@
>
> quiet_cmd_btf_ko = BTF [M] $@
> cmd_btf_ko = \
> - if [ ! -f $(objtree)/vmlinux ]; then \
> - printf "Skipping BTF generation for %s due to unavailability of vmlinux\n" $@ 1>&2; \
> + if [ ! -f $(objtree)/vmlinux.unstripped ]; then \
> + printf "Skipping BTF generation for %s due to unavailability of vmlinux.unstripped\n" $@ 1>&2; \
> else \
> - LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) $(MODULE_PAHOLE_FLAGS) --btf_base $(objtree)/vmlinux $@; \
> - $(RESOLVE_BTFIDS) -b $(objtree)/vmlinux $@; \
> + LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) $(MODULE_PAHOLE_FLAGS) --btf_base $(objtree)/vmlinux.unstripped $@; \
> + $(RESOLVE_BTFIDS) -b $(objtree)/vmlinux.unstripped $@; \
> fi;
>
> # Same as newer-prereqs, but allows to exclude specified extra dependencies
>
> --
> 2.52.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fwd: [PATCH v4 07/17] kbuild: generate module BTF based on vmlinux.unstripped
2026-02-20 9:29 ` Fwd: [PATCH v4 07/17] kbuild: generate module BTF based on vmlinux.unstripped Thomas Weißschuh
@ 2026-02-20 16:55 ` Ihor Solodrai
2026-02-23 7:40 ` Thomas Weißschuh
0 siblings, 1 reply; 3+ messages in thread
From: Ihor Solodrai @ 2026-02-20 16:55 UTC (permalink / raw)
To: Thomas Weißschuh, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
Hao Luo, Jiri Olsa
Cc: bpf, linux-kernel
On 2/20/26 1:29 AM, Thomas WeiÃschuh wrote:
> Hi BPF/BTF maintainers,
>
> could you take a look at the patch quoted below?
> It is part of a patch series which only tangentially touches BTF [0].
> If you prefer to receive the full patch series, please let me know and
> I'll do that for the next revision.
>
> [0] https://lore.kernel.org/lkml/20260113-module-hashes-v4-6-0b932db9b56b@weissschuh.net/
Hi Thomas, thank you for the ping.
The BTF generation process has significantly changed recently:
https://lore.kernel.org/bpf/20251219181321.1283664-1-ihor.solodrai@linux.dev/
I suggest you rebase the integrity checking series on top of that
(it's already been merged into Linus' tree).
Adding a .stamp is a small and simple change, so maybe it's worth
landing separately through BPF tree?
>
> Thomas
>
> On 2026-01-13 13:28:51+0100, Thomas Weißschuh wrote:
>> The upcoming module hashes functionality will build the modules in
>> between the generation of the BTF data and the final link of vmlinux.
>> At this point vmlinux is not yet built and therefore can't be used for
>> module BTF generation. vmlinux.unstripped however is usable and
>> sufficient for BTF generation.
>>
>> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
>> ---
>> scripts/Makefile.modfinal | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal
>> index adfef1e002a9..930db0524a0a 100644
>> --- a/scripts/Makefile.modfinal
>> +++ b/scripts/Makefile.modfinal
>> @@ -40,11 +40,11 @@ quiet_cmd_ld_ko_o = LD [M] $@
>>
>> quiet_cmd_btf_ko = BTF [M] $@
>> cmd_btf_ko = \
>> - if [ ! -f $(objtree)/vmlinux ]; then \
>> - printf "Skipping BTF generation for %s due to unavailability of vmlinux\n" $@ 1>&2; \
>> + if [ ! -f $(objtree)/vmlinux.unstripped ]; then \
>> + printf "Skipping BTF generation for %s due to unavailability of vmlinux.unstripped\n" $@ 1>&2; \
>> else \
>> - LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) $(MODULE_PAHOLE_FLAGS) --btf_base $(objtree)/vmlinux $@; \
>> - $(RESOLVE_BTFIDS) -b $(objtree)/vmlinux $@; \
>> + LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) $(MODULE_PAHOLE_FLAGS) --btf_base $(objtree)/vmlinux.unstripped $@; \
>> + $(RESOLVE_BTFIDS) -b $(objtree)/vmlinux.unstripped $@; \
>> fi;
>>
>> # Same as newer-prereqs, but allows to exclude specified extra dependencies
>>
>> --
>> 2.52.0
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fwd: [PATCH v4 07/17] kbuild: generate module BTF based on vmlinux.unstripped
2026-02-20 16:55 ` Ihor Solodrai
@ 2026-02-23 7:40 ` Thomas Weißschuh
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Weißschuh @ 2026-02-23 7:40 UTC (permalink / raw)
To: Ihor Solodrai
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
bpf, linux-kernel
On 2026-02-20 08:55:45-0800, Ihor Solodrai wrote:
> On 2/20/26 1:29 AM, Thomas WeiÃschuh wrote:
> > could you take a look at the patch quoted below?
> > It is part of a patch series which only tangentially touches BTF [0].
> > If you prefer to receive the full patch series, please let me know and
> > I'll do that for the next revision.
> >
> > [0] https://lore.kernel.org/lkml/20260113-module-hashes-v4-6-0b932db9b56b@weissschuh.net/
>
> Hi Thomas, thank you for the ping.
>
> The BTF generation process has significantly changed recently:
> https://lore.kernel.org/bpf/20251219181321.1283664-1-ihor.solodrai@linux.dev/
>
> I suggest you rebase the integrity checking series on top of that
> (it's already been merged into Linus' tree).
>
> Adding a .stamp is a small and simple change, so maybe it's worth
> landing separately through BPF tree?
On its own this stamp files doesn't make much sense in my opinion.
With the new BTF generation (and general changes to my series) it may
also not be necessary anymore. So I'd like to keep this patch as part
of the series.
The important point to get feedback on, is less the stamp file but the
usage of vmlinux.unstripped as base for module BTF generation as shown
in the patch below.
Looking at that again, I'll need to validate it with out-of-tree
modules.
Thomas
> > On 2026-01-13 13:28:51+0100, Thomas Weißschuh wrote:
> >> The upcoming module hashes functionality will build the modules in
> >> between the generation of the BTF data and the final link of vmlinux.
> >> At this point vmlinux is not yet built and therefore can't be used for
> >> module BTF generation. vmlinux.unstripped however is usable and
> >> sufficient for BTF generation.
> >>
> >> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> >> ---
> >> scripts/Makefile.modfinal | 8 ++++----
> >> 1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal
> >> index adfef1e002a9..930db0524a0a 100644
> >> --- a/scripts/Makefile.modfinal
> >> +++ b/scripts/Makefile.modfinal
> >> @@ -40,11 +40,11 @@ quiet_cmd_ld_ko_o = LD [M] $@
> >>
> >> quiet_cmd_btf_ko = BTF [M] $@
> >> cmd_btf_ko = \
> >> - if [ ! -f $(objtree)/vmlinux ]; then \
> >> - printf "Skipping BTF generation for %s due to unavailability of vmlinux\n" $@ 1>&2; \
> >> + if [ ! -f $(objtree)/vmlinux.unstripped ]; then \
> >> + printf "Skipping BTF generation for %s due to unavailability of vmlinux.unstripped\n" $@ 1>&2; \
> >> else \
> >> - LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) $(MODULE_PAHOLE_FLAGS) --btf_base $(objtree)/vmlinux $@; \
> >> - $(RESOLVE_BTFIDS) -b $(objtree)/vmlinux $@; \
> >> + LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) $(MODULE_PAHOLE_FLAGS) --btf_base $(objtree)/vmlinux.unstripped $@; \
> >> + $(RESOLVE_BTFIDS) -b $(objtree)/vmlinux.unstripped $@; \
> >> fi;
> >>
> >> # Same as newer-prereqs, but allows to exclude specified extra dependencies
> >>
> >> --
> >> 2.52.0
> >>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-23 7:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260113-module-hashes-v4-0-0b932db9b56b@weissschuh.net>
[not found] ` <20260113-module-hashes-v4-7-0b932db9b56b@weissschuh.net>
2026-02-20 9:29 ` Fwd: [PATCH v4 07/17] kbuild: generate module BTF based on vmlinux.unstripped Thomas Weißschuh
2026-02-20 16:55 ` Ihor Solodrai
2026-02-23 7:40 ` Thomas Weißschuh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox