Skip to content

Commit

Permalink
linux-user/aarch64: Add padding before __kernel_rt_sigreturn
Browse files Browse the repository at this point in the history
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: ee95fae ("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>
  • Loading branch information
rth7680 committed Feb 3, 2024
1 parent 240f46b commit 6400be0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Binary file modified linux-user/aarch64/vdso-be.so
Binary file not shown.
Binary file modified linux-user/aarch64/vdso-le.so
Binary file not shown.
4 changes: 4 additions & 0 deletions linux-user/aarch64/vdso.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6400be0

Please sign in to comment.