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
| ||
|
Date: Mon, 13 Sep 2010 12:33:22 +0930 From: Rusty Russell <rusty@...tcorp.com.au> To: Jeremy Fitzhardinge <jeremy@...p.org> Cc: mahatma@...by, linux-kernel@...r.kernel.org, Dmitry Torokhov <dmitry.torokhov@...il.com>, Andrew Morton <akpm@...ux-foundation.org> Subject: Re: #2 (Re: More modaliases + patchtool) On Sat, 11 Sep 2010 01:06:19 pm Jeremy Fitzhardinge wrote: > On 09/11/2010 12:14 PM, Rusty Russell wrote: > > On Thu, 19 Aug 2010 10:12:36 pm Dzianis Kahanovich wrote: > >> diff -pruN a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c > >> --- a/drivers/block/xen-blkfront.c 2010-08-19 15:20:56.344764984 +0300 > >> +++ b/drivers/block/xen-blkfront.c 2010-08-19 15:23:41.104764997 +0300 > >> @@ -1306,6 +1306,9 @@ static int __init xlblk_init(void) > >> > >> return xenbus_register_frontend(&blkfront); > >> } > >> + > >> +MODULE_DEVICE_TABLE(xenbus, blkfront_ids); > >> + > >> module_init(xlblk_init); > > This seems very logical. Jeremy? > > Looks OK. What will the effect be? Will it allow better module > auto-loading or something? Normally yes. Here's how it's supposed to work: 1) The bus provides a "modalias" field for devices, to say what driver module to probe for. You already do this. 2) The driver marks the device table so scripts/mod/file2alias.c can find it. This is what this patch does. 3) scripts/mod/file2alias.c creates the wildcard aliases for the module, based on the device table. You'd need to do this. Instead you have manual MODULE_ALIAS lines for your drivers. Your bus matching is so simple and you have so few device types, that this works. But the Right Way is to use the infrastructure to generate them as above. Hope that clarifies! Rusty. -- 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