LWN: Comments on "Controlling shadow-stack allocation in clone3()" https://lwn.net/Articles/953794/ This is a special feed containing comments posted to the individual LWN article titled "Controlling shadow-stack allocation in clone3()". en-us Sat, 20 Sep 2025 20:40:51 +0000 Sat, 20 Sep 2025 20:40:51 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Controlling shadow-stack allocation in clone3() https://lwn.net/Articles/954172/ https://lwn.net/Articles/954172/ roc <div class="FormattedComment"> Done, thanks.<br> </div> Sat, 09 Dec 2023 00:58:14 +0000 Controlling shadow-stack allocation in clone3() https://lwn.net/Articles/954156/ https://lwn.net/Articles/954156/ redgecombe <div class="FormattedComment"> Yep, map_shadow_stack syscall takes an optional address (like mmap), and the CRIU patches used it.<br> <p> The earlier proposed clone3 design involved userspace allocating the shadow stack and then passing the address into clone3. So it was setting the shadow stack pointer register (SSP) to an arbitrary point, not telling the kernel to allocate the shadow stack at a specific point.<br> <p> Do you mean rr needs to control where a newly created thread allocates a shadow stack? If so could you comment the details on the mailing list to that series? Keep in mind the SSP is controllable via ptrace, so a tracer should be able to write to shadow stacks, set the SSP wherever it wants, and map shadow stacks at specific locations (via map_shadow_stack injection). So it seems like something could me made to work, but it would be good to know if there are any hard requirements.<br> </div> Fri, 08 Dec 2023 22:02:40 +0000 Controlling shadow-stack allocation in clone3() https://lwn.net/Articles/954147/ https://lwn.net/Articles/954147/ roc <div class="FormattedComment"> My understanding is that userspace can access shadow stack memory, at least under some conditions, so as an rr maintainer I suspect we are going to need the ability to control where shadow stacks are allocated, so we can ensure during replay the shadow stacks are allocated at the same address as during recording.<br> <p> But I would have thought CRIU has the same issues, and yet I know CRIU maintainers have been talking to the CET people and this hasn't come up?<br> </div> Fri, 08 Dec 2023 19:57:45 +0000