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: <20251107082533.GA1508773@noisy.programming.kicks-ass.net>
Date: Fri, 7 Nov 2025 09:25:33 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Fernand Sieber <sieberf@...zon.com>
Cc: kernel test robot <lkp@...el.com>, mingo@...hat.com,
	juri.lelli@...hat.com, vincent.guittot@...aro.org,
	dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
	mgorman@...e.de, vschneid@...hat.com, oe-kbuild-all@...ts.linux.dev,
	linux-kernel@...r.kernel.org, dwmw@...zon.co.uk, jschoenh@...zon.de,
	liuyuxua@...zon.com
Subject: Re: [PATCH] sched: Proxy yields to donor tasks

On Fri, Nov 07, 2025 at 10:12:53AM +0200, Fernand Sieber wrote:
> On Thu, Nov 07, 2025 at 02:31:16PM +0800, kernel test robot wrote:
> > sparse warnings: (new ones prefixed by >>)
> >
> >>> kernel/sched/rt.c:529:55: sparse: warning: incorrect type in initializer (different address spaces)
> >>> kernel/sched/rt.c:976:39: sparse: warning: incorrect type in initializer (different address spaces)
> 
> Thank you for the report.
> 
> The warnings occur because my patch changes scheduler yield functions from
> accessing rq->curr to rq->donor, both of which have identical __rcu annotations.
> These are pre-existing annotation issues in the scheduler code, which has been
> directly accessing RCU-annotated pointers without proper dereferencing, relying
> on runqueue lock protection instead.
> 
> If we do want to address these sparse warnings, I can make modifications like:
> 
> -               curr = rq->donor;
> +               curr = rcu_dereference_protected(rq->donor, lockdep_is_held(&rq->__lock));
> 
> This would have zero runtime overhead while satisfying sparse's RCU checking.
> 
> Peter, let me know if these warnings should be addressed.

Nah, I'm happy to ignore them to retain readable code :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ