From: Dave Martin <Dave.Martin@arm•com>
To: Will Deacon <will@kernel•org>
Cc: Tamas Zsoldos <tamas.zsoldos@arm•com>,
Mark Brown <broonie@kernel•org>,
kernel-team@android•com, linux-arm-kernel@lists•infradead.org,
Daniel Kiss <daniel.kiss@arm•com>
Subject: Re: [PATCH 2/3] arm64: vdso: Add a comment to justify the mysterious NOP in sigreturn
Date: Tue, 19 May 2020 14:26:54 +0100 [thread overview]
Message-ID: <20200519132654.GF5031@arm.com> (raw)
In-Reply-To: <20200519121818.14511-3-will@kernel.org>
On Tue, May 19, 2020 at 01:18:17PM +0100, Will Deacon wrote:
> Every so often we have to remind ourselves about the purpose of the
> weird NOP instruction immediately preceding the sigreturn trampoline.
>
> Add a short comment to state that it exists for some unwinders that
> determine the caller address by subtracting from the return address.
>
> Cc: Dave Martin <dave.martin@arm•com>
> Cc: Daniel Kiss <daniel.kiss@arm•com>
> Cc: Tamas Zsoldos <tamas.zsoldos@arm•com>
> Signed-off-by: Will Deacon <will@kernel•org>
> ---
> arch/arm64/kernel/vdso/sigreturn.S | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/vdso/sigreturn.S b/arch/arm64/kernel/vdso/sigreturn.S
> index 83ac284dae79..7853fa9692f6 100644
> --- a/arch/arm64/kernel/vdso/sigreturn.S
> +++ b/arch/arm64/kernel/vdso/sigreturn.S
> @@ -14,7 +14,12 @@
>
> .text
>
> - nop
> +/*
> + * This mysterious NOP is required for some unwinders that subtract one from
> + * the return address in order to identify the calling function.
> + * Hack borrowed from arch/powerpc/kernel/vdso64/sigtramp.S.
> + */
> + nop // Mysterious NOP
Reviewed-by: Dave Martin <Dave.Martin@arm•com>
> /*
> * GDB relies on being able to identify the sigreturn instruction sequence to
> * unwind from signal handlers. We cannot, therefore, use SYM_FUNC_START()
> --
> 2.26.2.761.g0e0b3e54be-goog
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists•infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-05-19 13:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 12:18 [PATCH 0/3] arm64 sigreturn unwinding fixes Will Deacon
2020-05-19 12:18 ` [PATCH 1/3] arm64: vdso: Don't prefix sigreturn trampoline with a BTI C instruction Will Deacon
2020-05-19 12:38 ` Mark Brown
2020-05-19 13:25 ` Dave Martin
2020-05-19 14:35 ` Mark Brown
2020-05-19 14:55 ` Dave Martin
2020-05-19 15:42 ` Mark Brown
2020-05-20 9:48 ` Dave Martin
2020-05-20 10:46 ` Mark Brown
2020-05-20 11:08 ` Dave Martin
2020-05-19 15:26 ` Will Deacon
2020-05-19 13:21 ` Dave Martin
2020-05-19 13:29 ` Will Deacon
2020-05-19 12:18 ` [PATCH 2/3] arm64: vdso: Add a comment to justify the mysterious NOP in sigreturn Will Deacon
2020-05-19 13:26 ` Dave Martin [this message]
2020-05-19 12:18 ` [PATCH 3/3] arm64: vdso: Fix CFI directives in sigreturn trampoline Will Deacon
2020-05-19 13:09 ` Dave P Martin
2020-05-19 13:39 ` Will Deacon
2020-05-19 13:55 ` Dave Martin
2020-05-19 15:24 ` Will Deacon
2020-05-19 15:30 ` Daniel Kiss
2020-05-19 15:55 ` Will Deacon
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=20200519132654.GF5031@arm.com \
--to=dave.martin@arm$(echo .)com \
--cc=broonie@kernel$(echo .)org \
--cc=daniel.kiss@arm$(echo .)com \
--cc=kernel-team@android$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=tamas.zsoldos@arm$(echo .)com \
--cc=will@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox