mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH bpf-next] kbuild, bpf: Enable reproducible BTF generation
@ 2024-12-10 23:23 Thomas Weißschuh
  2024-12-11  0:17 ` Ihor Solodrai
  2025-01-22 18:51 ` Thomas Weißschuh
  0 siblings, 2 replies; 10+ messages in thread
From: Thomas Weißschuh @ 2024-12-10 23:23 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,
	Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Kui-Feng Lee,
	Alan Maguire, Martin Rodriguez Reboredo, Miguel Ojeda
  Cc: bpf, linux-kbuild, linux-kernel, Thomas Weißschuh

Pahole v1.27 added a new BTF generation feature to support
reproducibility in the face of multithreading.
Enable it if supported and reproducible builds are requested.

As unknown --btf_features are ignored, avoid the test for the pahole
version to keep the line readable.

Fixes: b4f72786429c ("scripts/pahole-flags.sh: Parse DWARF and generate BTF with multithreading.")
Fixes: 72d091846de9 ("kbuild: avoid too many execution of scripts/pahole-flags.sh")
Link: https://lore.kernel.org/lkml/4154d202-5c72-493e-bf3f-bce882a296c6@gentoo.org/
Link: https://lore.kernel.org/lkml/20240322-pahole-reprodicible-v1-1-3eaafb1842da@weissschuh.net/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 scripts/Makefile.btf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/Makefile.btf b/scripts/Makefile.btf
index c3cbeb13de503555adcf00029a0b328e74381f13..da23265bc8b3cf43c0a1c89fbc4f53815a290e13 100644
--- a/scripts/Makefile.btf
+++ b/scripts/Makefile.btf
@@ -22,6 +22,7 @@ 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-$(if $(KBUILD_BUILD_TIMESTAMP),y) += --btf_features=reproducible_build
 
 ifneq ($(KBUILD_EXTMOD),)
 module-pahole-flags-$(call test-ge, $(pahole-ver), 126) += --btf_features=distilled_base

---
base-commit: 7cb1b466315004af98f6ba6c2546bb713ca3c237
change-id: 20241124-pahole-reproducible-2b879ac8bdab

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>


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

end of thread, other threads:[~2025-01-22 18:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-10 23:23 [PATCH bpf-next] kbuild, bpf: Enable reproducible BTF generation Thomas Weißschuh
2024-12-11  0:17 ` Ihor Solodrai
2024-12-11  6:24   ` Thomas Weißschuh
2024-12-12 19:23     ` Andrii Nakryiko
2024-12-12 21:07       ` Thomas Weißschuh
2024-12-12 22:54         ` Andrii Nakryiko
2024-12-12 23:18           ` Thomas Weißschuh
2024-12-12 23:21             ` Andrii Nakryiko
2024-12-12 23:31               ` Thomas Weißschuh
2025-01-22 18:51 ` 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

all inboxes | Powered by JetHome®