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: <498045D1.60005@jp.fujitsu.com>
Date:	Wed, 28 Jan 2009 20:47:29 +0900
From:	Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>
To:	linux-pci@...r.kernel.org, "Barnes, Jesse" <jesse.barnes@...el.com>
CC:	James Bottomley <James.Bottomley@...senPartnership.com>,
	Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>,
	shaohua.li@...el.com, Grant Grundler <grundler@...isc-linux.org>
Subject: Re: ACPI hotplug panic with current git head

Kenji Kaneshige wrote:
> James Bottomley wrote:
>> On Mon, 2009-01-19 at 12:11 +0900, Kenji Kaneshige wrote:
>>> I'm sending the debug patch against 2.6.29-rc1 below. I'm also
>>> sending it as an attachment. It also contains the code to prevent
>>> the kernel panic from you. Please note that you will see two
>>> WARN_ON(1) messages with the patch. Those are shown by my debug
>>> patch.
>>>
>>> Could you try it and send me the whole dmsg output?
>> Actually, the machine is now running -rc2, so the patch doesn't quite
>> apply: 
>>
>> jejb@...rkweed> patch -p1 < ~/tmp.diff
>> patching file include/linux/pci-acpi.h
>> patching file drivers/pci/hotplug/acpiphp_glue.c
>> Hunk #1 FAILED at 266.
>> Hunk #2 succeeded at 467 (offset 2 lines).
>> Hunk #3 succeeded at 489 (offset 2 lines).
>> Hunk #4 succeeded at 518 (offset 2 lines).
>> Hunk #5 succeeded at 556 (offset 2 lines).
>>
>> Looks like the rejection is in the NULL check piece, so I've already
>> actually sent you the information it would produce.
>>
>> The dmesg output is pretty big, below.
>>
> 
> Thank you very much, James.
> 
> Thanks to you, I found the root cause of the
> problem. The acpi_pci_get_bridge_handle() function assumes
> pci_bus->self is NULL on the root bus. But it is not true
> and pci_bus->self can have a non-NULL value on some
> platfroms (like yours). So it must check pci_bus->parent
> instead.
> 
> I found some other code that has the same wrong assumption.
> I'll make a fix for them and send it soon.
> 

I made several patches to fix the wrong assumption described
above. It is very difficult for me to check all the code that
refers pci_bus->self. So I checked include/linux/pci-acpi.h and
the code under drivers/pci/ only. And I made patches for the code
like below:

 - The code that clearly chooses host bridge operation or
   PCI-to-PCI bridge operation based on pci_bus->self.

 - The code that might cause endless loop if pci_bus->self is
   not NULL on the PCI root bus.

The patches are

 - [PATCH 1/8] PCI/ACPI: fix wrong assumption in acpi_pci_get_bridge_handle
 - [PATCH 2/8] PCI/ACPI: fix wrong assumption in acpi_find_root_bridge_handle
 - [PATCH 3/8] PCI hotplug: fix wrong assumption in acpi_get_hp_params_from_firmware
 - [PATCH 4/8] PCI hotplug: fix wrong assumption in acpi_get_hp_hw_control_from_firmware
 - [PATCH 5/8] PCI: fix wrong assumption in pci_find_upstream_pcie_bridge
 - [PATCH 6/8] PCI: fix wrong assumption in pci_read_bridge_bases
 - [PATCH 7/8] PCI: fix wrong assumption in pci_get_interrupt_pin
 - [PATCH 8/8] PCI: fix wrong assumption in pci_common_swizzle

Thanks,
Kenji Kaneshige


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