[PATCH] D156549: [RISCV] Implement shadow stack with Zicfiss.

Yeting Kuo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 08:25:11 PDT 2023


fakepaper56 created this revision.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
fakepaper56 requested review of this revision.
Herald added subscribers: llvm-commits, wangpc, eopXD, MaskRay.
Herald added a project: LLVM.

The patch only implements shadow stack on shadow stack mode [0]. Using shadow stack
mode means that programs still store the return address to regular address.
Control stack mode, the another mode operated by shadow stack is to avoid store
the return address to regular stack.

[0]: https://github.com/riscv/riscv-cfi/blob/main/cfi_backward.adoc#push-to-and-pop-from-the-shadow-stack


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156549

Files:
  llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
  llvm/test/CodeGen/RISCV/shadowcallstack.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156549.545174.patch
Type: text/x-patch
Size: 7733 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230728/ce205493/attachment.bin>


More information about the llvm-commits mailing list