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: <20240808173938.GD6223@maniforge>
Date: Thu, 8 Aug 2024 12:39:38 -0500
From: David Vernet <void@...ifault.com>
To: Tejun Heo <tj@...nel.org>
Cc: linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH sched_ext/for-6.12] sched_ext: Make scx_rq_online() also
 test cpu_active() in addition to SCX_RQ_ONLINE

On Wed, Aug 07, 2024 at 12:13:38PM -1000, Tejun Heo wrote:
> scx_rq_online() currently only tests SCX_RQ_ONLINE. This isn't fully correct
> - e.g. consume_dispatch_q() uses task_run_on_remote_rq() which tests
> scx_rq_online() to see whether the current rq can run the task, and, if so,
> calls consume_remote_task() to migrate the task to @rq. While the test
> itself was done while locking @rq, @rq can be temporarily unlocked by
> consume_remote_task() and nothing prevents SCX_RQ_ONLINE from going offline
> before the migration takes place.
> 
> To address the issue, add cpu_active() test to scx_rq_online(). There is a
> synchronize_rcu() between cpu_active() being cleared and the rq going
> offline, so if an on-going scheduling operation sees cpu_active(), the
> associated rq is guaranteed to not go offline until the scheduling operation
> is complete.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Fixes: 60c27fb59f6c ("sched_ext: Implement sched_ext_ops.cpu_online/offline()")

Acked-by: David Vernet <void@...ifault.com>

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ