Commit e51c3e13 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc/entry32: Blacklist exception exit points for kprobe.

kprobe does not handle events happening in real mode.

The very last part of exception exits cannot support a trap.
Blacklist them from kprobe.

While we are at it, remove exc_exit_start symbol which is not
used to avoid having to blacklist it.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Acked-by: default avatarNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/098b0fd3f6299aa1bd692bd576bd7012c84608de.1585670437.git.christophe.leroy@c-s.fr
parent 7cdf4401
...@@ -806,6 +806,7 @@ fast_exception_return: ...@@ -806,6 +806,7 @@ fast_exception_return:
lwz r11,GPR11(r11) lwz r11,GPR11(r11)
SYNC SYNC
RFI RFI
_ASM_NOKPROBE_SYMBOL(fast_exception_return)
#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE)) #if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
/* check if the exception happened in a restartable section */ /* check if the exception happened in a restartable section */
...@@ -1041,6 +1042,8 @@ exc_exit_restart: ...@@ -1041,6 +1042,8 @@ exc_exit_restart:
exc_exit_restart_end: exc_exit_restart_end:
SYNC SYNC
RFI RFI
_ASM_NOKPROBE_SYMBOL(exc_exit_restart)
_ASM_NOKPROBE_SYMBOL(exc_exit_restart_end)
#else /* !(CONFIG_4xx || CONFIG_BOOKE) */ #else /* !(CONFIG_4xx || CONFIG_BOOKE) */
/* /*
...@@ -1062,7 +1065,6 @@ exc_exit_restart_end: ...@@ -1062,7 +1065,6 @@ exc_exit_restart_end:
exc_exit_restart: exc_exit_restart:
lwz r11,_NIP(r1) lwz r11,_NIP(r1)
lwz r12,_MSR(r1) lwz r12,_MSR(r1)
exc_exit_start:
mtspr SPRN_SRR0,r11 mtspr SPRN_SRR0,r11
mtspr SPRN_SRR1,r12 mtspr SPRN_SRR1,r12
REST_2GPRS(11, r1) REST_2GPRS(11, r1)
...@@ -1071,6 +1073,7 @@ exc_exit_start: ...@@ -1071,6 +1073,7 @@ exc_exit_start:
exc_exit_restart_end: exc_exit_restart_end:
rfi rfi
b . /* prevent prefetch past rfi */ b . /* prevent prefetch past rfi */
_ASM_NOKPROBE_SYMBOL(exc_exit_restart)
/* /*
* Returning from a critical interrupt in user mode doesn't need * Returning from a critical interrupt in user mode doesn't need
...@@ -1182,6 +1185,7 @@ ret_from_crit_exc: ...@@ -1182,6 +1185,7 @@ ret_from_crit_exc:
mtspr SPRN_SRR0,r9; mtspr SPRN_SRR0,r9;
mtspr SPRN_SRR1,r10; mtspr SPRN_SRR1,r10;
RET_FROM_EXC_LEVEL(SPRN_CSRR0, SPRN_CSRR1, PPC_RFCI) RET_FROM_EXC_LEVEL(SPRN_CSRR0, SPRN_CSRR1, PPC_RFCI)
_ASM_NOKPROBE_SYMBOL(ret_from_crit_exc)
#endif /* CONFIG_40x */ #endif /* CONFIG_40x */
#ifdef CONFIG_BOOKE #ifdef CONFIG_BOOKE
...@@ -1193,6 +1197,7 @@ ret_from_crit_exc: ...@@ -1193,6 +1197,7 @@ ret_from_crit_exc:
RESTORE_xSRR(SRR0,SRR1); RESTORE_xSRR(SRR0,SRR1);
RESTORE_MMU_REGS; RESTORE_MMU_REGS;
RET_FROM_EXC_LEVEL(SPRN_CSRR0, SPRN_CSRR1, PPC_RFCI) RET_FROM_EXC_LEVEL(SPRN_CSRR0, SPRN_CSRR1, PPC_RFCI)
_ASM_NOKPROBE_SYMBOL(ret_from_crit_exc)
.globl ret_from_debug_exc .globl ret_from_debug_exc
ret_from_debug_exc: ret_from_debug_exc:
...@@ -1203,6 +1208,7 @@ ret_from_debug_exc: ...@@ -1203,6 +1208,7 @@ ret_from_debug_exc:
RESTORE_xSRR(CSRR0,CSRR1); RESTORE_xSRR(CSRR0,CSRR1);
RESTORE_MMU_REGS; RESTORE_MMU_REGS;
RET_FROM_EXC_LEVEL(SPRN_DSRR0, SPRN_DSRR1, PPC_RFDI) RET_FROM_EXC_LEVEL(SPRN_DSRR0, SPRN_DSRR1, PPC_RFDI)
_ASM_NOKPROBE_SYMBOL(ret_from_debug_exc)
.globl ret_from_mcheck_exc .globl ret_from_mcheck_exc
ret_from_mcheck_exc: ret_from_mcheck_exc:
...@@ -1214,6 +1220,7 @@ ret_from_mcheck_exc: ...@@ -1214,6 +1220,7 @@ ret_from_mcheck_exc:
RESTORE_xSRR(DSRR0,DSRR1); RESTORE_xSRR(DSRR0,DSRR1);
RESTORE_MMU_REGS; RESTORE_MMU_REGS;
RET_FROM_EXC_LEVEL(SPRN_MCSRR0, SPRN_MCSRR1, PPC_RFMCI) RET_FROM_EXC_LEVEL(SPRN_MCSRR0, SPRN_MCSRR1, PPC_RFMCI)
_ASM_NOKPROBE_SYMBOL(ret_from_mcheck_exc)
#endif /* CONFIG_BOOKE */ #endif /* CONFIG_BOOKE */
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment