[PATCH v1] arm64: mm: Permit PTE SW bits to change in live mappings

Will Deacon will at kernel.org
Wed Jun 19 08:13:36 PDT 2024


On Wed, 19 Jun 2024 13:18:56 +0100, Ryan Roberts wrote:
> Previously pgattr_change_is_safe() was overly-strict and complained
> (e.g. "[  116.262743] __check_safe_pte_update: unsafe attribute change:
> 0x0560000043768fc3 -> 0x0160000043768fc3") if it saw any SW bits change
> in a live PTE. There is no such restriction on SW bits in the Arm ARM.
> 
> Until now, no SW bits have been updated in live mappings via the
> set_ptes() route. PTE_DIRTY would be updated live, but this is handled
> by ptep_set_access_flags() which does not call pgattr_change_is_safe().
> However, with the introduction of uffd-wp for arm64, there is core-mm
> code that does ptep_get(); pte_clear_uffd_wp(); set_ptes(); which
> triggers this false warning.
> 
> [...]

This looks good to me, so I've picked it up. However, I see that Peter
just replied with some comments, so I'll keep an eye on that discussion
in case we need to respin.

But, for now:

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

[1/1] arm64: mm: Permit PTE SW bits to change in live mappings
      https://git.kernel.org/arm64/c/895a37028a48

Cheers,
-- 
Will

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



More information about the linux-arm-kernel mailing list