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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc7af563-530d-4e1f-bcbb-90bcfc2fe11a@stanley.mountain>
Date: Thu, 24 Oct 2024 17:54:07 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Laura Nao <laura.nao@...labora.com>,
	NĂ­colas F. R. A. Prado <nfraprado@...labora.com>
Cc: ben.copeland@...aro.org, naresh.kamboju@...aro.org,
	anders.roxell@...aro.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	linux-kernel@...r.kernel.org
Subject: [RFC] driver core: add a dbg printk for successful probes

Hi Laura, and Nicolas,

I've been thinking about the driver probing talk you gave last year.  The
talk was about how tricky it is sometimes to determine which drivers have
probed successfully.  The drivers might be built into the kernel instead of
as a module, for example.  The idea was that we could make a list of
drivers we expected to probe successfully and find regressions in probe
that way.

Why couldn't we just add a printk in call_driver_probe() and then we could
pass

	dd.dyndbg="func call_driver_probe +p"

at the kernel command line.

On my qemu system the `dmesg | grep succeeded` looks like this:

[    0.135501] reg-dummy reg-dummy: probing reg-dummy succeeded
[    0.169490] psci-cpuidle-domain psci: probing psci-cpuidle-domain succeeded
[    0.188039] ctrl 9000000.pl011:0: probing ctrl succeeded
[    0.188598] port 9000000.pl011:0.0: probing port succeeded
[    0.206720] uart-pl011 9000000.pl011: probing uart-pl011 succeeded
[    1.071943] pl061_gpio 9030000.pl061: probing pl061_gpio succeeded
[    1.117740] pci-host-generic 4010000000.pcie: probing pci-host-generic succeeded
[    1.159963] virtio-mmio a003e00.virtio_mmio: probing virtio-mmio succeeded
[    1.166752] virtio-pci 0000:00:01.0: probing virtio-pci succeeded
[    1.168180] virtio-pci 0000:00:02.0: probing virtio-pci succeeded
[    1.173959] virtio-pci 0000:00:03.0: probing virtio-pci succeeded
[    1.178934] ctrl serial8250:0: probing ctrl succeeded
[    1.179059] port serial8250:0.0: probing port succeeded
[    1.182032] port serial8250:0.1: probing port succeeded
[    1.182490] port serial8250:0.2: probing port succeeded
[    1.182916] port serial8250:0.3: probing port succeeded
[    1.183309] port serial8250:0.4: probing port succeeded
[    1.183705] port serial8250:0.5: probing port succeeded
[    1.185558] port serial8250:0.6: probing port succeeded
[    1.185962] port serial8250:0.7: probing port succeeded
[    1.186352] port serial8250:0.8: probing port succeeded
[    1.189519] port serial8250:0.9: probing port succeeded
[    1.189972] port serial8250:0.10: probing port succeeded
[    1.190378] port serial8250:0.11: probing port succeeded
[    1.190791] port serial8250:0.12: probing port succeeded
[    1.191180] port serial8250:0.13: probing port succeeded
[    1.191595] port serial8250:0.14: probing port succeeded
[    1.192017] port serial8250:0.15: probing port succeeded
[    1.193533] port serial8250:0.16: probing port succeeded
[    1.193955] port serial8250:0.17: probing port succeeded
[    1.194360] port serial8250:0.18: probing port succeeded
[    1.197551] port serial8250:0.19: probing port succeeded
[    1.197965] port serial8250:0.20: probing port succeeded
[    1.198353] port serial8250:0.21: probing port succeeded
[    1.201960] port serial8250:0.22: probing port succeeded
[    1.202528] port serial8250:0.23: probing port succeeded
[    1.202997] port serial8250:0.24: probing port succeeded
[    1.203415] port serial8250:0.25: probing port succeeded
[    1.203819] port serial8250:0.26: probing port succeeded
[    1.204279] port serial8250:0.27: probing port succeeded
[    1.204669] port serial8250:0.28: probing port succeeded
[    1.205659] port serial8250:0.29: probing port succeeded
[    1.209673] port serial8250:0.30: probing port succeeded
[    1.210117] port serial8250:0.31: probing port succeeded
[    1.210643] serial8250 serial8250: probing serial8250 succeeded
[    1.212911] kgdboc kgdboc: probing kgdboc succeeded
[    1.291410] virtio_blk virtio0: probing virtio_blk succeeded
[    1.309485] virtio_blk virtio3: probing virtio_blk succeeded
[    1.331200] virtio_net virtio1: probing virtio_net succeeded
[    1.354786] fw_cfg 9020000.fw-cfg: probing fw_cfg succeeded
[    1.356688] scmi_virtio_transport firmware:scmi-vio-backend: probing scmi_virtio_transport succeeded
[    1.357830] scmi-virtio virtio2: probing scmi-virtio succeeded
[    1.394738] scmi-clocks scmi_dev.3: probing scmi-clocks succeeded
[    1.415087] arm-scmi arm-scmi.0.auto: probing arm-scmi succeeded
[    1.426512] armv8-pmu pmu: probing armv8-pmu succeeded

I kind of wish all the printks in that function started with __func__.  Would
this be useful for you?  Send me any feedback you have and I can resend this as
a proper patch.

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 9b745ba54de1..e8cc710ead76 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -579,6 +579,7 @@ static int call_driver_probe(struct device *dev, const struct device_driver *drv
 
 	switch (ret) {
 	case 0:
+		dev_dbg(dev, "probing %s succeeded\n", drv->name);
 		break;
 	case -EPROBE_DEFER:
 		/* Driver requested deferred probing */


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ