[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <878qgrtad1.ffs@tglx>
Date: Fri, 31 Oct 2025 15:27:22 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Prakash Sangappa <prakash.sangappa@...cle.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Michael Jeanson
<mjeanson@...icios.com>, Jens Axboe <axboe@...nel.dk>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Peter Zijlstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...nel.org>, "x86@...nel.org"
<x86@...nel.org>, Sean Christopherson <seanjc@...gle.com>, Wei Liu
<wei.liu@...nel.org>
Subject: Re: [patch V6 20/31] rseq: Replace the original debug implementation
On Thu, Oct 30 2025 at 21:52, Prakash Sangappa wrote:
>> On Oct 27, 2025, at 1:45 AM, Thomas Gleixner <tglx@...utronix.de> wrote:
>>
>> Just utilize the new infrastructure and put the original one to rest.
>>
>> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
>> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> […]
>> void rseq_syscall(struct pt_regs *regs)
>> {
>> - unsigned long ip = instruction_pointer(regs);
>> struct task_struct *t = current;
>> - struct rseq_cs rseq_cs;
>> + u64 csaddr;
>>
>> - if (!t->rseq.usrptr)
>> + if (!t->rseq.event.has_rseq)
>> + return;
>> + if (!get_user(csaddr, &t->rseq.usrptr->rseq_cs))
>> + goto fail;
>
> I believe get_user() would returns non zero(-EFAULT) on failure.
> Noticed test program dies with segv when command line parameter rseq_debug=1 is set.
>
> So, It should be
> if (get_user(csaddr, &t->rseq.usrptr->rseq_cs))
> goto fail;
Indeed
Powered by blists - more mailing lists