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] [day] [month] [year] [list]
Message-ID: <aQp1KGGSPF6m4NVm@gpd4>
Date: Tue, 4 Nov 2025 22:50:32 +0100
From: Andrea Righi <arighi@...dia.com>
To: Tejun Heo <tj@...nel.org>
Cc: David Vernet <void@...ifault.com>, Changwoo Min <changwoo@...lia.com>,
	sched-ext@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH sched_ext/for-6.19] sched_ext: Move
 __SCX_DSQ_ITER_ALL_FLAGS BUILD_BUG_ON to the right place

On Tue, Nov 04, 2025 at 11:40:22AM -1000, Tejun Heo wrote:
> The BUILD_BUG_ON() which checks that __SCX_DSQ_ITER_ALL_FLAGS doesn't
> overlap with the private lnode bits was in scx_task_iter_start() which has
> nothing to do with DSQ iteration. Move it to bpf_iter_scx_dsq_new() where it
> belongs.
> 
> No functional changes.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>

Looks good (both patches)

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

Thanks,
-Andrea

> ---
>  kernel/sched/ext.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -474,9 +474,6 @@ struct scx_task_iter {
>   */
>  static void scx_task_iter_start(struct scx_task_iter *iter)
>  {
> -	BUILD_BUG_ON(__SCX_DSQ_ITER_ALL_FLAGS &
> -		     ((1U << __SCX_DSQ_LNODE_PRIV_SHIFT) - 1));
> -
>  	spin_lock_irq(&scx_tasks_lock);
> 
>  	iter->cursor = (struct sched_ext_entity){ .flags = SCX_TASK_CURSOR };
> @@ -6218,6 +6215,8 @@ __bpf_kfunc int bpf_iter_scx_dsq_new(str
>  		     sizeof(struct bpf_iter_scx_dsq));
>  	BUILD_BUG_ON(__alignof__(struct bpf_iter_scx_dsq_kern) !=
>  		     __alignof__(struct bpf_iter_scx_dsq));
> +	BUILD_BUG_ON(__SCX_DSQ_ITER_ALL_FLAGS &
> +		     ((1U << __SCX_DSQ_LNODE_PRIV_SHIFT) - 1));
> 
>  	/*
>  	 * next() and destroy() will be called regardless of the return value.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ