[PATCH v1 13/18] arm64: add PTE_WRITE to PROT_SECT_NORMAL

Catalin Marinas catalin.marinas at arm.com
Mon Mar 27 09:47:28 PDT 2023


On Thu, Mar 09, 2023 at 02:52:41PM +0000, Joey Gouly wrote:
> With PIE enabled, PROT_SECT_NORMAL would map onto PAGE_KERNEL_RO.
> Add PTE_WRITE so that this maps onto PAGE_KERNEL, so that it is writable.
> 
> Without PIE, this should enable DBM for PROT_SECT_NORMAL, which should be
> functionally equivalent.

It's worth mentioning that since PTE_RDONLY (a.k.a. PTE_NDIRTY with PIE)
is already cleared, we don't even rely on the DBM mechanism to make it
writable.

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



More information about the linux-arm-kernel mailing list