[PATCH] D124211: Add __builtin_call_kcfi_unchecked

Sami Tolvanen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 21 15:49:29 PDT 2022


samitolvanen created this revision.
samitolvanen added reviewers: aaron.ballman, pcc, nickdesaulniers, ardb, kees, joaomoreira.
Herald added a project: All.
samitolvanen requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

With `-fsanitize=kcfi`, disabling indirect call checking using
the `no_sanitize` attribute is not fine-grained enough in cases
where we want to disable checking only for specific calls. The
`__builtin_call_kcfi_unchecked` builtin accepts an indirect call
expression and emits the call without KCFI type checking.

Depends on D119296 <https://reviews.llvm.org/D119296>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124211

Files:
  clang/docs/LanguageExtensions.rst
  clang/include/clang/AST/Expr.h
  clang/include/clang/AST/Stmt.h
  clang/include/clang/Basic/Builtins.def
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/Sema/SemaChecking.cpp
  clang/test/CodeGen/builtin-call-kcfi-unchecked.cpp
  clang/test/SemaCXX/builtins.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124211.424321.patch
Type: text/x-patch
Size: 9947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220421/09ef998e/attachment.bin>


More information about the cfe-commits mailing list