[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z9YeR20Vua8GQIiW@gmail.com>
Date: Sun, 16 Mar 2025 01:41:43 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Brendan Jackman <jackmanb@...gle.com>,
Nathan Chancellor <nathan@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 13/13] objtool: Add CONFIG_OBJTOOL_WERROR
* Josh Poimboeuf <jpoimboe@...nel.org> wrote:
> Objtool warnings can be indicative of crashes, broken live patching, or
> even boot failures. Ignoring them is not recommended.
>
> Add CONFIG_OBJTOOL_WERROR to upgrade objtool warnings to errors by
> enabling the objtool --Werror option. Also set --backtrace to print the
> branches leading up to the warning, which can help considerably when
> debugging certain warnings.
>
> To avoid breaking bots too badly for now, make it the default for real
> world builds only (!COMPILE_TEST).
>
> Co-developed-by: Brendan Jackman <jackmanb@...gle.com>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
> ---
> lib/Kconfig.debug | 12 ++++++++++++
> scripts/Makefile.lib | 1 +
> 2 files changed, 13 insertions(+)
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 35796c290ca3..bbfb9d575f97 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -545,6 +545,18 @@ config FRAME_POINTER
> config OBJTOOL
> bool
>
> +config OBJTOOL_WERROR
> + bool "Upgrade objtool warnings to errors"
> + default y
> + depends on OBJTOOL && !COMPILE_TEST
> + help
> + Fail the build on objtool warnings.
This is *way* too aggressive: objtool false positives are still common,
and an 'allmodconfig' should not fail the build IMO.
Thanks,
Ingo
Powered by blists - more mailing lists