From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org,
Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>,
Christophe Lyon <christophe.lyon@linaro.org>,
qemu-stable@nongnu.org
Subject: Re: [PATCH] linux-user/aarch64: Add padding before __kernel_rt_sigreturn
Date: Fri, 02 Feb 2024 12:26:06 +0000 [thread overview]
Message-ID: <87a5ojjbmp.fsf@draig.linaro.org> (raw)
In-Reply-To: <20240202034427.504686-1-richard.henderson@linaro.org> (Richard Henderson's message of "Fri, 2 Feb 2024 13:44:27 +1000")
Richard Henderson <richard.henderson@linaro.org> writes:
> 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>
> ---
> linux-user/aarch64/vdso-be.so | Bin 3216 -> 3224 bytes
> linux-user/aarch64/vdso-le.so | Bin 3216 -> 3224 bytes
> linux-user/aarch64/vdso.S | 4 ++++
> 3 files changed, 4 insertions(+)
>
> diff --git a/linux-user/aarch64/vdso-be.so b/linux-user/aarch64/vdso-be.so
> index 6084f3d1a701316004894fcdd739c4e1e0463b68..808206ade824b09d786f6cc34f7cddf80b63130e 100755
> GIT binary patch
> delta 121
> zcmbOrIYV-SKI4pu2Kk&{7{Gw#%fuBAMC1c?^>~k}v|avdxNjSSLfftVb3bgJ!|2S&
> z_-6A1CJrVZc?IUH8G;R$7#SF@Om<{a*v!K!&BXX-vIe^~TWO|cva$K*Om;sOMw`hy
> ZxXl@VO#Z-a&zLdUfXALuXmSCM0s#EKC)of1
>
> delta 116
> zcmbOsIYDxQKI4Rm2Kk&H7{Gw#!^9O2L>8U?-5V_M@!kH(Sx4vJn|*ujLPgija~Pc&
> z8DDIEz{J5c`3;N8W)W6tCdL<&4cM*OEF8_<v%@zRviq?xT1-B`ZO-^%@(*r%#)Qch
> RJocPi5ThAdCO2?N002V6C;<Qf
>
> diff --git a/linux-user/aarch64/vdso-le.so b/linux-user/aarch64/vdso-le.so
> index 947d534ec1899740edbd6921da6bc6e70e2ecd09..941aaf29931193300de1f62097867c282a7e0c74 100755
> GIT binary patch
> delta 129
> zcmbOrIYV-S2IGv0n)#exSQx<I%fyAxMZTVBQ(04AP_*V|Vxp|@=@;x8zb9;-!)U|E
> z_-6A>CVnO!c?IUH8G;R$7#SF@Om<{a*v!K!!o>JyvLd?^n`3BUW_royOm=q`Mw`hS
> dxy>1WOn%92&zLb;lgFM@hy!9z%j7~Xc>tTxDQW-!
>
> delta 108
> zcmbOsIYDxQ2IGW@n)#d`SQx<I!^DNpMK&+G&+g_}w9WI@dn@@euKVesZ-h6`VYFdn
> ze6jf^6F<}BH!LcfMOa0c7+*}*WOrgKEO1Fl%G+GX?#{w!F?lDqIpc@PAGz%r6DAw-
> M*fVlXF62=M06owo?*IS*
>
> diff --git a/linux-user/aarch64/vdso.S b/linux-user/aarch64/vdso.S
> index 34d3a9ebd2..a0ac1487b0 100644
> --- a/linux-user/aarch64/vdso.S
> +++ b/linux-user/aarch64/vdso.S
> @@ -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
You could have gone the whole hog and done:
nop // Mysterious NOP
like the kernel does ;-)
Anyway:
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2024-02-02 12:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 3:44 [PATCH] linux-user/aarch64: Add padding before __kernel_rt_sigreturn Richard Henderson
2024-02-02 12:26 ` Alex Bennée [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-02-02 5:49 [PULL 00/57] tcg patch queue Richard Henderson
2024-02-02 5:49 ` [PATCH] linux-user/aarch64: Add padding before __kernel_rt_sigreturn Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a5ojjbmp.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=christophe.lyon@linaro.org \
--cc=maxim.kuvyrkov@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.