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]
Date:	Fri, 20 May 2011 09:46:06 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Grant Likely <grant.likely@...retlab.ca>
Cc:	Jonas Aaberg <jonas.aberg@...ricsson.com>,
	Barry Song <21cnbao@...il.com>, linux-kernel@...r.kernel.org,
	Lee Jones <lee.jones@...aro.org>,
	linux-arm-kernel@...ts.infradead.org,
	Arjan van de Ven <arjan@...ux.intel.com>
Subject: Re: [PATCH 02/10] mach-u300: rewrite gpio driver, move to drivers/gpio

2011/5/20 Grant Likely <grant.likely@...retlab.ca>:
> On Thu, May 19, 2011 at 02:25:47PM +0200, Linus Walleij wrote:
>> On Thu, May 19, 2011 at 1:38 PM, Barry Song <21cnbao@...il.com> wrote:
>>
>> >> -arch_initcall(u300_gpio_init);
>> >> -module_exit(u300_gpio_exit);
>> >>
>> > looks like the driver can't be a real module, is the module_exit
>> > suitable? it looks strange module_exit plays together with
>> > arch_initcall.
>>
>> It's a rather common design pattern in the kernel for early
>> platform drivers. Either the dependencies are resolved by the
>> different initlevels or they are resolved in probe order with
>> loadable modules. Module load will call all initlevels in order.
>>
>> It is not elegant but it is common.
>
> but it does need to be fixed.  Unfortunately it is not simple.  What
> is needed is a generic deferral or ability for drivers to declare
> dependences on other devices beyond their immediate parent.
>
> I've thought about this a bit on and off over the last year, but I
> haven't actually sat down to try and hack anything out yet.

Sounds like it needs to do for the kernel what systemd does for
userspace in my ears. And I wholeheartedly agree it needs
fixing.

A main concern would be that these dependencies are currently
implicit, Arjan did a great job on fixing some of it by
parallellizing initilization of drivers per initlevel and sync it at at
the end of each level, doing a clean dependecy resolution
would do away with all the initlevels eventually.

Yours,
Linus Walleij
--
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