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: <20160712161927.7521-2-lee.jones@linaro.org>
Date:	Tue, 12 Jul 2016 17:19:26 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc:	kernel@...inux.com, maxime.coquelin@...com, patrice.chotard@...com,
	gregkh@...uxfoundation.org, arnd@...db.de,
	peter.griffin@...aro.org, Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 1/2] driver-core: Add externally callable function to trigger deferred probes

Deferred probes are currently only re-executed if new drivers are successfully
registered and probed.  Drivers which defer their probes based on things like
missing firmware located on rootfs will sometimes only be re-probed if kernel
modules are found.  Unfortunately, this is fragile and can not be guaranteed
or relied upon.  This call allows us to trigger probe re-execution at any
point during boot.  For instance after rootfs is mounted in order to collect
firmwares in rootfs.

Tested-by: Peter Griffin <peter.griffin@...aro.org>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
 drivers/base/dd.c      | 8 ++++++++
 include/linux/device.h | 1 +
 2 files changed, 9 insertions(+)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 16688f5..ab20851 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -203,6 +203,14 @@ void device_unblock_probing(void)
 }
 
 /**
+ * deferred_probe_tigger() - Trigger a deferred probe
+ */
+void deferred_probe_trigger(void)
+{
+	driver_deferred_probe_trigger();
+}
+
+/**
  * deferred_probe_initcall() - Enable probing of deferred devices
  *
  * We don't want to get in the way when the bulk of drivers are getting probed.
diff --git a/include/linux/device.h b/include/linux/device.h
index 38f0281..d441471 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -293,6 +293,7 @@ extern struct device_driver *driver_find(const char *name,
 					 struct bus_type *bus);
 extern int driver_probe_done(void);
 extern void wait_for_device_probe(void);
+extern void deferred_probe_trigger(void);
 
 
 /* sysfs interface for exporting driver attributes */
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ