[PATCH] D113685: [IR] Define "ptrauth" operand bundle.

Ahmed Bougacha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 09:08:21 PST 2021


ab created this revision.
ab added reviewers: apazos, kristof.beyls, bruno, pcc, rjmccall, t.p.northover.
ab added a project: LLVM.
Herald added subscribers: dexonsmith, jdoerfert, laytonio, hiraditya.
ab requested review of this revision.

Building on D90868 <https://reviews.llvm.org/D90868>, this introduces a new "ptrauth" operand bundle to be used in call/invoke.  At the IR level, it's semantically equivalent to an `@llvm.ptrauth.auth` followed by an indirect call, but it additionally provides hardening guarantees, by preventing the intermediate raw pointer from being exposed.

This mostly adds the IR definition, verifier checks, and support in a couple of general helper functions.  clang IRGen and backend support will come separately.

Note that we'll eventually want to support this bundle in `indirectbr` as well, for similar reasons.  `indirectbr` currently doesn't allow bundles at all, and the IR data structures need some rejiggering.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113685

Files:
  llvm/docs/LangRef.rst
  llvm/docs/PointerAuth.md
  llvm/include/llvm/IR/InstrTypes.h
  llvm/include/llvm/IR/LLVMContext.h
  llvm/lib/IR/Instructions.cpp
  llvm/lib/IR/LLVMContext.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
  llvm/test/Bitcode/operand-bundles-bc-analyzer.ll
  llvm/test/Transforms/TailCallElim/ptrauth-bundle.ll
  llvm/test/Verifier/ptrauth-operand-bundles.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113685.386535.patch
Type: text/x-patch
Size: 10513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211111/038f7fb0/attachment.bin>


More information about the llvm-commits mailing list