Skip to content

objtool: CONFIG_OBJTOOL_WERROR fixes and cleanups

Josh Poimboeuf linux-nvme lkml 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest22 patches 18 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/22objtool: Fix detection of consecutive jump tablestools/objtool/check.c tools/objtool/elf.c tools/objtool/include/objtool/elf.h+37 -220 replies
2/22objtool: Warn when disabling unreachable warningstools/objtool/arch/x86/special.c+4 -10 replies
3/22objtool: Ignore entire functions rather than instructionstools/objtool/check.c tools/objtool/include/objtool/elf.h+19 -170 replies
4/22objtool: Fix X86_FEATURE_SMAP alternative handlingarch/x86/include/asm/arch_hweight.h arch/x86/include/asm/smap.h arch/x86/include/asm/xen/hypercall.h +5 more+39 -890 replies
5/22objtool: Fix CONFIG_OBJTOOL_WERROR for vmlinux.oscripts/Makefile.vmlinux_o+11 -30 replies
6/22objtool: Fix init_module() handlingtools/objtool/check.c+5 -20 replies
7/22objtool: Silence more KCOV warningstools/objtool/check.c+6 -00 replies
8/22objtool: Properly disable uaccess validationtools/objtool/check.c+9 -20 replies
9/22objtool: Improve error handlingtools/objtool/builtin-check.c tools/objtool/check.c tools/objtool/elf.c +3 more+233 -2220 replies
10/22objtool: Reduce CONFIG_OBJTOOL_WERROR verbosityscripts/Makefile.lib tools/objtool/builtin-check.c tools/objtool/check.c +1 more+73 -710 replies
11/22objtool: Fix up some outdated references to ENTRY/ENDPROCinclude/linux/linkage.h include/linux/objtool.h tools/objtool/Documentation/objtool.txt+6 -100 replies
12/22objtool: Remove --no-unreachable for noinstr-only vmlinux.o runsscripts/Makefile.vmlinux_o+0 -10 replies
13/22objtool: Remove redundant opts.noinstr dependencytools/objtool/check.c+1 -60 replies
14/22spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()drivers/spi/spi-amd.c+1 -11 reply
15/22nvmet: Fix out-of-bounds stack access in nvmet_ctrl_state_show()drivers/nvme/target/debugfs.c+1 -11 reply
16/22media: dib8000: Prevent divide-by-zero in dib8000_set_dds()drivers/media/dvb-frontends/dib8000.c+4 -12 replies
17/22panic: Disable SMAP in __stack_chk_fail()kernel/panic.c tools/objtool/check.c+10 -10 replies
18/22Input: cyapa - remove undefined behavior in cyapa_update_fw_store()drivers/input/mouse/cyapa.c+2 -20 replies
19/22ASoC: codecs: wcd934x: Remove undefined behavior in wcd934x_slim_irq_handler()sound/soc/codecs/wcd934x.c+1 -13 replies
20/22regulator: rk808: Remove undefined behavior in rk806_set_mode_dcdc()drivers/regulator/rk808-regulator.c+2 -21 reply
21/22pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()drivers/pwm/pwm-mediatek.c+6 -29 replies
22/22lkdtm: Obfuscate do_nothing() pointerdrivers/misc/lkdtm/perms.c+11 -31 reply

Reviews trailers per patch

5 of 22 patches have a Reviewed-by or Acked-by.

PatchMark BrownKees CookChaitanya Kulkarni
1/22
2/22
3/22
4/22
5/22
6/22
7/22
8/22
9/22
10/22
11/22
12/22
13/22
14/22A-b
15/22R-b
16/22
17/22
18/22
19/22A-b
20/22A-b
21/22
22/22R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/22] objtool: CONFIG_OBJTOOL_WERROR fixes and cleanups

Since CONFIG_OBJTOOL_WERROR got merged into -tip, a lot of warnings have been reported. Fix those along with several other improvements.

Cc Raju Rangoju <[email protected]>
CC Mark Brown <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Sagi Grimberg <[email protected]>
Cc Chaitanya Kulkarni <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Dmitry Torokhov <[email protected]>
Cc Srinivas Kandagatla <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Kees Cook <[email protected]>

Josh Poimboeuf (22):
objtool: Fix detection of consecutive jump tables
objtool: Warn when disabling unreachable warnings
objtool: Ignore entire functions rather than instructions
objtool: Fix X86_FEATURE_SMAP alternative handling
objtool: Fix CONFIG_OBJTOOL_WERROR for vmlinux.o
objtool: Fix init_module() handling
objtool: Silence more KCOV warnings
objtool: Properly disable uaccess validation
objtool: Improve error handling
objtool: Reduce CONFIG_OBJTOOL_WERROR verbosity
objtool: Fix up some outdated references to ENTRY/ENDPROC
objtool: Remove --no-unreachable for noinstr-only vmlinux.o runs
objtool: Remove redundant opts.noinstr dependency
spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()
nvmet: Fix out-of-bounds stack access in nvmet_ctrl_state_show()
media: dib8000: Prevent divide-by-zero in dib8000_set_dds()
panic: Disable SMAP in __stack_chk_fail()
Input: cyapa - remove undefined behavior in cyapa_update_fw_store()
ASoC: codecs: wcd934x: Remove undefined behavior in

    wcd934x_slim_irq_handler()

regulator: rk808: Remove undefined behavior in rk806_set_mode_dcdc()
pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()
lkdtm: Obfuscate do_nothing() pointer

 arch/x86/include/asm/arch_hweight.h     |   8 +-
 arch/x86/include/asm/smap.h             |  23 +-
 arch/x86/include/asm/xen/hypercall.h    |   6 +-
 drivers/input/mouse/cyapa.c             |   4 +-
 drivers/media/dvb-frontends/dib8000.c   |   5 +-
 drivers/misc/lkdtm/perms.c              |  14 +-
 drivers/nvme/target/debugfs.c           |   2 +-
 drivers/pwm/pwm-mediatek.c              |   8 +-
 drivers/regulator/rk808-regulator.c     |   4 +-
 drivers/spi/spi-amd.c                   |   2 +-
 include/linux/linkage.h                 |   4 -
 include/linux/objtool.h                 |   2 +-
 kernel/panic.c                          |   6 +
 scripts/Makefile.lib                    |   2 +-
 scripts/Makefile.vmlinux_o              |  15 +-
 sound/soc/codecs/wcd934x.c              |   2 +-
 tools/objtool/Documentation/objtool.txt |  10 +-
 tools/objtool/arch/x86/special.c        |  38 +-
 tools/objtool/builtin-check.c           | 146 ++++---
 tools/objtool/check.c                   | 525 ++++++++++++------------
 tools/objtool/elf.c                     |  28 +-
 tools/objtool/include/objtool/builtin.h |   6 +-
 tools/objtool/include/objtool/check.h   |   3 +-
 tools/objtool/include/objtool/elf.h     |  28 +-
 tools/objtool/include/objtool/objtool.h |   2 +-
 tools/objtool/include/objtool/special.h |   4 +-
 tools/objtool/include/objtool/warn.h    |  13 +-
 tools/objtool/objtool.c                 |  11 +-
 tools/objtool/special.c                 |  12 +-
 29 files changed, 477 insertions(+), 456 deletions(-)
Signature · 1 line
2.48.1