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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251020091613.22562-1-johan@kernel.org>
Date: Mon, 20 Oct 2025 11:16:13 +0200
From: Johan Hovold <johan@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>,
	Nicolas Schier <nicolas.schier@...ux.dev>
Cc: Masahiro Yamada <masahiroy@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Johan Hovold <johan@...nel.org>
Subject: [PATCH] modpost: drop '*_probe' from section check whitelist

Several symbol patterns used to be whitelisted to allow drivers to refer
to functions annotated with __devinit and __devexit, which have since
been removed.

Commit e1dc1bfe5b27 ("modpost: remove more symbol patterns from the
section check whitelist") removed most of these patterns but left
'*_probe' after a reported warning in an irqchip driver.

Turns out that was indeed an incorrect reference which has now been
fixed by commit 9b685058ca93 ("irqchip/qcom-irq-combiner: Fix section
mismatch").

A recently added clocksource driver also relies on this suffix to
suppress another valid warning, and that is being fixed separately. [1]

Note that drivers with valid reasons for suppressing the warnings can
use the __ref macros.

Link: https://lore.kernel.org/lkml/20251017054943.7195-1-johan@kernel.org/ [1]
Signed-off-by: Johan Hovold <johan@...nel.org>
---

As mentioned above there are still two drivers relying on the "_probe"
pattern to suppress valid warnings so perhaps it's best to hold off on
merging this until the corresponding fixes are in mainline (e.g. next
cycle or so unless Thomas can fast-track them).

Johan


 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 47c8aa2a6939..5c499dace0bb 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -953,7 +953,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym,
 	/* symbols in data sections that may refer to any init/exit sections */
 	if (match(fromsec, PATTERNS(DATA_SECTIONS)) &&
 	    match(tosec, PATTERNS(ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS)) &&
-	    match(fromsym, PATTERNS("*_ops", "*_probe", "*_console")))
+	    match(fromsym, PATTERNS("*_ops", "*_console")))
 		return 0;
 
 	/* Check for pattern 3 */
-- 
2.49.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ