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] [day] [month] [year] [list]
Message-ID: <20250114181731.tin4imlrrkrfuerx@jpoimboe>
Date: Tue, 14 Jan 2025 10:17:31 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Brendan Jackman <jackmanb@...gle.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Masahiro Yamada <masahiroy@...nel.org>,
	Nicolas Schier <nicolas@...sle.eu>, linux-kernel@...r.kernel.org,
	linux-kbuild@...r.kernel.org
Subject: Re: [PATCH v3 1/2] objtool: Add --Werror

On Tue, Jan 14, 2025 at 10:24:29AM -0700, Nathan Chancellor wrote:
> 
> It might be a good idea to print a message here about why the build is
> failing, in lieu of turning all "objtool: warning:" messages into
> "objtool: error:" messages ala -Werror for C compilers, which does not
> seem simple on quick glance. Otherwise, I am not entirely sure it will
> be obvious to people why a build like allmodconfig may start failing if
> this configuration gets turned on.
> 
> https://lore.kernel.org/Z4X8j%2FqJj7ib0vkh@rli9-mobl/

Yeah, makes sense.  I'll add this:

From: Josh Poimboeuf <jpoimboe@...nel.org>
Subject: [PATCH] objtool: Change "warning:" to "error:" for CONFIG_OBJTOOL_WERROR

This matches GCC's behavior and makes it more obvious why the build
failed.

Suggested-by: Nathan Chancellor <nathan@...nel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
---
 tools/objtool/include/objtool/warn.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/objtool/include/objtool/warn.h b/tools/objtool/include/objtool/warn.h
index ac04d3fe4dd9..78f602b5daed 100644
--- a/tools/objtool/include/objtool/warn.h
+++ b/tools/objtool/include/objtool/warn.h
@@ -43,8 +43,10 @@ static inline char *offstr(struct section *sec, unsigned long offset)
 
 #define WARN(format, ...)				\
 	fprintf(stderr,					\
-		"%s: warning: objtool: " format "\n",	\
-		objname, ##__VA_ARGS__)
+		"%s: %s: objtool: " format "\n",	\
+		objname,				\
+		opts.werror ? "error" : "warning",	\
+		##__VA_ARGS__)
 
 #define WARN_FUNC(format, sec, offset, ...)		\
 ({							\
-- 
2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ