This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Implement shadow stack with Zicfiss.
Needs ReviewPublic

Authored by fakepaper56 on Jul 28 2023, 8:25 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

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

Diff Detail