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

2020-09-17 Thread Z. Zheng via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1c466477ad46: [RISCV] Support Shadow Call Stack (authored by zzheng). Changed prior to commit: https://reviews.llvm.org/D84414?vs=292378&id=292651

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

2020-09-16 Thread Z. Zheng via Phabricator via cfe-commits
zzheng updated this revision to Diff 292378. zzheng marked 2 inline comments as done. zzheng added a comment. Fixed comment and lint Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84414/new/ https://reviews.llvm.org/D84414 Files: clang/lib/Driver

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

2020-09-16 Thread Z. Zheng via Phabricator via cfe-commits
zzheng marked 2 inline comments as done. zzheng added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:60 + // sw ra, 0(s2) + // addi s2, s2, 4 + BuildMI(MBB, MI, DL, TII->get(IsRV64 ? RISCV::SD : RISCV::SW)) jrtc27 wrote: > Is it in

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

2020-09-16 Thread Z. Zheng via Phabricator via cfe-commits
zzheng updated this revision to Diff 292372. zzheng marked 9 inline comments as done. zzheng added a comment. Addressed comments by @jrtc27 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84414/new/ https://reviews.llvm.org/D84414 Files: clang/lib

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

2020-09-16 Thread Z. Zheng via Phabricator via cfe-commits
zzheng updated this revision to Diff 292274. zzheng added a comment. rebase & ping.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84414/new/ https://reviews.llvm.org/D84414 Files: clang/lib/Driver/SanitizerArgs.cpp clang/lib/Driver/ToolChain.

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

2020-09-03 Thread Z. Zheng via Phabricator via cfe-commits
zzheng added a comment. ping.. @jrt, @lenary, @asb, IMHO, the patch is in good shape now, all concerns raised in comments has been addressed/answered, is there any additional comments before we can land it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

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

2020-08-25 Thread Z. Zheng via Phabricator via cfe-commits
zzheng added a comment. In D84414#2234267 , @lenary wrote: > Ok, so any compilation units without `-fsanitize=shadow-call-stack` should be > compiled with `-ffixed-x18` if you want to link those together. That is > reasonable. My question was whether we

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

2020-08-24 Thread Z. Zheng via Phabricator via cfe-commits
zzheng added a comment. In 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

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

2020-08-24 Thread Z. Zheng via Phabricator via cfe-commits
zzheng updated this revision to Diff 287428. zzheng added a comment. Rebased & ping... IMHO, the patch is in good shape. As we discussed in the bi-weekly meetings, RV32E only has 16 registers. Systems based on RV32E may have limited memory as well. Besides, LLVM does not have full support for R

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

2020-07-28 Thread Z. Zheng via Phabricator via cfe-commits
zzheng updated this revision to Diff 281377. zzheng added a comment. rebased.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84414/new/ https://reviews.llvm.org/D84414 Files: clang/lib/Driver/SanitizerArgs.cpp clang/lib/Driver/ToolChain.cpp

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

2020-07-27 Thread Z. Zheng via Phabricator via cfe-commits
zzheng updated this revision to Diff 281062. zzheng added a comment. clang-formatted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84414/new/ https://reviews.llvm.org/D84414 Files: clang/lib/Driver/SanitizerArgs.cpp clang/lib/Driver/ToolChain

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

2020-07-27 Thread Z. Zheng via Phabricator via cfe-commits
zzheng marked 2 inline comments as done. zzheng added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:33-37 + std::vector &CSI = MF.getFrameInfo().getCalleeSavedInfo(); + if (std::none_of(CSI.begin(), CSI.end(), [](CalleeSavedInfo &CSR) { +retu

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

2020-07-27 Thread Z. Zheng via Phabricator via cfe-commits
zzheng updated this revision to Diff 281038. zzheng marked 7 inline comments as done. zzheng edited the summary of this revision. zzheng added a comment. Addressed styling & code clarity issues. Fixed wrong opcode for RV64. Unlike x18 on AArch64, there's no register that should normally be res

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

2020-07-23 Thread Z. Zheng via Phabricator via cfe-commits
zzheng added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:95 + .addReg(RISCV::X18) + .addImm(0); +} apazos wrote: > There are thee things to observe here and other reviewers might have some > additional comments: > > - RIS

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

2020-07-23 Thread Z. Zheng via Phabricator via cfe-commits
zzheng updated this revision to Diff 280210. zzheng marked 3 inline comments as done. zzheng edited the summary of this revision. zzheng added a comment. Using 'BLOCKED' now. clang-formated RISCVFrameLowering.cpp updated style of test/CodeGen/RISCV/shadowcallstack.ll Repository: rG LLVM Gith

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

2020-07-23 Thread Z. Zheng via Phabricator via cfe-commits
zzheng created this revision. zzheng added reviewers: apazos, lenary, asb. Herald added subscribers: cfe-commits, aaron.ballman, evandro, luismarques, sameer.abuasal, pzheng, s.egerton, Jim, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, MaskRay,