Skip to content

uprobes: transition from kmap_atomic to kmap_local_page

Keke Ming linux-arm-kernel linux-mips linux-mm linux-riscv linux-trace-kernel lkml 1 version Applied

Status from this message: The following commit has been merged into the perf/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesApplied 5/5

Patches in v1 All 5 applied

#Subject and filesSizeRepliesApplied
1/5riscv/uprobes: use kmap_local_page() in arch_uprobe_copy_ixol()arch/riscv/kernel/probes/uprobes.c+2 -20 repliesApplied
2/5arm64/uprobes: use kmap_local_page() in arch_uprobe_copy_ixol()arch/arm64/kernel/probes/uprobes.c+2 -20 repliesApplied
3/5mips/uprobes: use kmap_local_page() in arch_uprobe_copy_ixol()arch/mips/kernel/uprobes.c+2 -20 repliesApplied
4/5arm/uprobes: use kmap_local_page() in arch_uprobe_copy_ixol()arch/arm/probes/uprobes/core.c+2 -20 repliesApplied
5/5uprobes: use kmap_local_page() for temporary page mappingskernel/events/uprobes.c+6 -60 repliesApplied

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchOleg Nesterov
SeriesA-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] uprobes: transition from kmap_atomic to kmap_local_page

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.

Quoted 8 lines

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().

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(-)
Signature · 1 line
2.43.0