From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Subject: [PATCH] Arm: relax iomem_access_permitted() check
Date: Wed, 18 Aug 2021 09:52:51 +0200 [thread overview]
Message-ID: <a26e91df-7c49-5903-6228-821d92c4902c@suse.com> (raw)
Ranges checked by iomem_access_permitted() are inclusive; to permit a
mapping there's no need for access to also have been granted for the
subsequent page.
Fixes: 80f9c3167084 ("xen/arm: acpi: Map MMIO on fault in stage-2 page table for the hardware domain")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -1893,7 +1893,7 @@ static bool try_map_mmio(gfn_t gfn)
return false;
/* The hardware domain can only map permitted MMIO regions */
- if ( !iomem_access_permitted(d, mfn_x(mfn), mfn_x(mfn) + 1) )
+ if ( !iomem_access_permitted(d, mfn_x(mfn), mfn_x(mfn)) )
return false;
return !map_regions_p2mt(d, gfn, 1, mfn, p2m_mmio_direct_c);
next reply other threads:[~2021-08-18 7:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 7:52 Jan Beulich [this message]
2021-08-18 17:44 ` [PATCH] Arm: relax iomem_access_permitted() check Julien Grall
2021-08-19 8:11 ` Jan Beulich
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=a26e91df-7c49-5903-6228-821d92c4902c@suse.com \
--to=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=sstabellini@kernel.org \
--cc=volodymyr_babchuk@epam.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.