arm64: vdso: Don't prefix sigreturn trampoline with a BTI C instruction
authorWill Deacon <will@kernel.org>
Tue, 19 May 2020 11:38:33 +0000 (12:38 +0100)
committerWill Deacon <will@kernel.org>
Thu, 21 May 2020 11:57:18 +0000 (12:57 +0100)
commit9a964285572b5a3ea268bd744bb6837aecf09640
tree76d5243ccaff584ad1d4660c3ed259446bf1a4c5
parente4e9f6dfeedc86afef2c3fa4102d274862fe2cf9
arm64: vdso: Don't prefix sigreturn trampoline with a BTI C instruction

For better or worse, GDB relies on the exact instruction sequence in the
VDSO sigreturn trampoline in order to unwind from signals correctly.
Commit c91db232da48 ("arm64: vdso: Convert to modern assembler annotations")
unfortunately added a BTI C instruction to the start of __kernel_rt_sigreturn,
which breaks this check. Thankfully, it's also not required, since the
trampoline is called from a RET instruction when returning from the signal
handler

Remove the unnecessary BTI C instruction from __kernel_rt_sigreturn,
and do the same for the 32-bit VDSO as well for good measure.

Cc: Daniel Kiss <daniel.kiss@arm.com>
Cc: Tamas Zsoldos <tamas.zsoldos@arm.com>
Reviewed-by: Dave Martin <dave.martin@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Fixes: c91db232da48 ("arm64: vdso: Convert to modern assembler annotations")
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/linkage.h
arch/arm64/kernel/vdso/sigreturn.S
arch/arm64/kernel/vdso32/sigreturn.S