[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 09/19] xen/arm32: mm: Check if the virtual address is shared before updating it



Hi,

On 21/02/2022 10:22, Julien Grall wrote:
From: Julien Grall <jgrall@xxxxxxxxxx>

Only the first 2GB of the virtual address space is shared between all
the page-tables on Arm32.

There is a long outstanding TODO in xen_pt_update() stating that the
function can only work with shared mapping. Nobody has ever called
the function with private mapping, however as we add more callers
there is a risk to mess things up.

Introduce a new define to mark the end of the shared mappings and use
it in xen_pt_update() to verify if the address is correct.

Note that on Arm64, all the mappings are shared. Some compiler may
complain about an always true check, so the new define is not introduced
for arm64 and the code is protected with an #ifdef.

Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>

---
     Changes in v2:
         - New patch
---
  xen/arch/arm/include/asm/config.h |  4 ++++
  xen/arch/arm/mm.c                 | 11 +++++++++--

While I working on removing the identity mapping, I realized this patch is actually getting in my way for arm32. I am planning to have multiple region that are shared, but still a single unshared region (the domheap mapping area).

So I will rework the patch to check is the address is part of the unshared region.

I will drop the patch from the series and move it to the next one.

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.