[GIT PULL] clang-lto (part 2) for v5.12-rc1
From: Kees Cook
Date: Tue Feb 23 2021 - 17:51:39 EST
Hi Linus,
Please pull this Clang LTO x86 enablement series for v5.12-rc1. Full
disclosure: while this has _not_ been in linux-next (since it initially
looked like the objtool dependencies weren't going to make v5.12), it
has been under daily build and runtime testing by Sami for quite some
time. These x86 portions have been discussed[1] on lkml, with Peter,
Josh, and others helping nail things down[2].
The bulk of the changes are to get objtool working happily. The rest of
the x86 enablement is very small.
Thanks!
-Kees
[1] https://lore.kernel.org/lkml/20201013003203.4168817-26-samitolvanen@xxxxxxxxxx/
[2] https://lore.kernel.org/lkml/cover.1611263461.git.jpoimboe@xxxxxxxxxx/
The following changes since commit 2b8689520520175075ca97bc4eaf51ff3f7253aa:
kbuild: prevent CC_FLAGS_LTO self-bloating on recursive rebuilds (2021-02-17 10:10:37 -0800)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/clang-lto-v5.12-rc1-part2
for you to fetch changes up to 5e95325fbbbdea96de91e7bdb05fe95a3031e37d:
kbuild: lto: force rebuilds when switching CONFIG_LTO (2021-02-23 14:10:44 -0800)
----------------------------------------------------------------
clang-lto for v5.12-rc1 (part2)
- Generate __mcount_loc in objtool (Peter Zijlstra)
- Support running objtool against vmlinux.o (Sami Tolvanen)
- Clang LTO enablement for x86 (Sami Tolvanen)
----------------------------------------------------------------
Peter Zijlstra (1):
objtool: Add a pass for generating __mcount_loc
Sami Tolvanen (10):
objtool: Fix __mcount_loc generation with Clang's assembler
objtool: Don't autodetect vmlinux.o
tracing: add support for objtool mcount
x86, build: use objtool mcount
objtool: Split noinstr validation from --vmlinux
kbuild: lto: postpone objtool
x86, vdso: disable LTO only for vDSO
x86, cpu: disable LTO for cpu.c
x86, build: allow LTO to be selected
kbuild: lto: force rebuilds when switching CONFIG_LTO
Makefile | 10 ++++-
arch/x86/Kconfig | 3 ++
arch/x86/Makefile | 5 +++
arch/x86/entry/vdso/Makefile | 3 +-
arch/x86/power/Makefile | 4 ++
kernel/trace/Kconfig | 13 ++++++
scripts/Makefile.build | 19 +--------
scripts/Makefile.lib | 12 ++++++
scripts/Makefile.modfinal | 19 +++++++--
scripts/link-vmlinux.sh | 28 +++++++++++--
tools/objtool/builtin-check.c | 10 ++---
tools/objtool/builtin.h | 2 +-
tools/objtool/check.c | 97 ++++++++++++++++++++++++++++++++++++++++++-
tools/objtool/check.h | 1 +
tools/objtool/objtool.c | 1 +
tools/objtool/objtool.h | 1 +
16 files changed, 195 insertions(+), 33 deletions(-)
--
Kees Cook