On 05/01/2026 12:35, Harry Ramsey wrote:
> From: Luca Fancellu <[email protected]>
> 
> During `init_done`, Xen sets the permissions of all symbols marked with
> __ro_after_init to be read-only. This does not work on MPU systems at
> present because part-region modification is not supported.
> 
> Therefore introduce the function `modify_after_init_mappings` for MMU
> and MPU, to handle the divergent approaches to setting permissions of
> __ro_after_init symbols.
> 
> For MPU systems `modify_xen_mappings` will shrink the RW mapping on one
> side and extend the RO mapping on the other. This approach prevents
> wasting an additional region between RW and RO mappings.
> 
> As the new function is marked with __init, it needs to be called before
> `free_init_memory`.
> 
> Signed-off-by: Luca Fancellu <[email protected]>
> Signed-off-by: Hari Limaye <[email protected]>
> Signed-off-by: Harry Ramsey <[email protected]>
Reviewed-by: Michal Orzel <[email protected]>

~Michal


Reply via email to