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: <ZuCvnJWtu0EI6DKe@slm.duckdns.org>
Date: Tue, 10 Sep 2024 10:44:12 -1000
From: Tejun Heo <tj@...nel.org>
To: David Vernet <void@...ifault.com>
Cc: linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH v2 sched_ext/for-6.12] sched_ext: Synchronize bypass
 state changes with rq lock

On Mon, Sep 09, 2024 at 01:29:42PM -1000, Tejun Heo wrote:
> While the BPF scheduler is being unloaded, the following warning messages
> trigger sometimes:
> 
>  NOHZ tick-stop error: local softirq work is pending, handler #80!!!
> 
> This is caused by the CPU entering idle while there are pending softirqs.
> The main culprit is the bypassing state assertion not being synchronized
> with rq operations. As the BPF scheduler cannot be trusted in the disable
> path, the first step is entering the bypass mode where the BPF scheduler is
> ignored and scheduling becomes global FIFO.
> 
> This is implemented by turning scx_ops_bypassing() true. However, the
> transition isn't synchronized against anything and it's possible for enqueue
> and dispatch paths to have different ideas on whether bypass mode is on.
> 
> Make each rq track its own bypass state with SCX_RQ_BYPASSING which is
> modified while rq is locked.
> 
> This removes most of the NOHZ tick-stop messages but not completely. I
> believe the stragglers are from the sched core bug where pick_task_scx() can
> be called without preceding balance_scx(). Once that bug is fixed, we should
> verify that all occurrences of this error message are gone too.
> 
> v2: scx_enabled() test moved inside the for_each_possible_cpu() loop so that
>     the per-cpu states are always synchronized with the global state.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Reported-by: David Vernet <void@...ifault.com>

Applied to sched_ext/for-6.12.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ