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:
Jan Beulich committed 2026-02-18 10:17:39 +01:00
1 parent 8ca1a1d5e6
commit af6fc34e20
1 file changed
+1 -1
+1 -1
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.