]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Avoid link stack corruption in misc asm functions
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 24 Aug 2021 07:56:35 +0000 (07:56 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 25 Aug 2021 03:35:47 +0000 (13:35 +1000)
commita91a2469c19abbeda6befa418606001bc31edcb9
treeaa036b96b414c8702dc8ea8d835d5bdbbfec561f
parenta33393b1da3853af776dad455503bd429b6c5c44
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 cf139ca31085 ("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
arch/powerpc/kernel/misc.S
arch/powerpc/kernel/misc_32.S
arch/powerpc/kernel/misc_64.S
arch/powerpc/kernel/reloc_32.S
arch/powerpc/kexec/relocate_32.S