[PATCH v2] arm64: pageattr: Explicitly bail out when changing permissions for vmalloc_huge mappings

Will Deacon will at kernel.org
Tue Apr 29 13:27:45 PDT 2025


On Thu, 03 Apr 2025 10:58:44 +0530, Dev Jain wrote:
> arm64 uses apply_to_page_range to change permissions for kernel vmalloc mappings,
> which does not support changing permissions for block mappings. This function
> will change permissions until it encounters a block mapping, and will bail
> out with a warning. Since there are no reports of this triggering, it
> implies that there are currently no cases of code doing a vmalloc_huge()
> followed by partial permission change. But this is a footgun waiting to
> go off, so let's detect it early and avoid the possibility of permissions
> in an intermediate state. So,  explicitly disallow changing permissions
> for VM_ALLOW_HUGE_VMAP mappings.
> 
> [...]

Applied to arm64 (for-next/mm), thanks!

[1/1] arm64: pageattr: Explicitly bail out when changing permissions for vmalloc_huge mappings
      https://git.kernel.org/arm64/c/fcf8dda8cc48

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev



More information about the linux-arm-kernel mailing list