From: Greg KH <gregkh@linuxfoundation.org>
To: Xi Ruoyao <xry111@xry111.site>
Cc: Sasha Levin <sashal@kernel.org>,
stable@vger.kernel.org, Mingcong Bai <jeffbai@aosc.io>,
Alex Davis <alex47794@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6.12.y] bpf: Fix BPF_INTERNAL namespace import
Date: Mon, 5 May 2025 10:55:13 +0200 [thread overview]
Message-ID: <2025050535-cargo-transpose-2099@gregkh> (raw)
In-Reply-To: <20250503085031.118222-1-xry111@xry111.site>
On Sat, May 03, 2025 at 04:50:31PM +0800, Xi Ruoyao wrote:
> 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 <jeffbai@aosc.io>
> Reported-by: Alex Davis <alex47794@gmail.com>
> 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 <xry111@xry111.site>
> ---
> kernel/bpf/preload/bpf_preload_kern.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/bpf/preload/bpf_preload_kern.c b/kernel/bpf/preload/bpf_preload_kern.c
> index 56a81df7a9d7..fdad0eb308fe 100644
> --- 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");
Ick, sorry about that, I thought I had fixed this all up. Odd it never
showed up in anyone's build testing, I wonder why.
I'll go do a quick release with just this fix in it now to get this
resolved, thanks!
greg k-h
next prev parent reply other threads:[~2025-05-05 8:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-03 8:50 [PATCH 6.12.y] bpf: Fix BPF_INTERNAL namespace import Xi Ruoyao
2025-05-05 8:55 ` Greg KH [this message]
2025-05-05 15:13 ` Sasha Levin
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=2025050535-cargo-transpose-2099@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=alex47794@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=jeffbai@aosc.io \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=sashal@kernel.org \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=stable@vger.kernel.org \
--cc=xry111@xry111.site \
--cc=yonghong.song@linux.dev \
/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 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.