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: <aCS_hx4ew_E60nfg@gpd3>
Date: Wed, 14 May 2025 18:06:31 +0200
From: Andrea Righi <arighi@...dia.com>
To: Tejun Heo <tj@...nel.org>
Cc: David Vernet <void@...ifault.com>, Changwoo Min <changwoo@...lia.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH sched_ext/for-6.16] sched_ext: Explain the temporary
 situation around scx_root dereferences

On Wed, May 14, 2025 at 11:10:25AM -0400, Tejun Heo wrote:
> Naked scx_root dereferences are being used as temporary markers to indicate
> that they need to be updated to point to the right scheduler instance.
> Explain the situation.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Andrea Righi <arighi@...dia.com>

Looks good, thanks!

Acked-by: Andrea Righi <arighi@...dia.com>

-Andrea

> ---
>  kernel/sched/ext.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -1016,6 +1016,14 @@ enum scx_ops_state {
>  #define SCX_OPSS_STATE_MASK	((1LU << SCX_OPSS_QSEQ_SHIFT) - 1)
>  #define SCX_OPSS_QSEQ_MASK	(~SCX_OPSS_STATE_MASK)
>  
> +/*
> + * NOTE: sched_ext is in the process of growing multiple scheduler support and
> + * scx_root usage is in a transitional state. Naked dereferences are safe if the
> + * caller is one of the tasks attached to SCX and explicit RCU dereference is
> + * necessary otherwise. Naked scx_root dereferences trigger sparse warnings but
> + * are used as temporary markers to indicate that the dereferences need to be
> + * updated to point to the associated scheduler instances rather than scx_root.
> + */
>  static struct scx_sched __rcu *scx_root;
>  
>  /*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ