[all-commits] [llvm/llvm-project] 3b1486: [ModuleUtils][KCFI] Set !kcfi_type metadata for sa...

Sami Tolvanen via All-commits all-commits at lists.llvm.org
Thu Dec 8 16:27:17 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b14862f0a968dc079530acbce4f2ca4aa7c1492
      https://github.com/llvm/llvm-project/commit/3b14862f0a968dc079530acbce4f2ca4aa7c1492
  Author: Sami Tolvanen <samitolvanen at google.com>
  Date:   2022-12-09 (Fri, 09 Dec 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/ModuleUtils.cpp
    A llvm/test/Instrumentation/AddressSanitizer/kcfi.ll

  Log Message:
  -----------
  [ModuleUtils][KCFI] Set !kcfi_type metadata for sanitizer constructors

Set KCFI type metadata for the sanitizer constructors to prevent
runtime failures when these functions are indirectly called in
instrumented code. This fixes a compatibility issue with KASAN and
-fsanitize=kcfi in the Linux kernel.

Link: https://github.com/ClangBuiltLinux/linux/issues/1742

Reviewed By: nickdesaulniers, MaskRay

Differential Revision: https://reviews.llvm.org/D138945




More information about the All-commits mailing list