Skip to content

Commit 3bbd77e

Browse files
seehearfeeljfvogel
authored andcommitted
LoongArch: uprobes: Remove user_{en,dis}able_single_step()
commit 0b326b2371f94e798137cc1a3c5c2eef2bc69061 upstream. When executing the "perf probe" and "perf stat" test cases about some cryptographic algorithm, the output shows that "Trace/breakpoint trap". This is because it uses the software singlestep breakpoint for uprobes on LoongArch, and no need to use the hardware singlestep. So just remove the related function call to user_{en,dis}able_single_step() for uprobes on LoongArch. How to reproduce: Please make sure CONFIG_UPROBE_EVENTS is set and openssl supports sm2 algorithm, then execute the following command. cd tools/perf && make ./perf probe -x /usr/lib64/libcrypto.so BN_mod_mul_montgomery ./perf stat -e probe_libcrypto:BN_mod_mul_montgomery openssl speed sm2 Cc: [email protected] Fixes: 19bc6cb ("LoongArch: Add uprobes support") Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit 88650dde2eeaf157eddf55cdc5d47d46f691c905) Signed-off-by: Jack Vogel <[email protected]>
1 parent 99512ae commit 3bbd77e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

arch/loongarch/kernel/uprobes.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
4242
utask->autask.saved_trap_nr = current->thread.trap_nr;
4343
current->thread.trap_nr = UPROBE_TRAP_NR;
4444
instruction_pointer_set(regs, utask->xol_vaddr);
45-
user_enable_single_step(current);
4645

4746
return 0;
4847
}
@@ -59,8 +58,6 @@ int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
5958
else
6059
instruction_pointer_set(regs, utask->vaddr + LOONGARCH_INSN_SIZE);
6160

62-
user_disable_single_step(current);
63-
6461
return 0;
6562
}
6663

@@ -70,7 +67,6 @@ void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
7067

7168
current->thread.trap_nr = utask->autask.saved_trap_nr;
7269
instruction_pointer_set(regs, utask->vaddr);
73-
user_disable_single_step(current);
7470
}
7571

7672
bool arch_uprobe_xol_was_trapped(struct task_struct *t)

0 commit comments

Comments
 (0)