public inbox for linux-rt-devel@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2 0/2] fix wrong usage of memory allocation APIs under PREEMPT_RT in arm64
@ 2025-12-17 18:20 Yeoreum Yun
  2025-12-17 18:20 ` [PATCH v2 1/2] arm64: mmu: don't allocate page while spliting linear mapping Yeoreum Yun
  2025-12-17 18:20 ` [PATCH v2 2/2] arm64: mmu: avoid allocating pages while installing ng-mapping for KPTI Yeoreum Yun
  0 siblings, 2 replies; 19+ messages in thread
From: Yeoreum Yun @ 2025-12-17 18:20 UTC (permalink / raw)
  To: catalin.marinas, will, ryan.roberts, akpm, david, kevin.brodsky,
	quic_zhenhuah, dev.jain, yang, chaitanyas.prakash, bigeasy,
	clrkwllms, rostedt, lorenzo.stoakes, ardb, jackmanb, vbabka
  Cc: linux-arm-kernel, linux-kernel, linux-rt-devel, Yeoreum Yun

Under PREEMPT_RT, calling generic memory allocation/free APIs
(e.x) __get_free_pages(), pgtable_alloc(), free_pages() and etc
with preemption disabled is not allowed, but allow only nolock() APIs series
because it may acquire a spin lock that becomes sleepable on RT,
potentially causing a sleep during page allocation
(See Documentation/core-api/real-time/differences.rst, Memory allocation section).

However, In arm64, __linear_map_split_to_ptes() and
__kpti_install_ng_mappings() called by stopper thread via stop_machine()
use generic memory allocation/free APIs.

This patchset fixes this problem and based on v6.19-rc1

Patch History
==============
from v1 to v2:
  - drop pagetable_alloc_nolock()
  - following @Ryan Roberts suggestion.
  - https://lore.kernel.org/all/20251212161832.2067134-1-yeoreum.yun@arm.com/


 arch/arm64/mm/mmu.c | 235 ++++++++++++++++++++++++++++++++++----------
 1 file changed, 183 insertions(+), 52 deletions(-)

--
LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2025-12-18 15:55 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-17 18:20 [PATCH v2 0/2] fix wrong usage of memory allocation APIs under PREEMPT_RT in arm64 Yeoreum Yun
2025-12-17 18:20 ` [PATCH v2 1/2] arm64: mmu: don't allocate page while spliting linear mapping Yeoreum Yun
2025-12-18  8:23   ` David Hildenbrand (Red Hat)
2025-12-18  9:08     ` Yeoreum Yun
2025-12-18 14:22   ` Ryan Roberts
2025-12-18 15:01     ` Yeoreum Yun
2025-12-18 15:42       ` Ryan Roberts
2025-12-18 15:54         ` Yeoreum Yun
2025-12-17 18:20 ` [PATCH v2 2/2] arm64: mmu: avoid allocating pages while installing ng-mapping for KPTI Yeoreum Yun
2025-12-17 19:03   ` Ryan Roberts
2025-12-17 19:09     ` Yeoreum Yun
2025-12-18  8:34       ` Ryan Roberts
2025-12-18  8:37         ` Yeoreum Yun
2025-12-18  8:46           ` David Hildenbrand (Red Hat)
2025-12-18  9:31             ` Yeoreum Yun
2025-12-18  9:41               ` David Hildenbrand (Red Hat)
2025-12-18 10:07                 ` Yeoreum Yun
2025-12-18  7:51     ` Vlastimil Babka
2025-12-18  8:32       ` Ryan Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox