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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 17 Feb 2017 15:36:48 -0800 From: Yinghai Lu <yinghai@...nel.org> To: Bjorn Helgaas <helgaas@...nel.org> Cc: Bjorn Helgaas <bhelgaas@...gle.com>, Mika Westerberg <mika.westerberg@...ux.intel.com>, Keith Busch <keith.busch@...el.com>, Mayurkumar Patel <mayurkumar.patel@...el.com>, Ashok Raj <ashok.raj@...el.com>, "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] PCI,pciehp: Don't handle PDC for cards with attention button On Fri, Feb 17, 2017 at 2:39 PM, Bjorn Helgaas <helgaas@...nel.org> wrote: > On Thu, Feb 16, 2017 at 10:12:47PM -0800, Yinghai Lu wrote: > > I don't think it really makes sense to tie PDC handling with the > attention button. It might happen to avoid the problem on your > system, but I don't see the logical connection between them. but in pcie_enable_notification() we don't enable PDCE when ATTN is not there. cmd = PCI_EXP_SLTCTL_DLLSCE; if (ATTN_BUTTN(ctrl)) cmd |= PCI_EXP_SLTCTL_ABPE; else cmd |= PCI_EXP_SLTCTL_PDCE; if (!pciehp_poll_mode) cmd |= PCI_EXP_SLTCTL_HPIE | PCI_EXP_SLTCTL_CCIE; mask = (PCI_EXP_SLTCTL_PDCE | PCI_EXP_SLTCTL_ABPE | PCI_EXP_SLTCTL_PFDE | PCI_EXP_SLTCTL_HPIE | PCI_EXP_SLTCTL_CCIE | PCI_EXP_SLTCTL_DLLSCE); pcie_write_cmd_nowait(ctrl, cmd, mask); should we remove that check there ? > > Can you reproduce this by disabling pciehp and driving this sequence > manually with setpci? I suspect that we are tripping over our own > feet because we read PCI_EXP_SLTSTA once, clear it (probably too > early), then queue multiple events, then process those events possibly > simultaneously. sca15-2243-0a818158:~ # echo 1 > /sys/bus/pci/devices/0000\:3b\:00.0/remove [ 171.769322] pci 0000:3b:00.0: PME# disabled [ 171.774459] iommu: Removing device 0000:3b:00.0 from group 36 [ 171.780984] pci 0000:3b:00.0: freeing pci_dev info sca15-2243-0a818158:~ # setpci -s 0000:3a:00.0 0xa8.w 01cb sca15-2243-0a818158:~ # setpci -s 0000:3a:00.0 0xaa.w 0050 sca15-2243-0a818158:~ # setpci -s 0000:3a:00.0 0xa8.w=0x05cb sca15-2243-0a818158:~ # setpci -s 0000:3a:00.0 0xaa.w 0158 so after power off, status bit 3 the PDC get set.
Powered by blists - more mailing lists