mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Arm: tighten translate_get_page()
Permitting writes when the P2M type says "read-only" can't be correct.
Fixes: 1661158723 ("xen/arm: Extend copy_to_guest to support copying from/to guest physical address")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
This commit is contained in:
1 parent
8ca1a1d5e6
commit
af6fc34e20
1 file changed
+1
-1
@@ -44,7 +44,7 @@ static struct page_info *translate_get_page(copy_info_t info, uint64_t addr,
|
||||
if ( !page )
|
||||
return NULL;
|
||||
|
||||
if ( !p2m_is_ram(p2mt) )
|
||||
if ( write ? p2mt != p2m_ram_rw : !p2m_is_ram(p2mt) )
|
||||
{
|
||||
put_page(page);
|
||||
return NULL;
|
||||
|
||||