Controlling shadow-stack allocation in clone3()
Controlling shadow-stack allocation in clone3()
Posted Dec 8, 2023 22:02 UTC (Fri) by redgecombe (subscriber, #126527)In reply to: Controlling shadow-stack allocation in clone3() by roc
Parent article: Controlling shadow-stack allocation in clone3()
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.
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.
Posted Dec 9, 2023 0:58 UTC (Sat)
by roc (subscriber, #30627)
[Link]
Controlling shadow-stack allocation in clone3()