Skip to content

kbuild: upgrade the orphan section warning to an error if CONFIG_WERROR is set

Xin Li linux-kbuild lkml llvm 2 versions – Applied

Status from this message: Applied to for-next/hardening, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest1 patch 1 replyApplied
  2. v11 patch 3 repliesSuperseded

Changes in v2 from the cover letter

* Introduce a new Kconfig item CONFIG_LD_ORPHAN_WARN_LEVEL to replace (if $(CONFIG_WERROR),error,warn) (Nathan Chancellor).

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/1kbuild: upgrade the orphan section warning to an error if CONFIG_WERROR is setMakefile arch/arm/boot/compressed/Makefile arch/arm64/kernel/vdso/Makefile +3 more+17 -80 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchNathan Chancellor
1/1R-b T-b

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

Read the v2 thread

Cover letter [PATCH v2 0/1] kbuild: upgrade the orphan section warning to an error if CONFIG_WERROR is set

Andrew Cooper suggested upgrading the orphan section warning to a hard link error. However Nathan Chancellor said outright turning the warning into an error with no escape hatch might be too aggressive, as we have had these warnings triggered by new compiler generated sections, and suggested turning orphan sections into an error only if CONFIG_WERROR is set. Kees Cook echoed and emphasized that the mandate from Linus is that we should avoid breaking builds. It wrecks bisection, it causes problems across compiler versions, etc.

Change since v1:
* Introduce a new Kconfig item CONFIG_LD_ORPHAN_WARN_LEVEL to replace (if $(CONFIG_WERROR),error,warn) (Nathan Chancellor).

Xin Li (1):
kbuild: upgrade the orphan section warning to an error if
CONFIG_WERROR is set

 Makefile                          |  2 +-
 arch/arm/boot/compressed/Makefile |  2 +-
 arch/arm64/kernel/vdso/Makefile   |  2 +-
 arch/arm64/kernel/vdso32/Makefile |  2 +-
 arch/x86/boot/compressed/Makefile |  2 +-
 init/Kconfig                      | 15 ++++++++++++---
 6 files changed, 17 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1