xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: peter.maydell@linaro.org, stefanha@gmail.com
Cc: sstabellini@kernel.org, qemu-devel@nongnu.org,
	stefanha@redhat.com, Anoob Soman <anoob.soman@citrix.com>,
	anthony.perard@citrix.com, xen-devel@lists.xenproject.org
Subject: [PULL 3/3] xen/pt: Fixup addr validation in xen_pt_pci_config_access_check
Date: Fri,  7 Jul 2017 11:30:04 -0700	[thread overview]
Message-ID: <1499452204-20769-3-git-send-email-sstabellini@kernel.org> (raw)
In-Reply-To: <1499452204-20769-1-git-send-email-sstabellini@kernel.org>

From: Anoob Soman <anoob.soman@citrix.com>

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>
---
 hw/xen/xen_pt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index b6d71bb..375efa6 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -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;
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-07-07 18:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07 18:29 [PULL 0/3] please pull xen-20170707-tag Stefano Stabellini
2017-07-07 18:30 ` [PULL 1/3] xenfb: remove xen_init_display "temporary" hack Stefano Stabellini
2017-07-07 18:30   ` [PULL 2/3] xen-platform: Cleanup network infrastructure when emulated NICs are unplugged Stefano Stabellini
2017-07-07 18:30   ` Stefano Stabellini [this message]
2017-07-10 11:11 ` [PULL 0/3] please pull xen-20170707-tag Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1499452204-20769-3-git-send-email-sstabellini@kernel.org \
    --to=sstabellini@kernel.org \
    --cc=anoob.soman@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).