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: <ZzNx4D5lWVhTG7bk@smile.fi.intel.com>
Date: Tue, 12 Nov 2024 17:18:56 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Valentin Schneider <vschneid@...hat.com>
Cc: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	llvm@...ts.linux.dev, Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Juri Lelli <juri.lelli@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Nathan Chancellor <nathan@...nel.org>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>
Subject: Re: [PATCH v1 1/1] sched/fair: Mark cfs_bandwidth_used() and
 m*_vruntime() with __maybe_unused

On Tue, Nov 12, 2024 at 12:48:42PM +0100, Valentin Schneider wrote:
> On 05/09/24 20:12, Andy Shevchenko wrote:
> > When cfs_bandwidth_used() is unused, it prevents kernel builds
> > with clang, `make W=1` and CONFIG_WERROR=y:
> >
> > kernel/sched/fair.c:526:19: error: unused function 'max_vruntime' [-Werror,-Wunused-function]
> >   526 | static inline u64 max_vruntime(u64 max_vruntime, u64 vruntime)
> >       |                   ^~~~~~~~~~~~
> > kernel/sched/fair.c:6580:20: error: unused function 'cfs_bandwidth_used' [-Werror,-Wunused-function]
> >  6580 | static inline bool cfs_bandwidth_used(void)
> >       |                    ^~~~~~~~~~~~~~~~~~
> >
> > Fix this by marking them with __maybe_unused (all cases for the sake of
> > symmetry).
> >
> 
> I assume that's with CONFIG_CFS_BANDWIDTH=n? Looks like
> cfs_bandwidth_used() uses are tucked away under helpers that themselves
> only really do something for CONFIG_CFS_BANDWIDTH=y, so you could remove
> the CONFIG_CFS_BANDWIDTH=n definition of cfs_bandwidth_used() directly.

Thanks for looking into this!

> This compiles:

okay, consider then my patch as a report. Can you submit your version as you
seems much more familiar with this code than me?

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ