[PATCH v2 0/3] Don't sleep in split_kernel_leaf_mapping() when in atomic context

Ryan Roberts posted 3 patches 1 month, 1 week ago
arch/arm64/include/asm/kfence.h |   3 +-
arch/arm64/mm/mmu.c             | 111 +++++++++++++++++++++++---------
2 files changed, 81 insertions(+), 33 deletions(-)
[PATCH v2 0/3] Don't sleep in split_kernel_leaf_mapping() when in atomic context
Posted by Ryan Roberts 1 month, 1 week ago
Hi Will,

This is v2 of the fix for split_kernel_leaf_mapping(). I've expanded it into 3
patches based on feedback from v1 [1].

Once happy with the content, patch 1 is needed urgently for next -rc to fix
regression since 6.18-rc1. The other patches could wait until 6.19, but I'd
prefer they all go together into 6.18.

Changes since v1 [1]
====================

Patch 1: The fix
  - Removed arch_kfence_init_pool() declaration for !KFENCE case (per Will)
  - Removed lazy mode mmu optimization (now separate patch) (per Will)
  - Simplified arch_kfence_init_pool() return expression (per Will)
  - Added comment about not needing tlbi
  - Generalized comment softirq -> atomic (per Yang Shi)
Patch 2: lazy mode mmu optimization (per Will)
Patch 3: force_pte_mapping() tidy ups (per David)

[1] https://lore.kernel.org/linux-arm-kernel/20251103125738.3073566-1-ryan.roberts@arm.com/

Thanks,
Ryan


Ryan Roberts (3):
  arm64: mm: Don't sleep in split_kernel_leaf_mapping() when in atomic
    context
  arm64: mm: Optimize range_split_to_ptes()
  arm64: mm: Tidy up force_pte_mapping()

 arch/arm64/include/asm/kfence.h |   3 +-
 arch/arm64/mm/mmu.c             | 111 +++++++++++++++++++++++---------
 2 files changed, 81 insertions(+), 33 deletions(-)

--
2.43.0
Re: [PATCH v2 0/3] Don't sleep in split_kernel_leaf_mapping() when in atomic context
Posted by Will Deacon 1 month, 1 week ago
On Thu, 06 Nov 2025 16:09:40 +0000, Ryan Roberts wrote:
> This is v2 of the fix for split_kernel_leaf_mapping(). I've expanded it into 3
> patches based on feedback from v1 [1].
> 
> Once happy with the content, patch 1 is needed urgently for next -rc to fix
> regression since 6.18-rc1. The other patches could wait until 6.19, but I'd
> prefer they all go together into 6.18.
> 
> [...]

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

[1/3] arm64: mm: Don't sleep in split_kernel_leaf_mapping() when in atomic context
      https://git.kernel.org/arm64/c/ce2b3a50ad92
[2/3] arm64: mm: Optimize range_split_to_ptes()
      https://git.kernel.org/arm64/c/40a292f70147
[3/3] arm64: mm: Tidy up force_pte_mapping()
      https://git.kernel.org/arm64/c/53357f14f924

Cheers,
-- 
Will

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