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:	Mon, 8 Feb 2016 20:30:07 +0100
From:	Lukas Wunner <lukas@...ner.de>
To:	Darren Hart <dvhart@...radead.org>
Cc:	Pali Rohár <pali.rohar@...il.com>,
	Micha?? K??pie?? <kernel@...pniu.pl>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	Richard Purdie <rpurdie@...ys.net>,
	Jacek Anaszewski <j.anaszewski@...sung.com>,
	platform-driver-x86@...r.kernel.org, linux-leds@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 00/16] Common Dell SMBIOS API

Hi,

On Mon, Feb 08, 2016 at 11:20:14AM -0800, Darren Hart wrote:
> My only major concern is module load order dependencies. Inter-module
> dependencies are frowned upon with good reason, the kernel load ordering is
> non-deterministic and it's possible, for example, for dell-laptop to fail to
> find the symbols exported by dell-smbios under certain conditions.
> 
> I have worked around this in the past with things like the following:
> 
> #ifdef MODULE
> #ifdef CONFIG_FOO_MODULE
> 	if (request_module("foo"))
> 		return -ENODEV;
> #endif
> #endif
> 
> Something like the above may be necessary for dell-smbios in dell-laptop,
> dell-wmi, and dell-leds now that they depend on the dell-smbios exported
> functions.
> 
> Cc Greg in case there is a better way to handle this that I'm not aware of.

Deferred probing seems to be the preferred way, see e.g.:
https://lists.freedesktop.org/archives/dri-devel/2016-January/098404.html

(In this example, apple_gmux_present() determines presence of the device
and !vga_switcheroo_handler_flags() determine non-presence of its driver.)

This will also work if the subsystem depended on is compiled in rather
than in a module.

Best regards,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ