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]
Date:	Tue, 13 Jan 2009 07:42:44 +0100
From:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
To:	Paul Mundt <lethal@...ux-sh.org>, linux-kernel@...r.kernel.org
Subject: Re: platform_driver's probe functions must not be located in
	.init.text

On Tue, Jan 13, 2009 at 12:15:55PM +0900, Paul Mundt wrote:
> On Mon, Jan 12, 2009 at 11:12:02PM +0100, Uwe Kleine-K?nig wrote:
> > Hello,
> > 
> > if the probe function of a platform_driver lives in .init.text (i.e. is
> > defined using __init) registering a device after the .init sections are
> > discarded results in an oops.  You can test that by doing
> > 
> > 	echo $drivername.$somevalidid > /sys/bus/platform/drivers/$drivername/unbind
> > 	echo $drivername.$somevalidid > /sys/bus/platform/drivers/$drivername/bind
> > 
> > As a reply to this mail I send 62 patches that fix this kind of error by
> > moving the respective probe functions to .devinit.text.
> > 
> None of these patches balance with __devexit, is that intentional?
For now, yes, it is.  

One reason is that my script to find errors doesn't trigger for that.

Another is that this is not that critical.  If the probe function is in
.init.text you can get an oops.  If remove is in .text it just occupies
RAM without being used (if HOTPLUG=n).  And if remove is in .exit.text
and is properly wrapped in __exit_p when assigning .remove everything is
fine, too, you just cannot remove a device.

Maybe I will address this in later series.

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ