From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: David Laight <david.laight.linux@gmail.com>,
Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Mark Rutland <mark.rutland@arm.com>,
cmarinas@kernel.org, maddy@linux.ibm.com, hca@linux.ibm.com,
ryan.roberts@arm.com
Subject: Re: [RFC] in-kernel rseq
Date: Tue, 24 Feb 2026 08:33:23 -0500 [thread overview]
Message-ID: <f25c1f92-4170-4197-b2c0-2b77c731877f@efficios.com> (raw)
In-Reply-To: <20260224102728.1273c080@pumpkin>
On 2026-02-24 05:27, David Laight wrote:
[...]
>
> No scaling, in this case it is fine to add the rseq just before needing it.
In all cases it is fine to set the per-task rseq pointer just before
needing it. That's how the userspace rseq was implemented.
> But if they have to be set in advance then you start getting a long list
> to check - I'm sure that must happen with userspace rseq?
No, userspace declares rseq_cs descriptors in its data, and populates
the rseq_abi->rseq_cs field (thread-local) with a pointer to that
descriptor at the very beginning of the critical section.
So return to userspace after context switch either finds a NULL pointer
or only needs to load from a single rseq_cs descriptor from userspace.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
next prev parent reply other threads:[~2026-02-24 13:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 16:38 Peter Zijlstra
2026-02-23 17:53 ` David Laight
2026-02-23 18:22 ` Mathieu Desnoyers
2026-02-23 21:54 ` Peter Zijlstra
2026-02-24 10:27 ` David Laight
2026-02-24 13:33 ` Mathieu Desnoyers [this message]
2026-02-24 14:49 ` David Laight
2026-02-24 16:15 ` Mathieu Desnoyers
2026-02-24 11:16 ` Heiko Carstens
2026-02-24 13:48 ` Mathieu Desnoyers
2026-02-24 14:59 ` David Laight
2026-02-24 16:18 ` Mathieu Desnoyers
2026-02-24 15:17 ` Peter Zijlstra
2026-02-24 15:20 ` Peter Zijlstra
2026-02-24 16:02 ` Heiko Carstens
2026-02-24 16:15 ` Heiko Carstens
2026-04-10 17:57 ` Shrikanth Hegde
2026-04-15 8:51 ` Heiko Carstens
2026-04-17 9:29 ` Shrikanth Hegde
2026-04-17 9:36 ` Shrikanth Hegde
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=f25c1f92-4170-4197-b2c0-2b77c731877f@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=cmarinas@kernel.org \
--cc=david.laight.linux@gmail.com \
--cc=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maddy@linux.ibm.com \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=ryan.roberts@arm.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®