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: <CAE9FiQVTng2Bi4z9YY9CustC7KkTr-6+qFaaqu8F4dd0WAKGig@mail.gmail.com>
Date:	Wed, 7 Mar 2012 16:53:02 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Bjorn Helgaas <bhelgaas@...gle.com>
Cc:	Jesse Barnes <jbarnes@...tuousgeek.org>, x86 <x86@...nel.org>,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	Randy Dunlap <rdunlap@...otime.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-doc@...r.kernel.org
Subject: Re: [PATCH 16/23] PCI: add pci bus removal through /sys/.../pci_bus/.../remove

On Wed, Mar 7, 2012 at 4:03 PM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
> On Tue, Mar 6, 2012 at 12:13 AM, Yinghai Lu <yinghai@...nel.org> wrote:
>> it supports both pci root bus and pci bus under pci bridge.
>>
>> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>> Cc: Randy Dunlap <rdunlap@...otime.net>
>> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>> Cc: linux-doc@...r.kernel.org
>> ---
>>  Documentation/ABI/testing/sysfs-bus-pci |    8 ++++++++
>>  drivers/pci/pci-sysfs.c                 |   28 ++++++++++++++++++++++++++++
>>  2 files changed, 36 insertions(+), 0 deletions(-)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
>> index 95f0f37..22392de 100644
>> --- a/Documentation/ABI/testing/sysfs-bus-pci
>> +++ b/Documentation/ABI/testing/sysfs-bus-pci
>> @@ -92,6 +92,14 @@ Description:
>>                hot-remove the PCI device and any of its children.
>>                Depends on CONFIG_HOTPLUG.
>>
>> +What:          /sys/bus/pci/devices/.../pci_bus/.../remove
>> +Date:          March 2012
>> +Contact:       Linux PCI developers <linux-pci@...r.kernel.org>
>> +Description:
>> +               Writing a non-zero value to this attribute will
>> +               hot-remove the PCI bus and any of its children.
>
> Is this the interface we want?  It seems like the ultimate goal is to
> remove the *host bridge*, i.e., the PNP0A08 device on x86.  If that's
> the case, the logical thing seems like a
> /sys/bus/acpi/devices/PNP0A08:00/remove file.
>
> All the current "remove" attributes are for *devices*, e.g.,
> /sys/devices/pci0000:00/0000:00:03.0/remove, not for *buses*.

could add that later.

I am thinking to add some non-intrusive way to make notification work
for root-bus hot removal/add.
...

also in some case, cpu buses get scan during booting, could use that
to remove those not needed
root buses.

>
> I'm not sure it makes sense to talk about removing a "bus" and leaving
> the upstream bridge (either a host bridge or a P2P bridge).  I think
> it'd make more sense to remove the bridge itself, which would of
> course have the consequence of removing the secondary bus.

for root bus, that remove pci_host_bridge and pci root bus.

for pci bus under pci bridge, will remove that pci bus, but will still
keep  that pci bridge.
that should be ok. just like some pci bridge is there, and later can
not create child bus for it.

there is one case: during test busn_alloc, i need to remove all device
on one bus, and
use setpci to change bridge bus number register. then use rescan
bridge to create new bus.

with this one, I just need to remove that bus, instead of remove
children devices one by one.

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