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] [day] [month] [year] [list]
Message-ID: <20130225070751.GA4614@core.coreip.homeip.net>
Date:	Sun, 24 Feb 2013 23:07:51 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Alexander Shiyan <shc_work@...l.ru>
Cc:	Stephen Warren <swarren@...dotorg.org>,
	linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
	Dong Aisheng <dong.aisheng@...aro.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Thierry Reding <thierry.reding@...onic-design.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v5 1/3] mfd: syscon: Removed support for unloading

On Mon, Feb 25, 2013 at 10:53:42AM +0400, Alexander Shiyan wrote:
> > On Sat, Feb 23, 2013 at 04:51:19PM -0700, Stephen Warren wrote:
> > > On 02/22/2013 10:28 PM, Alexander Shiyan wrote:
> > > >> On 02/22/2013 10:15 PM, Alexander Shiyan wrote:
> > > >>> The driver can be used in various subsystems and therefore should not
> > > >>> be unloaded when it is defined in the kernel configuration, so remove
> > > >>> support for unloading it.
> > > >>
> > > >> Why not fix the clients to module_get() at the appropriate times; then
> > > >> you could still allow unloading, couldn't you?
> > > > 
> > > > I has explain this before.
> > > 
> > > If multiple people have asked this, perhaps it'd be a good idea to
> > > include the answer in the commit description.
> > > 
> > > > Driver defined as "bool" and loaded via postcore_initcall.
> > > 
> > > Being defined as a "bool" sounds like a reasonable reason that no
> > > remove() is required.
> > 
> > No, it is not - I can still unbind the device from driver via sysfs. Now
> > what will happen is resources are leaked and won't be available when
> > trying to bin (via sysfs) again.
> > 
> > This patch is broken.
> 
> I will try to resolve the dispute.
> Initially, the first part of the patch (this) was an attempt to prevent the unloading
> (unregister) of the driver (not the device), ie remove module_exit call.
> The patch also removes the code to remove the device. Inclusion in this patch
> of the code was a mistake. Because of this, people are confused about the terms,
> including me.
> Code, relating to the removal of the device should be moved to the third patch.
> Since all moved to using the managed resources, it should not have any questions.
> 
> About uloading (unregister) driver: As far i understand "__exit" section is
> completely discarded when kernel compiled without module support.
> But where is this call (module_exit) is placing in case "bool" driver and
> kernel is compiled with module support? Fixme please.

In both cases __exit code goes to .exit.text section which is either
discarded (code is compiled into the kernel) or kept (code is built as a
module).

Still, because the device can forcibly be unbound from the driver, all
these changes are pretty useless for the stated purpose. All in all, it
seems to me that this code should not be a driver at all, but rather
rolled into regmap infrastructure and be part of it's initialization
process.

Thanks.

-- 
Dmitry
--
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