lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250520050703.12173-1-oaygnahzz@gmail.com>
Date: Tue, 20 May 2025 13:07:03 +0800
From: oaygnahzz <oaygnahzz@...il.com>
To: masahiroy@...nel.org
Cc: nathan@...nel.org,
	nicolas.schier@...ux.dev,
	linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	oaygnahzz <oaygnahzz@...il.com>
Subject: [PATCH] modpost: decreasing the log print level

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@...il.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ