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, 17 Feb 2009 15:17:18 -0800
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>
Cc:	Jesse Barnes <jbarnes@...tuousgeek.org>, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pciehp:  Handle interrupts that happen during initialization.

Kenji Kaneshige <kaneshige.kenji@...fujitsu.com> writes:

> Eric W. Biederman wrote:
>> ebiederm@...ssion.com (Eric W. Biederman) writes:
>> 
>>> And on the big gotcha's I have found one more I am tracking.
>>>
>>> I am seeing pci bridges with a NULL pointer for the subordinate bus.
>>> Earlier I had thought that this was a symptom of the double remove
>>> but I have been able to reproduce it without that.
>>>
>>> On just a little bit deeper investigation it looks like the cases
>>> are dying are all coming when the nested bridge reappears.
>>>
>>> Which is wrong on so many levels as I am toggle power to the outer
>>> slot, so the nested bridge should not even exist at that time.  Ugh.
>>> More tracing to for me on that one.
>> 
>> Ok. Got it.  I was processing the interrupt for a device after it had
>> been hot removed but before the device state had disappeared.
>> 
>> pcie_isr looks like it would be even worse in that situation.  Looping forever
>> if pciehp_readw(ctrl, PCIE_EXPSLTA) always succeed sand returns 0xffff.
>> 
>> That loop in there appears impossibly misguided.  If the pending interrupt
>> values change after you have received the interrupt another instance
>> of the same interrupt should be pending so the loop should be completely
>> unnecessary.
>> 
>
> For level-triggered interrupt, I think it's true.
>
> But for edge-triggered interrupt, I don't think it's true. I think
> only one interrupt is generated if the first hotplug event occurs
> and the second hotplug event occurs before clearing the status of
> first hotplug event.

My test case is edge-triggered MSI's.  The issue is that I get an interrupt
from the card that I am unplugging, but by the time the interrupt handler
is executed the card is physically absent, but the pci_dev structure is
still present in the kernel.

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