linux-user/aarch64: Add padding before __kernel_rt_sigreturn
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 2 Feb 2024 03:44:27 +0000 (13:44 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Sat, 3 Feb 2024 06:46:10 +0000 (16:46 +1000)
Without this padding, an unwind through the signal handler
will pick up the unwind info for the preceding syscall.

This fixes gcc's 30_threads/thread/native_handle/cancel.cc.

Cc: qemu-stable@nongnu.org
Fixes: ee95fae075c6 ("linux-user/aarch64: Add vdso")
Resolves: https://linaro.atlassian.net/browse/GNU-974
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240202034427.504686-1-richard.henderson@linaro.org>

linux-user/aarch64/vdso-be.so
linux-user/aarch64/vdso-le.so
linux-user/aarch64/vdso.S

index 6084f3d1a701316004894fcdd739c4e1e0463b68..808206ade824b09d786f6cc34f7cddf80b63130e 100755 (executable)
Binary files a/linux-user/aarch64/vdso-be.so and b/linux-user/aarch64/vdso-be.so differ
index 947d534ec1899740edbd6921da6bc6e70e2ecd09..941aaf29931193300de1f62097867c282a7e0c74 100755 (executable)
Binary files a/linux-user/aarch64/vdso-le.so and b/linux-user/aarch64/vdso-le.so differ
index 34d3a9ebd2d6ded89d1962dfd779756df1e94cef..a0ac1487b0991e8d723f44759e87fd315041b71e 100644 (file)
@@ -63,7 +63,11 @@ vdso_syscall __kernel_clock_getres, __NR_clock_getres
  * For now, elide the unwind info for __kernel_rt_sigreturn and rely on
  * the libgcc fallback routine as we have always done.  This requires
  * that the code sequence used be exact.
+ *
+ * Add a nop as a spacer to ensure that unwind does not pick up the
+ * unwind info from the preceding syscall.
  */
+       nop
 __kernel_rt_sigreturn:
        /* No BTI C insn here -- we arrive via RET. */
        mov     x8, #__NR_rt_sigreturn