[PATCH v3 11/20] arm64: add PTE_UXN/PTE_WRITE to SWAPPER_*_FLAGS

Catalin Marinas catalin.marinas at arm.com
Fri May 26 02:33:50 PDT 2023


On Thu, May 11, 2023 at 12:03:28PM +0100, Joey Gouly wrote:
> With PIE enabled, the swapper PTEs would have a Permission Indirection Index
> (PIIndex) of 0. A PIIndex of 0 is not currently used by any other PTEs.
> 
> To avoid using index 0 specifically for the swapper PTEs, mark them as
> PTE_UXN and PTE_WRITE, so that they map to a PAGE_KERNEL_EXEC equivalent.
> 
> This also adds PTE_WRITE to KPTI_NG_PTE_FLAGS, which was tested by booting
> with kpti=on.
> 
> Signed-off-by: Joey Gouly <joey.gouly at arm.com>
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will at kernel.org>
> Cc: Mark Rutland <mark.rutland at arm.com>

It looks fine now.

Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>



More information about the linux-arm-kernel mailing list