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]
Date:   Thu, 23 Mar 2017 02:06:44 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Joerg Roedel <joro@...tes.org>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Joerg Roedel <jroedel@...e.de>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] ACPI: Don't create a platform_device for IOAPIC/IOxAPIC

On Thu, Mar 23, 2017 at 12:58 AM, Joerg Roedel <joro@...tes.org> wrote:
> On Thu, Mar 23, 2017 at 12:44:18AM +0100, Rafael J. Wysocki wrote:
>> On Thu, Mar 23, 2017 at 12:41 AM, Rafael J. Wysocki <rafael@...nel.org> wrote:
>> >
>> > It is not dead.
>> >
>> > Platform devices are actually created by it, but they never go away.
>>
>> IOW, they should never be created for anything hot-removable.
>>
>> If they are, this is a bug (as you noticed).
>
> Okay, in this case patch 2 can be omitted.
>
> But for my understanding, platform_devices created in acpi_bus_attach()
> that are not hot-removable don't take a reference to the host_bridge,
> right (at least when the host-bridge is hot-removable)?

They shouldn't.

> Otherwise this would be a leak again in case the host-bridge gets
> removed.

Right.

The main problem is that representing anything hot-removable as a
platform device is inherently fragile, as the platform bus type has no
idea whatever about things that may physically go away and platform
drivers don't expect that devices may vanish from under them in
general and so on.  Unregistration alone doesn't help much with that,
so IMO at least for now it's better to avoid using platform_device for
hot-removable stuff.

Thanks,
Rafael

Powered by blists - more mailing lists