linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: vdso: Fix CFI info in sigreturn.
@ 2020-05-15 16:20 dankis01
  2020-05-18 15:59 ` Dave Martin
  0 siblings, 1 reply; 7+ messages in thread
From: dankis01 @ 2020-05-15 16:20 UTC (permalink / raw)
  To: linux-arm-kernel, Vincenzo.Frascino, mark.rutland
  Cc: Tamas Zsoldos, Daniel Kiss

When the signal handler is called the registers set up as the return address
points to the __kernel_rt_sigreturn. The NOP here is the placeholder of the
branch and link instruction that "calls" the signal handler. In case of a
return address the unwinder identifies the location of the caller because
in some cases the return address might not exist. Since the .cfi_startproc
is after the NOP, it won't be associated with any location and the
unwinder will stop walking.

This change corrects the generated EHFrames only.

Signed-off-by: Daniel Kiss <daniel.kiss@arm.com>
Signed-off-by: Tamas Zsoldos <tamas.zsoldos@arm.com>
---
 arch/arm64/kernel/vdso/sigreturn.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/vdso/sigreturn.S b/arch/arm64/kernel/vdso/sigreturn.S
index 12324863d5c2..5d50ee92faa4 100644
--- a/arch/arm64/kernel/vdso/sigreturn.S
+++ b/arch/arm64/kernel/vdso/sigreturn.S
@@ -13,13 +13,13 @@
 
 	.text
 
-	nop
-SYM_FUNC_START(__kernel_rt_sigreturn)
 	.cfi_startproc
 	.cfi_signal_frame
 	.cfi_def_cfa	x29, 0
 	.cfi_offset	x29, 0 * 8
 	.cfi_offset	x30, 1 * 8
+	nop  /* placeholder for bl signalhandler */
+SYM_FUNC_START(__kernel_rt_sigreturn)
 	mov	x8, #__NR_rt_sigreturn
 	svc	#0
 	.cfi_endproc
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 7+ messages in thread
[parent not found: <30E488CA-46FF-4927-A07F-8CE11263B92E@arm.com>]

end of thread, other threads:[~2020-05-19 11:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-15 16:20 [PATCH] arm64: vdso: Fix CFI info in sigreturn dankis01
2020-05-18 15:59 ` Dave Martin
2020-05-18 17:00   ` Daniel Kiss
2020-05-19  9:29     ` Dave Martin
2020-05-19 11:34       ` Will Deacon
     [not found] <30E488CA-46FF-4927-A07F-8CE11263B92E@arm.com>
     [not found] ` <CF896434-E995-438C-88F8-86CCFE24C5A2@arm.com>
2020-05-08  9:52   ` Daniel Kiss
2020-05-15 15:23     ` Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).