diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-08-24 10:56:26 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-08-25 06:35:47 +0300 |
commit | f5007dbf4da729baa850b33a64dc3cc53757bdf8 (patch) | |
tree | 9e0faa1eca3f840f7e51dc50016697f26585acd2 /arch/powerpc/include/asm/ppc_asm.h | |
parent | 113ec9ccc8049c3772f0eab46b62c5d6654c09f7 (diff) | |
download | linux-f5007dbf4da729baa850b33a64dc3cc53757bdf8.tar.xz |
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/asm/ppc_asm.h')
-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; |