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]
Message-Id: <1208163516.6958.155.camel@pasglop>
Date:	Mon, 14 Apr 2008 18:58:36 +1000
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Pierre Ossman <drzeus-list@...eus.cx>
Cc:	Greg KH <gregkh@...e.de>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: pci: add to global list before sysfs?


On Mon, 2008-04-14 at 10:35 +0200, Pierre Ossman wrote:
> On Mon, 14 Apr 2008 07:37:14 +1000
> Benjamin Herrenschmidt <benh@...nel.crashing.org> wrote:
> 
> > 
> > You don't need a timer. You can just use the notifier mechanism I added
> > a while ago that should call you on device addition and removal on the
> > bus type you are interested in.
> > 
> 
> Another solution presented itself, but do you have some pointers on
> where I get more information about the notifiers in case I need them
> in the future?

In device.h:

/*
 * Bus notifiers: Get notified of addition/removal of devices
 * and binding/unbinding of drivers to devices.
 * In the long run, it should be a replacement for the platform
 * notify hooks.
 */
struct notifier_block;

extern int bus_register_notifier(struct bus_type *bus,
				 struct notifier_block *nb);
extern int bus_unregister_notifier(struct bus_type *bus,
				   struct notifier_block *nb);

/* All 4 notifers below get called with the target struct device *
 * as an argument. Note that those functions are likely to be called
 * with the device semaphore held in the core, so be careful.
 */
#define BUS_NOTIFY_ADD_DEVICE		0x00000001 /* device added */
#define BUS_NOTIFY_DEL_DEVICE		0x00000002 /* device removed */
#define BUS_NOTIFY_BOUND_DRIVER		0x00000003 /* driver bound to device */
#define BUS_NOTIFY_UNBIND_DRIVER	0x00000004 /* driver about to be
						      unbound */
Do you need more info ?

Cheers,
Ben.


--
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