<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/docs/ShadowCallStack.rst, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[Docs] Fix typo in shadow call stack option name (#151474)</title>
<updated>2025-07-31T16:01:23+00:00</updated>
<author>
<name>Venkata Ramanaiah Nalamothu</name>
<email>quic_vnalamot@quicinc.com</email>
</author>
<published>2025-07-31T16:01:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=523b4b0312ccd76d3a94e9b43779b2f6b932c43d'/>
<id>523b4b0312ccd76d3a94e9b43779b2f6b932c43d</id>
<content type='text'>
Fix typo in shadow call stack option name mentioned in
'ShadowCallStack.rst'.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix typo in shadow call stack option name mentioned in
'ShadowCallStack.rst'.</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang][RISCV] Remove forced-sw-shadow-stack (#115355)</title>
<updated>2024-11-08T05:46:27+00:00</updated>
<author>
<name>Jesse Huang</name>
<email>jesse.huang@sifive.com</email>
</author>
<published>2024-11-08T05:46:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3ad640357744890a20494a4943d9a8a94c5b3776'/>
<id>3ad640357744890a20494a4943d9a8a94c5b3776</id>
<content type='text'>
This option was used to override the behavior of
`-fsanitize=shadowcallstack` on RISC-V backend, which by default use a
hardware implementation if possible, to use the software implementation
instead. After #112477 and #112478, now two implementation
is represented by independent options and we no longer need it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This option was used to override the behavior of
`-fsanitize=shadowcallstack` on RISC-V backend, which by default use a
hardware implementation if possible, to use the software implementation
instead. After #112477 and #112478, now two implementation
is represented by independent options and we no longer need it.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Add Zicfiss support to the shadow call stack implementation. (#68075)</title>
<updated>2024-02-10T14:18:46+00:00</updated>
<author>
<name>Yeting Kuo</name>
<email>46629943+yetingk@users.noreply.github.com</email>
</author>
<published>2024-02-10T14:18:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=59037c0975de51ae29a5f9bd4260131ba3b7c22a'/>
<id>59037c0975de51ae29a5f9bd4260131ba3b7c22a</id>
<content type='text'>
This patch enable hardware shadow stack with `Zicifss` and
`mno-forced-sw-shadow-stack`. New feature forced-sw-shadow-stack
disables hardware shadow stack even when `Zicfiss` enabled.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enable hardware shadow stack with `Zicifss` and
`mno-forced-sw-shadow-stack`. New feature forced-sw-shadow-stack
disables hardware shadow stack even when `Zicfiss` enabled.</pre>
</div>
</content>
</entry>
<entry>
<title>[Docs] Mention RISC-V in the introductory paragraph in ShadowCallStack.rst. (#79241)</title>
<updated>2024-01-24T20:06:58+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@sifive.com</email>
</author>
<published>2024-01-24T20:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e6f576b0c3fdddcd5916dcce24d17e36d2dbe2e6'/>
<id>e6f576b0c3fdddcd5916dcce24d17e36d2dbe2e6</id>
<content type='text'>
RISC-V is mentioned elsewhere in the document it seems like it should be
mentioned in the introduction.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RISC-V is mentioned elsewhere in the document it seems like it should be
mentioned in the introduction.</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen][RISCV] Change Shadow Call Stack Register to X3</title>
<updated>2023-04-12T21:06:22+00:00</updated>
<author>
<name>Paul Kirth</name>
<email>paulkirth@google.com</email>
</author>
<published>2023-03-20T21:16:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aa1d2693c25622ea4a8ee2b622ba2a617e18ef88'/>
<id>aa1d2693c25622ea4a8ee2b622ba2a617e18ef88</id>
<content type='text'>
ShadowCallStack implementation uses s2 register on RISC-V, but that
choice is problematic for reasons described in:

https://lists.riscv.org/g/sig-toolchains/message/544,
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/370, and
https://github.com/google/android-riscv64/issues/72

The concern over the register choice was also brought up in
https://reviews.llvm.org/D84414.

https://reviews.llvm.org/D84414#2228666 said:

```
  "If the register choice is the only concern about this work, then I think
  we can probably land it as-is and fixup the register choice if we see
  major drawbacks later. Yes, it's an ABI issue, but on the other hand the
  shadow call stack is not a standard ABI anyway.""
```

Since we have now found a sufficient reason to fixup the register
choice, we should go ahead and update the implementation. We propose
using x3(gp) which is now the platform register in the RISC-V ABI.

Reviewed By: asb, hiraditya, mcgrathr, craig.topper

Differential Revision: https://reviews.llvm.org/D146463
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ShadowCallStack implementation uses s2 register on RISC-V, but that
choice is problematic for reasons described in:

https://lists.riscv.org/g/sig-toolchains/message/544,
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/370, and
https://github.com/google/android-riscv64/issues/72

The concern over the register choice was also brought up in
https://reviews.llvm.org/D84414.

https://reviews.llvm.org/D84414#2228666 said:

```
  "If the register choice is the only concern about this work, then I think
  we can probably land it as-is and fixup the register choice if we see
  major drawbacks later. Yes, it's an ABI issue, but on the other hand the
  shadow call stack is not a standard ABI anyway.""
```

Since we have now found a sufficient reason to fixup the register
choice, we should go ahead and update the implementation. We propose
using x3(gp) which is now the platform register in the RISC-V ABI.

Reviewed By: asb, hiraditya, mcgrathr, craig.topper

Differential Revision: https://reviews.llvm.org/D146463
</pre>
</div>
</content>
</entry>
<entry>
<title>Delete x86_64 ShadowCallStack support</title>
<updated>2019-03-07T18:56:36+00:00</updated>
<author>
<name>Vlad Tsyrklevich</name>
<email>vlad@tsyrklevich.net</email>
</author>
<published>2019-03-07T18:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2e1479e2f2dd0e5a7c445fdf6f12b6e66aea96f3'/>
<id>2e1479e2f2dd0e5a7c445fdf6f12b6e66aea96f3</id>
<content type='text'>
Summary:
ShadowCallStack on x86_64 suffered from the same racy security issues as
Return Flow Guard and had performance overhead as high as 13% depending
on the benchmark. x86_64 ShadowCallStack was always an experimental
feature and never shipped a runtime required to support it, as such
there are no expected downstream users.

Reviewers: pcc

Reviewed By: pcc

Subscribers: mgorny, javed.absar, hiraditya, jdoerfert, cfe-commits, #sanitizers, llvm-commits

Tags: #clang, #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D59034

llvm-svn: 355624
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
ShadowCallStack on x86_64 suffered from the same racy security issues as
Return Flow Guard and had performance overhead as high as 13% depending
on the benchmark. x86_64 ShadowCallStack was always an experimental
feature and never shipped a runtime required to support it, as such
there are no expected downstream users.

Reviewers: pcc

Reviewed By: pcc

Subscribers: mgorny, javed.absar, hiraditya, jdoerfert, cfe-commits, #sanitizers, llvm-commits

Tags: #clang, #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D59034

llvm-svn: 355624
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: Update the ShadowCallStack documentation.</title>
<updated>2019-02-12T22:45:23+00:00</updated>
<author>
<name>Peter Collingbourne</name>
<email>peter@pcc.me.uk</email>
</author>
<published>2019-02-12T22:45:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=27aa8b62d3937d9537c6cd296ae703c173682cf1'/>
<id>27aa8b62d3937d9537c6cd296ae703c173682cf1</id>
<content type='text'>
- Remove most of the discussion of the x86_64 implementation;
  link to an older version of the documentation for details of
  that implementation.
- Add description of the compatibility and security issues discovered
  during the development of the aarch64 implementation for Android.

Differential Revision: https://reviews.llvm.org/D58105

llvm-svn: 353890
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Remove most of the discussion of the x86_64 implementation;
  link to an older version of the documentation for details of
  that implementation.
- Add description of the compatibility and security issues discovered
  during the development of the aarch64 implementation for Android.

Differential Revision: https://reviews.llvm.org/D58105

llvm-svn: 353890
</pre>
</div>
</content>
</entry>
<entry>
<title>[ShadowCallStack] fix the docs</title>
<updated>2018-05-01T00:15:56+00:00</updated>
<author>
<name>Kostya Serebryany</name>
<email>kcc@google.com</email>
</author>
<published>2018-05-01T00:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d5dc819a5c6fb0138308cb52096e30d28d4a52b4'/>
<id>d5dc819a5c6fb0138308cb52096e30d28d4a52b4</id>
<content type='text'>
llvm-svn: 331238
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 331238
</pre>
</div>
</content>
</entry>
<entry>
<title>AArch64: Implement support for the shadowcallstack attribute.</title>
<updated>2018-04-04T21:55:44+00:00</updated>
<author>
<name>Peter Collingbourne</name>
<email>peter@pcc.me.uk</email>
</author>
<published>2018-04-04T21:55:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f11eb3ebe77729426e562d7d4d7ebb1d5ff2e7c8'/>
<id>f11eb3ebe77729426e562d7d4d7ebb1d5ff2e7c8</id>
<content type='text'>
The implementation of shadow call stack on aarch64 is quite different to
the implementation on x86_64. Instead of reserving a segment register for
the shadow call stack, we reserve the platform register, x18. Any function
that spills lr to sp also spills it to the shadow call stack, a pointer to
which is stored in x18.

Differential Revision: https://reviews.llvm.org/D45239

llvm-svn: 329236
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The implementation of shadow call stack on aarch64 is quite different to
the implementation on x86_64. Instead of reserving a segment register for
the shadow call stack, we reserve the platform register, x18. Any function
that spills lr to sp also spills it to the shadow call stack, a pointer to
which is stored in x18.

Differential Revision: https://reviews.llvm.org/D45239

llvm-svn: 329236
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the -fsanitize=shadow-call-stack flag</title>
<updated>2018-04-03T22:33:53+00:00</updated>
<author>
<name>Vlad Tsyrklevich</name>
<email>vlad@tsyrklevich.net</email>
</author>
<published>2018-04-03T22:33:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e55aa03ad4605799d8c116ec45ae7474359f2a47'/>
<id>e55aa03ad4605799d8c116ec45ae7474359f2a47</id>
<content type='text'>
Summary:
Add support for the -fsanitize=shadow-call-stack flag which causes clang
to add ShadowCallStack attribute to functions compiled with that flag
enabled.

Reviewers: pcc, kcc

Reviewed By: pcc, kcc

Subscribers: cryptoad, cfe-commits, kcc

Differential Revision: https://reviews.llvm.org/D44801

llvm-svn: 329122
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Add support for the -fsanitize=shadow-call-stack flag which causes clang
to add ShadowCallStack attribute to functions compiled with that flag
enabled.

Reviewers: pcc, kcc

Reviewed By: pcc, kcc

Subscribers: cryptoad, cfe-commits, kcc

Differential Revision: https://reviews.llvm.org/D44801

llvm-svn: 329122
</pre>
</div>
</content>
</entry>
</feed>
