From: Greg Kroah-Hartman Date: Mon, 5 May 2025 08:57:22 +0000 (+0200) Subject: 6.12-stable patches X-Git-Tag: v6.1.137~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c611927b015ed0622ffd2a16be20f9762458c65;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: bpf-fix-bpf_internal-namespace-import.patch series --- diff --git a/queue-6.12/bpf-fix-bpf_internal-namespace-import.patch b/queue-6.12/bpf-fix-bpf_internal-namespace-import.patch new file mode 100644 index 0000000000..ac7296c35d --- /dev/null +++ b/queue-6.12/bpf-fix-bpf_internal-namespace-import.patch @@ -0,0 +1,40 @@ +From xry111@xry111.site Mon May 5 10:53:25 2025 +From: Xi Ruoyao +Date: Sat, 3 May 2025 16:50:31 +0800 +Subject: bpf: Fix BPF_INTERNAL namespace import +To: Sasha Levin +Cc: stable@vger.kernel.org, Xi Ruoyao , Mingcong Bai , Alex Davis , 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 , Kumar Kartikeya Dwivedi , bpf@vger.kernel.org, linux-kernel@vger.kernel.org +Message-ID: <20250503085031.118222-1-xry111@xry111.site> + +From: Xi Ruoyao + +The commit cdd30ebb1b9f ("module: Convert symbol namespace to string +literal") makes the grammar of MODULE_IMPORT_NS and EXPORT_SYMBOL_NS +different between the stable branches and the mainline. But when +the commit 955f9ede52b8 ("bpf: Add namespace to BPF internal symbols") +was backported from mainline, only EXPORT_SYMBOL_NS instances are +adapted, leaving the MODULE_IMPORT_NS instance with the "new" grammar +and causing the module fails to build: + + ERROR: modpost: module bpf_preload uses symbol bpf_link_get_from_fd from namespace BPF_INTERNAL, but does not import it. + ERROR: modpost: module bpf_preload uses symbol kern_sys_bpf from namespace BPF_INTERNAL, but does not import it. + +Reported-by: Mingcong Bai +Reported-by: Alex Davis +Closes: https://lore.kernel.org/all/CADiockBKBQTVqjA5G+RJ9LBwnEnZ8o0odYnL=LBZ_7QN=_SZ7A@mail.gmail.com/ +Fixes: 955f9ede52b8 ("bpf: Add namespace to BPF internal symbols") +Signed-off-by: Xi Ruoyao +Signed-off-by: Greg Kroah-Hartman +--- + kernel/bpf/preload/bpf_preload_kern.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/bpf/preload/bpf_preload_kern.c ++++ b/kernel/bpf/preload/bpf_preload_kern.c +@@ -89,5 +89,5 @@ static void __exit fini(void) + } + late_initcall(load); + module_exit(fini); +-MODULE_IMPORT_NS("BPF_INTERNAL"); ++MODULE_IMPORT_NS(BPF_INTERNAL); + MODULE_LICENSE("GPL"); diff --git a/queue-6.12/series b/queue-6.12/series new file mode 100644 index 0000000000..6e1ed7b961 --- /dev/null +++ b/queue-6.12/series @@ -0,0 +1 @@ +bpf-fix-bpf_internal-namespace-import.patch