Skip to content

Commit

Permalink
xen/pt: Fixup addr validation in xen_pt_pci_config_access_check
Browse files Browse the repository at this point in the history
xen_pt_pci_config_access_check checks if addr >= 0xFF. 0xFF is a valid
address and should not be ignored.

Signed-off-by: Anoob Soman <anoob.soman@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
  • Loading branch information
anoobs authored and sstabellini committed Jul 7, 2017
1 parent 6c80865 commit 4daf625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/xen/xen_pt.c
Expand Up @@ -85,7 +85,7 @@ void xen_pt_log(const PCIDevice *d, const char *f, ...)
static int xen_pt_pci_config_access_check(PCIDevice *d, uint32_t addr, int len)
{
/* check offset range */
if (addr >= 0xFF) {
if (addr > 0xFF) {
XEN_PT_ERR(d, "Failed to access register with offset exceeding 0xFF. "
"(addr: 0x%02x, len: %d)\n", addr, len);
return -1;
Expand Down

0 comments on commit 4daf625

Please sign in to comment.