
patchbot at xen
Jun 29, 2012, 9:22 AM
Post #1 of 1
(28 views)
Permalink
|
|
[qemu-xen-unstable] passthrough: fix off-by-one in PCI config space register index check
|
|
commit fa2e8e3bc869c04d4a4d9b8f70c1cab7e53778d6 Author: Jan Beulich <jbeulich [at] suse> Date: Fri Jun 29 17:06:25 2012 +0100 passthrough: fix off-by-one in PCI config space register index check Register 255 (0xff) is still valid to be accessed. Reported-by: Rolu <rolu [at] roce> Signed-off-by: Jan Beulich <jbeulich [at] suse> Acked-by: Ian Jackson <ian.jackson [at] eu> --- hw/pass-through.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pass-through.c b/hw/pass-through.c index 8581253..6e396e3 100644 --- a/hw/pass-through.c +++ b/hw/pass-through.c @@ -1538,7 +1538,7 @@ static void pt_pci_write_config(PCIDevice *d, uint32_t address, uint32_t val, #endif /* check offset range */ - if (address >= 0xFF) + if (address > 0xFF) { PT_LOG_DEV(d, "Error: Failed to write register with offset exceeding FFh. " "[Offset:%02xh][Length:%d]\n", address, len); @@ -1714,7 +1714,7 @@ static uint32_t pt_pci_read_config(PCIDevice *d, uint32_t address, int len) int ret = 0; /* check offset range */ - if (address >= 0xFF) + if (address > 0xFF) { PT_LOG_DEV(d, "Error: Failed to read register with offset exceeding FFh. " "[Offset:%02xh][Length:%d]\n", address, len); -- generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git _______________________________________________ Xen-changelog mailing list Xen-changelog [at] lists http://lists.xensource.com/xen-changelog
|