aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/nohash/tlb_low.S
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-08-24 07:56:26 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2021-08-25 13:35:47 +1000
commitf5007dbf4da729baa850b33a64dc3cc53757bdf8 (patch)
tree9e0faa1eca3f840f7e51dc50016697f26585acd2 /arch/powerpc/mm/nohash/tlb_low.S
parentpowerpc/32: indirect function call use bctrl rather than blrl in ret_from_kernel_thread (diff)
downloadlinux-dev-f5007dbf4da729baa850b33a64dc3cc53757bdf8.tar.xz
linux-dev-f5007dbf4da729baa850b33a64dc3cc53757bdf8.zip
powerpc/booke: Avoid link stack corruption in several places
Use bcl 20,31,+4 instead of bl in order to preserve link stack. See commit c974809a26a1 ("powerpc/vdso: Avoid link stack corruption in __get_datapage()") for details. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/e9fbc285eceb720e6c0e032ef47fe8b05f669b48.1629791751.git.christophe.leroy@csgroup.eu
Diffstat (limited to '')
-rw-r--r--arch/powerpc/mm/nohash/tlb_low.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/mm/nohash/tlb_low.S b/arch/powerpc/mm/nohash/tlb_low.S
index 4613bf8e9aae..5add4a51e51f 100644
--- a/arch/powerpc/mm/nohash/tlb_low.S
+++ b/arch/powerpc/mm/nohash/tlb_low.S
@@ -199,7 +199,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_476_DD2)
* Touch enough instruction cache lines to ensure cache hits
*/
1: mflr r9
- bl 2f
+ bcl 20,31,$+4
2: mflr r6
li r7,32
PPC_ICBT(0,R6,R7) /* touch next cache line */
@@ -414,7 +414,7 @@ _GLOBAL(loadcam_multi)
* Set up temporary TLB entry that is the same as what we're
* running from, but in AS=1.
*/
- bl 1f
+ bcl 20,31,$+4
1: mflr r6
tlbsx 0,r8
mfspr r6,SPRN_MAS1