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]
Date:	Thu, 06 Sep 2012 17:52:42 -0600
From:	Toshi Kani <toshi.kani@...com>
To:	Bjorn Helgaas <bhelgaas@...gle.com>
Cc:	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	lenb@...nel.org, liuj97@...il.com, isimatu.yasuaki@...fujitsu.com
Subject: Re: [RFC PATCH 1/5] ACPI: Add acpi_lookup_driver() function

(snip)
 :
> > > +
> > > +       /* set HID to this device object */
> > > +       acpi_device_set_id(device);
> > > +
> > > +       /* lookup a matching driver */
> > > +       (void) bus_for_each_drv(device->dev.bus, NULL,
> > > +                                       device, acpi_match_driver);
> > > +       driver = device->driver;
> > 
> > This path is used when we receive a Notify to a device and a matching
> > driver has been registered, but the driver is not bound to the device.
> >  For example, it may be a newly-added device where we haven't bound a
> > driver to it yet.
> > 
> > Is there anything that prevents us from unloading the driver between
> > here (the point where we capture the "struct acpi_driver *") and the
> > point where we call "driver->ops.sys_notify"?
> 
> Hi Bjorn,
> 
> That's a very good question.  I will look into how we protect a driver
> from unloading when we try to attach & probe a driver in the
> acpi_add_single_object() path, and see if we can use a similar way to
> protect it here as well.

I have protected this path in version 2, which I just sent out.  It
calls .sys_notify() directly from bus_for_each_drv(), which protects the
driver entry by increasing its reference count while the callback
function is being called.

Thanks,
-Toshi
 



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