From: Michael Jeanson <mjeanson@efficios.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Boqun Feng <boqun.feng@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] rseq: update kernel fields in lockstep with CONFIG_DEBUG_RSEQ
Date: Tue, 25 Feb 2025 15:04:24 -0500 [thread overview]
Message-ID: <d61a3723-919d-40a7-a5ee-89f55bf8c445@efficios.com> (raw)
In-Reply-To: <Z74giMre3SJo-3Zw@gmail.com>
On 2025-02-25 14:56, Ingo Molnar wrote:
>
> * Michael Jeanson <mjeanson@efficios.com> wrote:
>
>> With CONFIG_DEBUG_RSEQ=y, an in-kernel copy of the read-only fields is
>> kept synchronized with the user-space fields. Ensure the updates are
>> done in lockstep in case we error out on a write to user-space.
>>
>> Fixes: 7d5265ffcd8b ("rseq: Validate read-only fields under DEBUG_RSEQ config")
>> Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
>> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> ---
>> kernel/rseq.c | 85 +++++++++++++++++++++++++++------------------------
>> 1 file changed, 45 insertions(+), 40 deletions(-)
>>
>> diff --git a/kernel/rseq.c b/kernel/rseq.c
>> index 2cb16091ec0a..88aa780f8cf4 100644
>> --- a/kernel/rseq.c
>> +++ b/kernel/rseq.c
>> @@ -26,6 +26,11 @@
>> RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL | \
>> RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE)
>>
>> +static struct rseq __user *rseq_user_fields(struct task_struct *t)
>> +{
>> + return (struct rseq __user *) t->rseq;
>
> Why is this wrapper needed?
>
> task_struct::rseq is already of that exact type AFAICS:
>
> struct rseq __user *rseq;
It's not needed, I can remove it and resend.
Thanks,
Michael
prev parent reply other threads:[~2025-02-25 20:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 15:35 Michael Jeanson
2025-02-25 19:56 ` Ingo Molnar
2025-02-25 20:04 ` Michael Jeanson [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=d61a3723-919d-40a7-a5ee-89f55bf8c445@efficios.com \
--to=mjeanson@efficios.com \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.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 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®