LWN: Comments on "Shadow stacks for 64-bit Arm systems" https://lwn.net/Articles/940403/ This is a special feed containing comments posted to the individual LWN article titled "Shadow stacks for 64-bit Arm systems". en-us Mon, 08 Sep 2025 03:28:41 +0000 Mon, 08 Sep 2025 03:28:41 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Enforcing no-ROP breaks ABI https://lwn.net/Articles/941990/ https://lwn.net/Articles/941990/ broonie <div class="FormattedComment"> The expectation is that as with BTI the dynamic loader will look at ELF markings to determine if the binaries it is linking support GCS, and there will probably be an override mechanism with something like environment variables too. In any case it's entirely in userspace.<br> </div> Thu, 17 Aug 2023 20:42:11 +0000 Enforcing no-ROP breaks ABI https://lwn.net/Articles/941846/ https://lwn.net/Articles/941846/ timon <div class="FormattedComment"> From the article:<br> <p> <span class="QuotedText">&gt; [...] the expectation is that the shadow stack will be enabled in the dynamic loader before jumping to a program's entry point [...]</span><br> <p> My understading would then be that apps might actually run with shadow stacks enabled without knowing of their existence. Or maybe I'm wrong, and shadow stack support will require recompilation in any case.<br> </div> Thu, 17 Aug 2023 11:19:40 +0000 Enforcing no-ROP breaks ABI https://lwn.net/Articles/941836/ https://lwn.net/Articles/941836/ jepsis <div class="FormattedComment"> "I anticipate the crashing of hundreds of apps with thousands of installations."<br> <p> Why? Have those apps set PR_SET_SHADOW_STACK_STATUS with PR_SHADOW_STACK_ENABLE flag without knowing their existence? Most probably not.<br> </div> Thu, 17 Aug 2023 10:14:48 +0000 Shadow stacks for 64-bit Arm systems https://lwn.net/Articles/941816/ https://lwn.net/Articles/941816/ dxin <div class="FormattedComment"> That totally defeats the purpose of having single letter extensions, i.e. to cascade them into feature sets e.g. G=IMAFD.<br> <p> </div> Thu, 17 Aug 2023 03:43:13 +0000 Enforcing no-ROP breaks ABI https://lwn.net/Articles/941394/ https://lwn.net/Articles/941394/ jreiser [no-ROP is a ban on Return-Oriented Programming] <pre>&gt; Whenever a function call is made, the current return address is pushed onto both &gt; the regular stack and the shadow stack. When the function returns, the addresses at the top &gt; of the two stacks are compared; if they do not match, the system concludes that the call stack &gt; has been corrupted and, probably, aborts execution.</pre> <p> If that is enforced strictly, then it breaks the user-mode ABI. I anticipate the crashing of hundreds of apps with thousands of installations. I wrote those apps. More precisely, I wrote the ELF side of <a href="https://upx.github.io/">UPX</a>. which compresses an ELF module (main program or shared library) into smaller space (typically 30% to 60% less) but retains the same external behavior. The self-contained execution stub which quickly expands the compressed module into RAM, back to its original layout, uses ROP in places because ROP is smaller than any other method. Cache misses from any hardware return-address [prediction] cache are ignored in favor of fewer bytes of code and less complexity. <p> On x86*, if the observable semantic behavior of a CALL instruction is anything other than <tt>{*--sp = next_ip; goto target;}</tt>, or a RET(URN) instruction is anything other than <tt>{goto *sp++;}</tt>, then that breaks the architectural ABI of the CPU. If you want something more, then you should get a different opcode. <p> In general, ROP can be a valuable technique for implementing a generator, emulator, or interpreter, especially in small space. ROP is a hardware implementation of <a href="https://en.wikipedia.org/wiki/Threaded_code">direct threaded code</a>. At first, storage space in many current systems may appear to be effectively infinite; yet complaints such as “another song/photo/video/app/backup won’t fit” seem never to disappear. Sun, 13 Aug 2023 20:14:58 +0000 Shadow stacks for 64-bit Arm systems https://lwn.net/Articles/941038/ https://lwn.net/Articles/941038/ rwmj <div class="FormattedComment"> In case you're wondering why the RISC-V extensions will be called "Zicfiss" and "Zicfilp", here is why:<br> <p> RISC-V extensions were originally single letters, like "I" for ISA base, "A" for Atomic and so on. Which worked well until predictably they ran out of letters. The new convention is Z + most closely related extension + name.<br> <p> So Zicfiss is Z + i (closely related to normal baseline instructions) + name "cfiss" for control flow integrity shadow stack. Zicfilp is the same but "landing pad".<br> <p> Is "zisslpcfi" from the article an earlier version of the extension name? The latest extension docs don't seem to refer to it: <a href="https://github.com/riscv/riscv-cfi/blob/main/riscv-cfi.pdf">https://github.com/riscv/riscv-cfi/blob/main/riscv-cfi.pdf</a><br> </div> Thu, 10 Aug 2023 10:50:26 +0000