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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aRRoO5mXbH9eg0fE@hovoldconsulting.com>
Date: Wed, 12 Nov 2025 11:58:03 +0100
From: Johan Hovold <johan@...nel.org>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Alexandre Torgue <alexandre.torgue@...s.st.com>,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] clocksource/drivers/stm: Fix section mismatches

On Wed, Nov 12, 2025 at 10:57:21AM +0100, Daniel Lezcano wrote:
> On 11/10/25 15:51, Johan Hovold wrote:

> > On Wed, Nov 05, 2025 at 02:32:18PM +0100, Daniel Lezcano wrote:
> > 
> >> You should replace __init by __init_or_module
> > 
> > That's not sufficient as the driver can still be rebound through sysfs
> > currently (the driver would probably crash anyway, but that's a separate
> > issue).
> > 
> > Also note that no drivers use __init_or_module these days, likely as
> > everyone uses modules and it's not worth the added complexity in trying
> > to get the section markers right for a build configuration that few
> > people care about.
> > 
> > I can send a follow-on patch to suppress the unbind attribute, or
> > include it in a v2 if you insist on using __init_or_module.
> > 
> > What do you prefer?
> 
> I think it makes sens to use __init_or_module because these drivers have 
> been always compiled in and we are converting them into modules.

That's not really relevant. __init_or_module will only save a tiny bit
of memory in builds where modules are completely disabled
(i.e. !CONFIG_MODULES) which is hardly used any more.

Note that it has nothing to do with whether this particular driver is
built as a module or not.

And since no other drivers cares about this uncommon case, are you sure
you want to do this here?

Note that this would also require suppressing section mismatch warnings
for the common case (CONFIG_MODULES).

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ