Skip to content

Commit 7cdf440

Browse files
chleroympe
authored andcommitted
powerpc/entry32: Blacklist syscall exit points for kprobe.
kprobe does not handle events happening in real mode. The very last part of syscall cannot support a trap. Add a symbol syscall_exit_finish to identify that part and blacklist it from kprobe. Signed-off-by: Christophe Leroy <[email protected]> Acked-by: Naveen N. Rao <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/23eddf49abb03d1359fa0be4206998eb3800f42c.1585670437.git.christophe.leroy@c-s.fr
1 parent a616c44 commit 7cdf440

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/powerpc/kernel/entry_32.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,13 +462,15 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
462462
lwz r7,_NIP(r1)
463463
lwz r2,GPR2(r1)
464464
lwz r1,GPR1(r1)
465+
syscall_exit_finish:
465466
#if defined(CONFIG_PPC_8xx) && defined(CONFIG_PERF_EVENTS)
466467
mtspr SPRN_NRI, r0
467468
#endif
468469
mtspr SPRN_SRR0,r7
469470
mtspr SPRN_SRR1,r8
470471
SYNC
471472
RFI
473+
_ASM_NOKPROBE_SYMBOL(syscall_exit_finish)
472474
#ifdef CONFIG_44x
473475
2: li r7,0
474476
iccci r0,r0
@@ -600,6 +602,7 @@ ret_from_kernel_syscall:
600602
mtspr SPRN_SRR1, r10
601603
SYNC
602604
RFI
605+
_ASM_NOKPROBE_SYMBOL(ret_from_kernel_syscall)
603606

604607
/*
605608
* The fork/clone functions need to copy the full register set into

0 commit comments

Comments
 (0)