diff options
author | Sami Tolvanen <samitolvanen@google.com> | 2023-06-23 00:11:42 +0000 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-06-25 23:12:20 +0900 |
commit | ddf56288eebd1fe82c46fc9f693b5b18045cddb6 (patch) | |
tree | 6c8cac7a8c376f29d26c8cfb8d3fb2010d1a4012 /scripts/Makefile.modfinal | |
parent | 3602906019a68c340b69991bb4020e10374fb0d0 (diff) |
kbuild: Fix CFI failures with GCOV
With GCOV_PROFILE_ALL, Clang injects __llvm_gcov_* functions to
each object file, and the functions are indirectly called during
boot. However, when code is injected to object files that are not
part of vmlinux.o, it's also not processed by objtool, which breaks
CFI hash randomization as the hashes in these files won't be
included in the .cfi_sites section and thus won't be randomized.
Similarly to commit 42633ed852de ("kbuild: Fix CFI hash
randomization with KASAN"), disable GCOV for .vmlinux.export.o and
init/version-timestamp.o to avoid emitting unnecessary functions to
object files that don't otherwise have executable code.
Fixes: 0c3e806ec0f9 ("x86/cfi: Add boot time hash randomization")
Reported-by: Joe Fradley <joefradley@google.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/Makefile.modfinal')
0 files changed, 0 insertions, 0 deletions