Skip to content

Fail the build on objtool warnings

Josh Poimboeuf lkml 1 version Applied

Status from this message: The following commit has been merged into the objtool/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 40 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/13x86/traps: Make exc_double_fault() consistently noreturnarch/x86/kernel/traps.c tools/objtool/check.c+18 -312 replies
2/13objtool: Fix error handling inconsistencies in check()tools/objtool/check.c+6 -42 replies
3/13objtool: Improve __noreturn annotation warningtools/objtool/Documentation/objtool.txt tools/objtool/check.c+6 -82 replies
4/13objtool: Update documentationtools/objtool/Documentation/objtool.txt+53 -422 replies
5/13objtool: Increase per-function WARN_FUNC() rate limittools/objtool/check.c tools/objtool/include/objtool/elf.h tools/objtool/include/objtool/warn.h+13 -53 replies
6/13objtool: Remove --unret dependency on --rethunktools/objtool/builtin-check.c+0 -54 replies
7/13objtool: Consolidate option validationtools/objtool/builtin-check.c+24 -442 replies
8/13objtool: Upgrade "Linked object detected" warning to errortools/objtool/builtin-check.c+2 -22 replies
9/13objtool: Add --output optiontools/objtool/builtin-check.c tools/objtool/elf.c tools/objtool/include/objtool/builtin.h +2 more+89 -352 replies
10/13objtool: Add --Werror optiontools/objtool/builtin-check.c tools/objtool/check.c tools/objtool/include/objtool/builtin.h+14 -31 reply
11/13objtool: Change "warning:" to "error:" for --Werrortools/objtool/include/objtool/warn.h+4 -22 replies
12/13objtool: Create backup on error and print argstools/objtool/builtin-check.c tools/objtool/include/objtool/builtin.h tools/objtool/objtool.c+65 -672 replies
13/13objtool: Add CONFIG_OBJTOOL_WERRORlib/Kconfig.debug scripts/Makefile.lib+13 -014 replies

Reviews trailers per patch

9 of 13 patches have a Reviewed-by or Acked-by.

PatchBrendan JackmanMiroslav Benes
1/13R-b R-b
2/13R-b R-b
3/13
4/13
5/13
6/13
7/13R-b R-b
8/13R-b
9/13R-b
10/13R-b
11/13R-b R-b
12/13R-b
13/13R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/13] Fail the build on objtool warnings

Add an option to fail the build on objtool warnings, and enable it by default except for CONFIG_COMPILE_TEST.

This is long overdue, probably the only reason we didn't do it before (other than lack of time) was because there are still some obscure warnings out there, especially once KCOV and sanitizers get added to the mix.

But those are mostly bot issues, the main concern for objtool warnings is actual real live kernels. Hopefully the !COMPILE_TEST guard will avoid too much wreckage for now.

Josh Poimboeuf (13):
x86/traps: Make exc_double_fault() consistently noreturn
objtool: Fix error handling inconsistencies in check()
objtool: Improve __noreturn annotation warning
objtool: Update documentation
objtool: Increase per-function WARN_FUNC() rate limit
objtool: Remove --unret dependency on --rethunk
objtool: Consolidate option validation
objtool: Upgrade "Linked object detected" warning to error
objtool: Add --output option
objtool: Add --Werror option
objtool: Change "warning:" to "error:" for --Werror
objtool: Create backup on error and print args
objtool: Add CONFIG_OBJTOOL_WERROR

 arch/x86/kernel/traps.c                 |  18 +-
 lib/Kconfig.debug                       |  12 ++
 scripts/Makefile.lib                    |   1 +
 tools/objtool/Documentation/objtool.txt | 105 ++++++------
 tools/objtool/builtin-check.c           | 212 ++++++++++++++++++------
 tools/objtool/check.c                   |  60 +++----
 tools/objtool/elf.c                     |   3 -
 tools/objtool/include/objtool/builtin.h |   3 +-
 tools/objtool/include/objtool/elf.h     |   2 +-
 tools/objtool/include/objtool/warn.h    |  20 ++-
 tools/objtool/objtool.c                 |  78 +--------
 tools/objtool/orc_dump.c                |   7 +-
 12 files changed, 290 insertions(+), 231 deletions(-)
Signature · 1 line
2.48.1