public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] objtool: Add option to fail build on vmlinux warnings
@ 2025-01-13 14:05 Brendan Jackman
  2025-01-13 14:05 ` [PATCH v3 1/2] objtool: Add --Werror Brendan Jackman
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Brendan Jackman @ 2025-01-13 14:05 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Andrew Morton, Masahiro Yamada,
	Nathan Chancellor, Nicolas Schier
  Cc: linux-kernel, linux-kbuild, Brendan Jackman

This adds an option to objtool to exit with an error when it enounters
warnings.

Then, it adds a config to enable that flag. This enables you to fail
the build e.g. when noinstr is violated.

When that happens, you also get a more verbose log, for example when
failing noisntr validation it dumps disassembly of the offending code.

Signed-off-by: Brendan Jackman <jackmanb@google.com>
---
Changes in v3:
- Added --verbose to objtool args (equivalent to OBJTOOL_VERBOSE=1, which
  Josh Poimboeuf suggested).
- Link to v2: https://lore.kernel.org/r/20241218-objtool-strict-v2-0-a5297c961434@google.com

Changes in v2:
- Renamed flag/config to -Werror/CONFIG_*_WERROR
- Applied to all objool runs instead of just vmlinux.
- Link to v1: https://lore.kernel.org/r/20241213-objtool-strict-v1-0-fd388f9d971f@google.com

---
Brendan Jackman (2):
      objtool: Add --Werror
      kbuild: Add option to fail build on vmlinux objtool issues

 lib/Kconfig.debug                       | 10 ++++++++++
 scripts/Makefile.lib                    |  1 +
 tools/objtool/builtin-check.c           |  6 ++++++
 tools/objtool/check.c                   |  7 ++-----
 tools/objtool/include/objtool/builtin.h |  1 +
 5 files changed, 20 insertions(+), 5 deletions(-)
---
base-commit: 5bc55a333a2f7316b58edc7573e8e893f7acb532
change-id: 20241213-objtool-strict-cb9a0a75139e

Best regards,
-- 
Brendan Jackman <jackmanb@google.com>


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-02-07 21:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 14:05 [PATCH v3 0/2] objtool: Add option to fail build on vmlinux warnings Brendan Jackman
2025-01-13 14:05 ` [PATCH v3 1/2] objtool: Add --Werror Brendan Jackman
2025-01-14 17:24   ` Nathan Chancellor
2025-01-14 18:17     ` Josh Poimboeuf
2025-01-13 14:05 ` [PATCH v3 2/2] kbuild: Add option to fail build on vmlinux objtool issues Brendan Jackman
2025-01-14  0:14 ` [PATCH v3 0/2] objtool: Add option to fail build on vmlinux warnings Josh Poimboeuf
2025-01-30 15:55   ` Brendan Jackman
2025-01-30 18:30     ` Nathan Chancellor
2025-01-31 10:44       ` Brendan Jackman
2025-01-31 20:49         ` Nathan Chancellor
2025-02-06 15:05           ` Brendan Jackman
2025-02-06 17:10             ` Nathan Chancellor
2025-02-07  2:51               ` Josh Poimboeuf
2025-02-07 10:16                 ` Brendan Jackman
2025-02-07 21:41                 ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox