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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250812121545-f00f588b-2239-4d96-baeb-55cbf4914556@linutronix.de>
Date: Tue, 12 Aug 2025 12:25:05 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Nathan Chancellor <nathan@...nel.org>, 
	Nicolas Schier <nicolas.schier@...ux.dev>, Miguel Ojeda <ojeda@...nel.org>, 
	Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, 
	Björn Roy Baron <bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>, 
	Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>, 
	Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>, linux-kbuild@...r.kernel.org, 
	linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH 0/2] kbuild: enable CONFIG_WERROR for more build steps

Hi Miguel,

On Tue, Aug 12, 2025 at 11:21:24AM +0200, Miguel Ojeda wrote:
> On Tue, Aug 12, 2025 at 7:31 AM Thomas Weißschuh
> <thomas.weissschuh@...utronix.de> wrote:
> >
> > CONFIG_WERROR is useful for all build steps, not only compilation of C and
> > Rust sources linked into the kernel.
> >
> > Also enable it for assembler and linker invocations, userprogs, as well as
> > C and Rust hostprogs.
> >
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> 
> The Rust part is:
> 
>     https://lore.kernel.org/rust-for-linux/20240519211235.589325-1-ojeda@kernel.org/

Thanks for the pointer. We can keep the logic in Makefile.extrawarn.
But adding FLAGS-y machinery for all of the flags will be a bit noisy.
Having one ifdef CONFIG_WERROR around everything is much easier to read.

> However, Masahiro back then mentioned that we shouldn't make the C
> host flags depend on `WERROR` since `HOSTCC` builds Kconfig and, for
> consistency, not for Rust host progs either:
> 
>     https://lore.kernel.org/rust-for-linux/CAK7LNATPx2wTEM=KDmGtcH8vVTB4suOhh-CUQKP54F8wtPWDiw@mail.gmail.com/

That does make sense.

> Perhaps it could make sense to explicitly exclude certain bits, like
> Kconfig, from `WERROR`, and apply it for everything else instead.

The users will still pass -Werror explicitly, we can't filter that out.

Let's skip hostprogs for now. Another possibility would be to use -Werror
for hostprogs unconditionally. Various tools/ are doing that for example.


Thomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ