Skip to content

uprobes: longjmp / special-mapping fixes

Oleg Nesterov lkml 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 0 repliesNew
  2. v211 patches 18 repliesSuperseded
  3. v110 patches 18 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14uprobes: Introduce get_uprobe()kernel/events/uprobes.c+20 -190 replies
2/14uprobes: Introduce free_ret_instance()kernel/events/uprobes.c+13 -140 replies
3/14uprobes: Send SIGILL if handle_trampoline() failskernel/events/uprobes.c+10 -110 replies
4/14uprobes: Change prepare_uretprobe() to use uprobe_warn()kernel/events/uprobes.c+3 -70 replies
5/14uprobes: Change handle_trampoline() to find the next chain beforehandkernel/events/uprobes.c+16 -110 replies
6/14uprobes: Export struct return_instance, introduce arch_uretprobe_is_alive()include/linux/uprobes.h kernel/events/uprobes.c+15 -90 replies
7/14uprobes/x86: Reimplement arch_uretprobe_is_alive()arch/x86/kernel/uprobes.c include/linux/uprobes.h kernel/events/uprobes.c+7 -00 replies
8/14uprobes: Change handle_trampoline() to flush the frames invalidated by longjmp()kernel/events/uprobes.c+18 -110 replies
9/14uprobes: Change prepare_uretprobe() to (try to) flush the dead frameskernel/events/uprobes.c+13 -00 replies
10/14uprobes: Add the "enum rp_check ctx" arg to arch_uretprobe_is_alive()arch/x86/kernel/uprobes.c include/linux/uprobes.h kernel/events/uprobes.c+14 -50 replies
11/14uprobes/x86: Make arch_uretprobe_is_alive(RP_CHECK_CALL) more cleverarch/x86/kernel/uprobes.c include/linux/uprobes.h kernel/events/uprobes.c+12 -80 replies
12/14uprobes: fix the usage of install_special_mapping()kernel/events/uprobes.c+9 -80 replies
13/14uprobes: use vm_special_mapping to name the xol vmakernel/events/uprobes.c+20 -100 replies
14/14uprobes: fix the waitqueue_active() check in xol_free_insn_slot()kernel/events/uprobes.c+1 -00 replies

Reviews trailers per patch

11 of 14 patches have a Reviewed-by or Acked-by.

PatchSrikar DronamrajuAnton ArapovPratyush Anand
1/14A-b A-b T-b
2/14A-b A-b T-b
3/14A-b A-b T-b
4/14A-b A-b T-b
5/14A-b A-b T-b
6/14A-b A-b T-b
7/14A-b A-b T-b
8/14A-b A-b T-b
9/14A-b A-b T-b
10/14A-b A-b T-b
11/14A-b A-b T-b
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/14] uprobes: longjmp / special-mapping fixes

Ingo,

This is the changes I asked you to pull. I added v3 tag to avoid the confusion, but the only change is that I added the acks I got.

Currently ret-probes can't work (the application will likely crash) if the probed function does not return, and this is even documented in handle_trampoline(). This tries to make the first step to fix the problem, assuming that the probed functions use the same stack.

Also, xol_add_vma() doesn't use install_special_mapping() correctly, and we can name the xol vma which currently looks like anon mapping.

Oleg Nesterov (14):
uprobes: Introduce get_uprobe()
uprobes: Introduce free_ret_instance()
uprobes: Send SIGILL if handle_trampoline() fails
uprobes: Change prepare_uretprobe() to use uprobe_warn()
uprobes: Change handle_trampoline() to find the next chain beforehand
uprobes: Export struct return_instance, introduce arch_uretprobe_is_alive() uprobes/x86: Reimplement arch_uretprobe_is_alive()
uprobes: Change handle_trampoline() to flush the frames invalidated by longjmp()
uprobes: Change prepare_uretprobe() to (try to) flush the dead frames
uprobes: Add the "enum rp_check ctx" arg to arch_uretprobe_is_alive() uprobes/x86: Make arch_uretprobe_is_alive(RP_CHECK_CALL) more clever
uprobes: fix the usage of install_special_mapping()
uprobes: use vm_special_mapping to name the xol vma
uprobes: fix the waitqueue_active() check in xol_free_insn_slot()

 arch/x86/kernel/uprobes.c |    9 ++
 include/linux/uprobes.h   |   17 ++++
 kernel/events/uprobes.c   |  228 ++++++++++++++++++++++++++-------------------
 3 files changed, 156 insertions(+), 98 deletions(-)