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

Re: [Xen-devel] [PATCH v3 09/17] livepatch/arm[32, 64]: Modify livepatch_funcs



Hi Konrad,

On 19/09/17 01:35, Konrad Rzeszutek Wilk wrote:
On Thu, Sep 14, 2017 at 02:20:42PM +0100, Julien Grall wrote:
Hi Konrad,

On 12/09/17 01:37, Konrad Rzeszutek Wilk wrote:
This was found when porting livepatch-build-tools to ARM64/32.

When livepatch-build-tools are built (and test-case thanks to:
livepatch/tests: Make sure all .livepatch.funcs sections are read-only)
the .livepatch.funcs are in read-only section.

However the hypervisor uses the 'opaque' for its own purpose, that
is stashing the original code. But the .livepatch_funcs section is
in the RO vmap area so on ARM[32,64] we get a fault.

This is because the payload is secure at loading and therefore before it get
applied, right?

Yes.

I was wondering if we could either defer the call to secure_payload or make
the region temporarily writeable?

This patch creates a temporary writeable virtual address space.

But the idea of making the region temporarily writeable is also possible.
Is there a specific register I can use for this?

There is no specific register. I was suggest to call modify_xen_mappings on the region with (RW) and then you are done switch back to RO/RX.

I can't see any implication on Arm to temporary switch a mapping from
read-only to read-write. I am not sure for x86.

Cheers,

--
Julien Grall

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

 


Rackspace

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