diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-08-24 07:56:26 +0000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-08-25 13:35:47 +1000 |
commit | f5007dbf4da729baa850b33a64dc3cc53757bdf8 (patch) | |
tree | 9e0faa1eca3f840f7e51dc50016697f26585acd2 /arch/powerpc/include | |
parent | powerpc/32: indirect function call use bctrl rather than blrl in ret_from_kernel_thread (diff) | |
download | linux-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 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/ppc_asm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index ffe712307e11..1c538a9a11e0 100644 --- a/arch/powerpc/include/asm/ppc_asm.h +++ b/arch/powerpc/include/asm/ppc_asm.h @@ -260,7 +260,7 @@ n: /* Be careful, this will clobber the lr register. */ #define LOAD_REG_ADDR_PIC(reg, name) \ - bl 0f; \ + bcl 20,31,$+4; \ 0: mflr reg; \ addis reg,reg,(name - 0b)@ha; \ addi reg,reg,(name - 0b)@l; |