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: <ZwcT149jx-iOmEfl@surfacebook.localdomain>
Date: Thu, 10 Oct 2024 02:37:59 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
	"H. Peter Anvin" <hpa@...or.com>,
	Nathan Chancellor <nathan@...nel.org>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>
Subject: Re: [PATCH v2 1/1] x86/reboot: KVM: Guard
 nmi_shootdown_cpus_on_restart() with ifdeffery

Wed, Oct 09, 2024 at 12:34:37PM -0700, Sean Christopherson kirjoitti:
> On Tue, Oct 08, 2024, Andy Shevchenko wrote:
> > The nmi_shootdown_cpus_on_restart() in some cases may be not used.
> > This, in particular, prevents kernel builds with clang, `make W=1`
> > and CONFIG_WERROR=y:
> > 
> > arch/x86/kernel/reboot.c:957:20: error: unused function 'nmi_shootdown_cpus_on_restart' [-Werror,-Wunused-function]
> >   957 | static inline void nmi_shootdown_cpus_on_restart(void)
> >       |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 
> > Fix this by guarging the definitions with the respective KVM ifdeffery.
> > 
> > See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static
> > inline functions for W=1 build").

> Heh, I tried fixing this too, and have patches to clean things up, but I ended up
> not posting them because I decided the W=1 warning was less ugly than the resulting
> code in nmi_shootdown_cpus().

CONFIG_WERROR=y is the default (at least in the current defconfigs for x86).
My goal is to match what ARM builds survive (to some extend?), i.e. W=1, so
may one apply either version I provided or yours?

> If we're willing to take on a bit of weirdness in nmi_shootdown_cpus(), then much
> of the #ifdeffery can go away.  Patches attached (lightly tested).

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ