alistair23-linux/drivers/pci/hotplug
Steven Rostedt ac3abf2c37 PCI hotplug: ibmphp: Add check to prevent reading beyond mapped area
While testing various randconfigs with ktest.pl, I hit the following panic:

BUG: unable to handle kernel paging request at f7e54b03
IP: [<c0d63409>] ibmphp_access_ebda+0x101/0x19bb

Adding printks, I found that the loop that reads the ebda blocks
can move out of the mapped section.

ibmphp_access_ebda: start=f7e44c00 size=5120 end=f7e46000
ibmphp_access_ebda: io_mem=f7e44d80 offset=384
ibmphp_access_ebda: io_mem=f7e54b03 offset=65283

The start of the iomap was at f7e44c00 and had a size of 5120,
making the end f7e46000. We start with an offset of 0x180 or
384, giving the first read at 0xf7e44d80. Reading that location
yields 65283, which is much bigger than the 5120 that was allocated
and makes the next read at f7e54b03 which is outside the mapped area.

Perhaps this is a bug in the driver, or buggy hardware, but this patch
is more about not crashing my box on start up and just giving a warning
if it detects this error.

This patch at least lets my box boot with just a warning.

Cc: Chandru Siddalingappa <chandru@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-11-11 09:34:31 -08:00
..
acpi_pcihp.c PCI: PCIe: Ask BIOS for control of all native services at once 2010-08-24 13:47:33 -07:00
acpiphp.h
acpiphp_core.c
acpiphp_glue.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
acpiphp_ibm.c sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
cpci_hotplug.h
cpci_hotplug_core.c
cpci_hotplug_pci.c
cpcihp_generic.c PCI: hotplug/cpcihp, fix pci device refcounting 2010-02-22 16:17:02 -08:00
cpcihp_zt5550.c
cpcihp_zt5550.h
cpqphp.h
cpqphp_core.c PCI: hotplug/cpqphp, fix NULL dereference 2010-06-11 13:10:21 -07:00
cpqphp_ctrl.c
cpqphp_nvram.c
cpqphp_nvram.h
cpqphp_pci.c
cpqphp_sysfs.c drivers: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:04 +02:00
fakephp.c PCI: use for_each_pci_dev() 2010-07-30 09:47:22 -07:00
ibmphp.h
ibmphp_core.c
ibmphp_ebda.c PCI hotplug: ibmphp: Add check to prevent reading beyond mapped area 2010-11-11 09:34:31 -08:00
ibmphp_hpc.c PCI hotplug: ibmphp-hpc: semaphore cleanup 2010-10-15 13:09:48 -07:00
ibmphp_pci.c
ibmphp_res.c
Kconfig
Makefile
pci_hotplug_core.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pciehp.h pciehp: update workqueue usage 2010-10-18 08:31:02 +02:00
pciehp_acpi.c PCI: PCIe: Ask BIOS for control of all native services at once 2010-08-24 13:47:33 -07:00
pciehp_core.c pciehp: update workqueue usage 2010-10-18 08:31:02 +02:00
pciehp_ctrl.c pciehp: update workqueue usage 2010-10-18 08:31:02 +02:00
pciehp_hpc.c pciehp: update workqueue usage 2010-10-18 08:31:02 +02:00
pciehp_pci.c PCI hotplug: pciehp: Fixed return value sign for pciehp_unconfigure_device 2010-07-30 09:29:15 -07:00
pcihp_skeleton.c
pcihp_slot.c
rpadlpar.h
rpadlpar_core.c powerpc/pseries: Flush lazy kernel mappings after unplug operations 2010-04-28 16:23:24 +10:00
rpadlpar_sysfs.c
rpaphp.h
rpaphp_core.c powerpc/pseries: Flush lazy kernel mappings after unplug operations 2010-04-28 16:23:24 +10:00
rpaphp_pci.c
rpaphp_slot.c
sgi_hotplug.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
shpchp.h shpchp: update workqueue usage 2010-10-18 08:33:02 +02:00
shpchp_core.c shpchp: update workqueue usage 2010-10-18 08:33:02 +02:00
shpchp_ctrl.c shpchp: update workqueue usage 2010-10-18 08:33:02 +02:00
shpchp_hpc.c shpchp: update workqueue usage 2010-10-18 08:33:02 +02:00
shpchp_pci.c PCI hotplug: shpchp: Removed check for hotplug of display devices 2010-07-30 09:29:16 -07:00
shpchp_sysfs.c PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs 2010-02-23 09:43:31 -08:00