[all-commits] [llvm/llvm-project] a78cfd: [GCOV] Set !kcfi_type metadata for indirectly call...
Sami Tolvanen via All-commits
all-commits at lists.llvm.org
Wed Jan 11 15:05:13 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a78cfd5909024f9daa9a5175e9d411b0fac0e9a1
https://github.com/llvm/llvm-project/commit/a78cfd5909024f9daa9a5175e9d411b0fac0e9a1
Author: Sami Tolvanen <samitolvanen at google.com>
Date: 2023-01-11 (Wed, 11 Jan 2023)
Changed paths:
M llvm/include/llvm/Transforms/Utils/ModuleUtils.h
M llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
M llvm/lib/Transforms/Utils/ModuleUtils.cpp
A llvm/test/Transforms/GCOVProfiling/kcfi.ll
Log Message:
-----------
[GCOV] Set !kcfi_type metadata for indirectly called functions
With CONFIG_GCOV_KERNEL, the Linux kernel indirectly calls the
__llvm_gcov_* functions generated by LLVM. With -fsanitize=kcfi,
these calls are made from instrumented code and fail indirect
call checks as they don't have !kcfi_type metadata. Similarly
to D138945, set type metadata for these functions to allow GCOV
and KCFI to be both enabled.
Link: https://github.com/ClangBuiltLinux/linux/issues/1778
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D141444
More information about the All-commits
mailing list