[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251023085144.GW3245006@noisy.programming.kicks-ass.net>
Date: Thu, 23 Oct 2025 10:51:44 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Michael Jeanson <mjeanson@...icios.com>,
Jens Axboe <axboe@...nel.dk>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
"Paul E. McKenney" <paulmck@...nel.org>, x86@...nel.org,
Sean Christopherson <seanjc@...gle.com>,
Wei Liu <wei.liu@...nel.org>
Subject: Re: [patch V5 27/31] rseq: Implement fast path for exit to user
On Wed, Oct 22, 2025 at 02:52:34PM +0200, Thomas Gleixner wrote:
> @@ -245,12 +246,13 @@ rseq_update_user_cs(struct task_struct *
> {
> struct rseq_cs __user *ucs = (struct rseq_cs __user *)(unsigned long)csaddr;
> unsigned long ip = instruction_pointer(regs);
> + unsigned long tasksize = TASK_SIZE;
> u64 start_ip, abort_ip, offset;
> u32 usig, __user *uc_sig;
>
> rseq_stat_inc(rseq_stats.cs);
>
> - if (unlikely(csaddr >= TASK_SIZE)) {
> + if (unlikely(csaddr >= tasksize)) {
> t->rseq.event.fatal = true;
> return false;
> }
> @@ -287,7 +289,7 @@ rseq_update_user_cs(struct task_struct *
> * in TLS::rseq::rseq_cs. An RSEQ abort would then evade ROP
> * protection.
> */
> - if (abort_ip >= TASK_SIZE || abort_ip < sizeof(*uc_sig))
> + if (unlikely(abort_ip >= tasksize || abort_ip < sizeof(*uc_sig)))
> goto die;
>
> /* The address is guaranteed to be >= 0 and < TASK_SIZE */
This seems like a random change, unconnected to the rest of the patch.
Powered by blists - more mailing lists