linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] uprobes: transition from kmap_atomic to kmap_local_page
@ 2026-01-03  8:42 Keke Ming
  2026-01-03  8:42 ` [PATCH 1/5] riscv/uprobes: use kmap_local_page() in arch_uprobe_copy_ixol() Keke Ming
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Keke Ming @ 2026-01-03  8:42 UTC (permalink / raw)
  To: mhiramat, oleg, peterz
  Cc: linux, catalin.marinas, will, tsbogend, pjw, palmer, aou, akpm,
	linux-kernel, linux-trace-kernel, linux-mm, linux-arm-kernel,
	linux-mips, linux-riscv, Keke Ming

The use of kmap_atomic/kunmap_atomic is deprecated. The purpose of
kmap-like functions is to create temporary mappings.

kmap_atomic() typically disables preemption, while kmap_local_page()
allows preemption.

According to the documentation, kmap_atomic() is primarily necessary
for contexts that cannot sleep.

> kmap_atomic() may also be used by interrupt contexts, since it does
> not sleep and the callers too may not sleep until after
> kunmap_atomic() is called.

> kunmap_atomic() may implicitly depend on the side effects of atomic
> mappings, i.e. disabling page faults or preemption, or both. In that
> case, explicit calls to pagefault_disable() or preempt_disable() or
> both must be made in conjunction with the use of kmap_local_page().

Link: https://docs.kernel.org/mm/highmem.html#temporary-virtual-mappings
Link: https://lwn.net/Articles/836144/

Keke Ming (5):
  riscv/uprobes: use kmap_local_page() in arch_uprobe_copy_ixol()
  arm64/uprobes: use kmap_local_page() in arch_uprobe_copy_ixol()
  mips/uprobes: use kmap_local_page() in arch_uprobe_copy_ixol()
  arm/uprobes: use kmap_local_page() in arch_uprobe_copy_ixol()
  uprobes: use kmap_local_page() for temporary page mappings

 arch/arm/probes/uprobes/core.c     |  4 ++--
 arch/arm64/kernel/probes/uprobes.c |  4 ++--
 arch/mips/kernel/uprobes.c         |  4 ++--
 arch/riscv/kernel/probes/uprobes.c |  4 ++--
 kernel/events/uprobes.c            | 12 ++++++------
 5 files changed, 14 insertions(+), 14 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2026-01-06 15:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-03  8:42 [PATCH 0/5] uprobes: transition from kmap_atomic to kmap_local_page Keke Ming
2026-01-03  8:42 ` [PATCH 1/5] riscv/uprobes: use kmap_local_page() in arch_uprobe_copy_ixol() Keke Ming
2026-01-03  8:42 ` [PATCH 2/5] arm64/uprobes: " Keke Ming
2026-01-03  8:42 ` [PATCH 3/5] mips/uprobes: " Keke Ming
2026-01-03  8:42 ` [PATCH 4/5] arm/uprobes: " Keke Ming
2026-01-03  8:42 ` [PATCH 5/5] uprobes: use kmap_local_page() for temporary page mappings Keke Ming
2026-01-03 10:56 ` [PATCH 0/5] uprobes: transition from kmap_atomic to kmap_local_page Oleg Nesterov
2026-01-06 15:25   ` Peter Zijlstra

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