xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Daugherty <jtd@galois.com>
To: xen-devel@lists.xenproject.org
Cc: julien.grall@arm.com, sstabellini@kernel.org,
	Jonathan Daugherty <jtd@galois.com>
Subject: [PATCH 2/2] arm/traps: fix bug in dump_guest_s1_walk handling of level 2 page tables
Date: Tue, 19 Jul 2016 10:15:27 -0700	[thread overview]
Message-ID: <20160719171527.43829-2-jtd@galois.com> (raw)
In-Reply-To: <20160719171527.43829-1-jtd@galois.com>

dump_guest_s1_walk intends to walk to level 2 page table entries but
was failing to do so because of a check that caused level 2 page table
descriptors to be ignored. This change fixes the check so that level 2
page table walks occur as intended by ignoring descriptors unless their
low two bits match the expected sequence [0,1].

For more information, see the ARMv7-A ARM, section B3.5.

Signed-off-by: Jonathan Daugherty <jtd@galois.com>
---
 xen/arch/arm/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 0c10c4d..dfb1949 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -2350,7 +2350,7 @@ void dump_guest_s1_walk(struct domain *d, vaddr_t addr)
     printk("1ST[0x%"PRIx32"] (0x%"PRIpaddr") = 0x%08"PRIx32"\n",
            offset, pfn_to_paddr(mfn_x(mfn)), first[offset]);
     if ( !(first[offset] & 0x1) ||
-         !(first[offset] & 0x2) )
+          (first[offset] & 0x2) )
         goto done;
 
     mfn = p2m_lookup(d, _gfn(paddr_to_pfn(first[offset])), NULL);
-- 
2.9.2


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

  reply	other threads:[~2016-07-19 17:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 17:15 [PATCH 1/2] arm/traps: fix bug in dump_guest_s1_walk L1 page table offset computation Jonathan Daugherty
2016-07-19 17:15 ` Jonathan Daugherty [this message]
2016-07-20 12:25   ` [PATCH 2/2] arm/traps: fix bug in dump_guest_s1_walk handling of level 2 page tables Julien Grall
2016-07-20 12:23 ` [PATCH 1/2] arm/traps: fix bug in dump_guest_s1_walk L1 page table offset computation Julien Grall
2016-07-20 16:10 Jonathan Daugherty
2016-07-20 16:10 ` [PATCH 2/2] arm/traps: fix bug in dump_guest_s1_walk handling of level 2 page tables Jonathan Daugherty

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=20160719171527.43829-2-jtd@galois.com \
    --to=jtd@galois.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --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).