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:	Tue, 12 Jan 2010 23:52:38 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>
CC:	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ivan Kokshaysky <ink@...assic.park.msu.ru>,
	Alex Chiang <achiang@...com>,
	Bjorn Helgaas <bjorn.helgaas@...com>,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH 09/14] pci: introduce pci_assign_unassigned_bridge_resources

On 01/12/2010 11:31 PM, Kenji Kaneshige wrote:
> Yinghai Lu wrote:
>> On 01/12/2010 04:50 PM, Kenji Kaneshige wrote:
>>> Yinghai Lu wrote:
>>>> for pciehp to use it later
>>>>
>>>> pci_setup_bridge() will not check enabled for the slot bridge,
>>>> otherwise
>>>> update res is not updated to bridge BAR. that is bridge is enabled
>>>> already for
>>>> port service.
>>>>
>>>> -v2: update it with resource_list_x
>>>>
>>>> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>> ...
>>
>>>> +
>>>> +void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge)
>>>> +{
>>>> +    struct pci_bus *bus;
>>>> +    struct pci_bus *parent = bridge->subordinate;
>>>> +    int retval;
>>>> +
>>>> +    pci_bus_size_bridges(parent);
>>>> +    pci_clear_master(bridge);
>>> I have a concern about clearing bus master enable bit here, though
>>> I'm not sure about it. I'm wondering if clearing bus master enable
>>> bit might have some bad effect for the port services to work. For
>>> example, does MSI interrupt work without enabling bus mastering?
>> but we set that pci_set_master right away after we assign the new
>> resource
> 
> Yes, I know you set bus master enable bit again.
> 
> In my understanding, bus master enable bit of the bridge is
> cleared temporary while its port service driver is working.
> I'm worrying about this temporary operation. For example,
> I'm worrying about whether the MSI interrupt works, if some
> port service generates interrupts when bus master enable bit
> is cleared temporary.
> 

ok, will remove clear and set for busmaster, in following patch.

[PATCH] pci: don't clear and set busmaster when assign unsigned bridge for pciehp.

Kenji pointed out that could have some pcie port service send out msi
at that point.

So don't clear the bus master.

Signed-off-by: Yinghai Lu <yinghai@...nel.org>

---
 drivers/pci/setup-bus.c |    2 --
 1 file changed, 2 deletions(-)

Index: linux-2.6/drivers/pci/setup-bus.c
===================================================================
--- linux-2.6.orig/drivers/pci/setup-bus.c
+++ linux-2.6/drivers/pci/setup-bus.c
@@ -1062,10 +1062,8 @@ void pci_assign_unassigned_bridge_resour
 
 again:
 	pci_bus_size_bridges(parent);
-	pci_clear_master(bridge);
 	__pci_bridge_assign_resources(bridge, &head);
 	retval = pci_reenable_device(bridge);
-	pci_set_master(bridge);
 	pci_enable_bridges(parent);
 
 	/* any device complain? */
--
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