diff options
author | 2021-08-24 07:56:35 +0000 | |
---|---|---|
committer | 2021-08-25 13:35:47 +1000 | |
commit | 33e1402435cb9f3021439a15935ea2dc69ec1844 (patch) | |
tree | aa036b96b414c8702dc8ea8d835d5bdbbfec561f /arch/powerpc/kernel/misc_64.S | |
parent | powerpc/booke: Avoid link stack corruption in several places (diff) | |
download | linux-dev-33e1402435cb9f3021439a15935ea2dc69ec1844.tar.xz linux-dev-33e1402435cb9f3021439a15935ea2dc69ec1844.zip |
powerpc: Avoid link stack corruption in misc asm functions
bl;mflr is used at several places to get code position.
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/c6eabb4fb6c156f75d56dcbcc6f243e5ac0fba42.1629791763.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/misc_64.S')
-rw-r--r-- | arch/powerpc/kernel/misc_64.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index 4b761a18a74d..d38a019b38e1 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S @@ -255,7 +255,7 @@ _GLOBAL(scom970_write) * Physical (hardware) cpu id should be in r3. */ _GLOBAL(kexec_wait) - bl 1f + bcl 20,31,$+4 1: mflr r5 addi r5,r5,kexec_flag-1b |