From: Paul Walmsley <pjw@kernel.org>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Paul Walmsley <pjw@kernel.org>, Joel Stanley <joel@jms.id.au>,
linux-kernel@vger.kernel.org,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>, Jim Shu <jim.shu@sifive.com>,
Zong Li <zong.li@sifive.com>, Deepak Gupta <debug@rivosinc.com>,
"open list:RISC-V ARCHITECTURE"
<linux-riscv@lists.infradead.org>
Subject: Re: [PATCH] arch/riscv: vdso: remove CFI landing pad from rt_sigreturn
Date: Tue, 14 Jul 2026 19:37:01 -0600 (MDT) [thread overview]
Message-ID: <eb8fd632-ca2c-9b65-209c-ce2294929cb9@kernel.org> (raw)
In-Reply-To: <alY7HFcSYkXh97Vy@aurel32.net>
Hi Aurelien, Joel,
On Tue, 14 Jul 2026, Aurelien Jarno wrote:
> On 2026-06-29 17:08, Joel Stanley wrote:
> > On Fri, 26 Jun 2026 at 03:33, Paul Walmsley <pjw@kernel.org> wrote:
> > > On Tue, 23 Jun 2026, Aurelien Jarno wrote:
> > >
> > > > When CONFIG_RISCV_USER_CFI is enabled, the CFI version of the vDSO, has
> > > > a CFI landing pad instruction at the start of __vdso_rt_sigreturn. This
> > > > breaks libgcc's unwinding code which matches on the first two
> > > > instructions. Other unwinders that rely on similar instruction matching
> > > > may also be affected.
> > > >
> > > > Since __vdso_rt_sigreturn is reached as part of signal-return handling
> > > > rather than via an indirect call/jump from userspace, it does not need a
> > > > CFI landing pad. Remove it and restore the instruction sequence expected
> > > > by existing unwinding code.
> > > >
> > > > This matches what was done on arm64 in commit 9a964285572b ("arm64:
> > > > vdso: Don't prefix sigreturn trampoline with a BTI C instruction") for a
> > > > similar issue.
> > > >
> > > > Fixes: 37f57bd3faea ("arch/riscv: compile vdso with landing pad and shadow stack note")
> > > > Co-authored-by: Joel Stanley <joel@jms.id.au>
> > > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > >
> > > I'd like to take this one. But since you're listed as the co-author, I
> > > probably need your Signed-off-by: as well. Care to reply with it?
> >
> > Signed-off-by: Joel Stanley <joel@jms.id.au>
> >
> > Thanks Aurelien for working with me on this one. I saw CFI was
> > disabled in the debian kernel config and wondered why (failing glibc
> > backtrace tests with CFI enabled), and we got to the bottom of it.
> >
> > This one should go to stable IMO.
>
> Now that Joel answered with a Signed-off-by, would it be possible to get
> this merged for 7.2?
Of course; thank you for the reminder. Thanks for the patch and the
S-o-b, queued for v7.2-rc with a cc: to stable@vger.
- Paul
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2026-07-15 1:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 20:40 [PATCH] arch/riscv: vdso: remove CFI landing pad from rt_sigreturn Aurelien Jarno
2026-06-25 18:03 ` Paul Walmsley
2026-06-29 7:38 ` Joel Stanley
2026-07-14 13:35 ` Aurelien Jarno
2026-07-15 1:37 ` Paul Walmsley [this message]
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=eb8fd632-ca2c-9b65-209c-ce2294929cb9@kernel.org \
--to=pjw@kernel.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=aurelien@aurel32.net \
--cc=debug@rivosinc.com \
--cc=jim.shu@sifive.com \
--cc=joel@jms.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=zong.li@sifive.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox