Skip to contentSkip to conversation

clang-lto (part 2) for v5.12-rc1

GIT PULL Merged Kees Cook 2 participants 2 messages Feb 23, 2021 – Feb 24, 2021

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

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/[email protected]/
[2] https://lore.kernel.org/lkml/[email protected]/

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(-)
Signature · 1 line
Kees Cook
merge bot Merged
#1 lore raw
The pull request you sent on Tue, 23 Feb 2021 14:32:23 -0800:

The pull request you sent on Tue, 23 Feb 2021 14:32:23 -0800:

Quoted 1 line

https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/clang-lto-v5.12-rc1-part2

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/414eece95b98b209cef0f49cfcac108fd00b8ced

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html