[PATCH] D84414: [RISCV] Support Shadow Call Stack

Z. Zheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 24 11:04:58 PDT 2020


zzheng added a comment.

In D84414#2234112 <https://reviews.llvm.org/D84414#2234112>, @lenary wrote:

> Why do we have to pass `-ffixed-x18` when compiling? Is it enough to just reserve `x18` whenever the function has the shadow call stack attribute?

When SCS is on, x18 must be preserved across calls. Given it's a callee-saved, value in x18 is preserved by functions that do not have SCS attribute.

However, saving x18 on stack risks leaking SCS's location in memory, making the defense useless.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84414/new/

https://reviews.llvm.org/D84414



More information about the cfe-commits mailing list