Hi Julien,

> On Oct 14, 2023, at 01:26, Julien Grall <[email protected]> wrote:
> 
> Hi Henry,
> 
> On 09/10/2023 02:03, Henry Wang wrote:
>> Currently mmu_init_secondary_cpu() only enforces the page table
>> should not contain mapping that are both Writable and eXecutables
>> after boot. To ease the arch/arm/mm.c split work, fold this function
>> to head.S.
>> Introduce assembly macro pt_enforce_wxn for both arm32 and arm64.
>> For arm64, the macro is called at the end of enable_secondary_cpu_mm().
>> For arm32, the macro is called before secondary CPUs jumping into
>> the C world.
>> Signed-off-by: Henry Wang <[email protected]>
>> ---
>> v7:
>> - No change.
> 
> Given the discusion on v6, I was expecting some changes here at least on 
> arm64 side.

Oh I am so sorry, I completely misunderstood the “leave the code as is”
discussion and now I revisit that discussion and noticed that you did say the
“leave the code as is” is for arm32 only ^^'

I will fix the arm64 side in v8 following [1]. 

> 
> For arm32, my proposal would not yet work because sadly the temporary 
> page-tables for secondary bring-up will contain writable and executable 
> mappings.

[1] 
https://lore.kernel.org/xen-devel/[email protected]/

Kind regards,
Henry

Reply via email to