lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7757033-3746-46b7-b776-4db269b0499c@efficios.com>
Date: Mon, 25 Aug 2025 11:43:09 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Thomas Gleixner <tglx@...utronix.de>, LKML <linux-kernel@...r.kernel.org>
Cc: Jens Axboe <axboe@...nel.dk>, Peter Zijlstra <peterz@...radead.org>,
 "Paul E. McKenney" <paulmck@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
 Paolo Bonzini <pbonzini@...hat.com>, Sean Christopherson
 <seanjc@...gle.com>, Wei Liu <wei.liu@...nel.org>,
 Dexuan Cui <decui@...rosoft.com>, x86@...nel.org,
 Arnd Bergmann <arnd@...db.de>, Heiko Carstens <hca@...ux.ibm.com>,
 Christian Borntraeger <borntraeger@...ux.ibm.com>,
 Sven Schnelle <svens@...ux.ibm.com>, Huacai Chen <chenhuacai@...nel.org>,
 Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>
Subject: Re: [patch V2 04/37] rseq: Remove the ksig argument from
 rseq_handle_notify_resume()

On 2025-08-23 12:39, Thomas Gleixner wrote:
> There is no point for this being visible in the resume_to_user_mode()
> handling.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>

> ---
>   include/linux/resume_user_mode.h |    2 +-
>   include/linux/rseq.h             |   13 +++++++------
>   2 files changed, 8 insertions(+), 7 deletions(-)
> 
> --- a/include/linux/resume_user_mode.h
> +++ b/include/linux/resume_user_mode.h
> @@ -59,7 +59,7 @@ static inline void resume_user_mode_work
>   	mem_cgroup_handle_over_high(GFP_KERNEL);
>   	blkcg_maybe_throttle_current();
>   
> -	rseq_handle_notify_resume(NULL, regs);
> +	rseq_handle_notify_resume(regs);
>   }
>   
>   #endif /* LINUX_RESUME_USER_MODE_H */
> --- a/include/linux/rseq.h
> +++ b/include/linux/rseq.h
> @@ -37,19 +37,20 @@ static inline void rseq_set_notify_resum
>   
>   void __rseq_handle_notify_resume(struct ksignal *sig, struct pt_regs *regs);
>   
> -static inline void rseq_handle_notify_resume(struct ksignal *ksig,
> -					     struct pt_regs *regs)
> +static inline void rseq_handle_notify_resume(struct pt_regs *regs)
>   {
>   	if (current->rseq)
> -		__rseq_handle_notify_resume(ksig, regs);
> +		__rseq_handle_notify_resume(NULL, regs);
>   }
>   
>   static inline void rseq_signal_deliver(struct ksignal *ksig,
>   				       struct pt_regs *regs)
>   {
> -	scoped_guard(RSEQ_EVENT_GUARD)
> -		__set_bit(RSEQ_EVENT_SIGNAL_BIT, &current->rseq_event_mask);
> -	rseq_handle_notify_resume(ksig, regs);
> +	if (current->rseq) {
> +		scoped_guard(RSEQ_EVENT_GUARD)
> +			__set_bit(RSEQ_EVENT_SIGNAL_BIT, &current->rseq_event_mask);
> +		__rseq_handle_notify_resume(ksig, regs);
> +	}
>   }
>   
>   /* rseq_preempt() requires preemption to be disabled. */
> 


-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ