OSDN Git Service

arm64: vdso: Fix CFI directives in sigreturn trampoline
authorWill Deacon <will@kernel.org>
Tue, 19 May 2020 11:56:05 +0000 (12:56 +0100)
committerWill Deacon <will@kernel.org>
Thu, 21 May 2020 11:59:26 +0000 (12:59 +0100)
commita4eb355a3fdad85d16e4b098e8d56bb28b812ce0
tree6926231c6775a41e08ff85376027ef2d7e65cfdd
parent9a964285572b5a3ea268bd744bb6837aecf09640
arm64: vdso: Fix CFI directives in sigreturn trampoline

Daniel reports that the .cfi_startproc is misplaced for the sigreturn
trampoline, which causes LLVM's unwinder to misbehave:

  | I run into this with LLVM’s unwinder.
  | This combination was always broken.

This prompted Dave to question our use of CFI directives more generally,
and I ended up going down a rabbit hole trying to figure out how this
very poorly documented stuff gets used.

Move the CFI directives so that the "mysterious NOP" is included in
the .cfi_{start,end}proc block and add a bunch of comments so that I
can save myself another headache in future.

Cc: Tamas Zsoldos <tamas.zsoldos@arm.com>
Reported-by: Dave Martin <dave.martin@arm.com>
Reported-by: Daniel Kiss <daniel.kiss@arm.com>
Tested-by: Daniel Kiss <daniel.kiss@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/vdso/sigreturn.S
arch/arm64/kernel/vdso32/sigreturn.S