linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] modpost: decreasing the log print level
@ 2025-05-20  5:07 oaygnahzz
  0 siblings, 0 replies; only message in thread
From: oaygnahzz @ 2025-05-20  5:07 UTC (permalink / raw)
  To: masahiroy; +Cc: nathan, nicolas.schier, linux-kbuild, linux-kernel, oaygnahzz

We are doing a kernel hot patch and have modified the internal 
implementation of an exported function (funcA) while also adding 
a new function (funcB) and exporting it. The compilation of the 
kernel hot patch failed, and the print is as follows:.
export_stymbol section contains strange symbol '(unknown)'.

I found that there was a change in whether to call sym_add_exported. 
Before commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost")
 committed, it only judged whether it was equal to __ksymtab_. But now, 
it obtains the export symbol by traversing the. rela.export_symbol section 
and then calls check_export_symbol. In the above case, the. 
rela.export_symbol section will have additional funcA information, 
but no export information. This will lead to an error in calling 
check_export_symbol (null is returned when find_fromsym processes funcA), 
and the hot patch make fails.

Signed-off-by: oaygnahzz <oaygnahzz@gmail.com>
---
 scripts/mod/modpost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index be89921d60b6..cbf83c58f00f 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1075,7 +1075,7 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf,
 	label_name = sym_name(elf, label);
 
 	if (!strstarts(label_name, prefix)) {
-		error("%s: .export_symbol section contains strange symbol '%s'\n",
+		warn("%s: .export_symbol section contains strange symbol '%s'\n",
 		      mod->name, label_name);
 		return;
 	}
-- 
2.33.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-20  8:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-20  5:07 [PATCH] modpost: decreasing the log print level oaygnahzz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).