Shadow Stack Verification for Faster Stack Trace Debugging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Debugging in computing environments, particularly in cloud computing, is inefficient and resource-intensive due to the corruption or loss of return addresses on traditional call stacks, making it difficult to identify and resolve bugs effectively.
Innovation Solution
Utilizing a shadow stack to generate verified stack traces by comparing return addresses from the traditional call stack with a hardware-protected duplicate stack, ensuring accuracy and reducing the need for unwinding the call stack, thereby enhancing debugging efficiency and resource utilization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If traditional call stack unwinding is performed to generate stack traces, then debugging information can be obtained, but processing time and computational resources are significantly consumed
Solution Approach 1:
The shadow stack pre-stores return addresses in a protected memory location during normal execution, so that when debugging is needed, the information is already prepared and immediately accessible without requiring time-consuming unwinding operations
Solution Approach 2:
A duplicate stack (shadow stack) is created that copies the essential return address information from the traditional call stack, allowing debugging operations to use this copy instead of manipulating the original stack, thereby saving processing time
2Loss of information
If traditional call stack is used for stack trace generation, then return addresses are accessible, but data corruption can occur making debugging difficult
Solution Approach 1:
The shadow stack is established in advance as a protected backup that cushions against potential corruption of the traditional call stack, ensuring that even if the original stack is compromised, reliable return address information remains available
Solution Approach 2:
The shadow stack acts as an intermediary layer between the traditional call stack and the debugging process, providing a verified source of return addresses that mediates against corruption issues in the original stack
3Loss of information
If comprehensive data collection is performed in cloud computing environments for later debugging, then debugging information may be captured, but processing resources are substantially consumed
Solution Approach 1:
The essential debugging information (return addresses) is extracted and stored in the shadow stack during normal execution, separating this critical data from the bulk data collection process, so that later debugging can focus on this pre-extracted information rather than processing entire data dumps
Data Source
AI summary
A verified stack trace can be generated by utilizing information contained in a shadow stack, such as a hardware protected duplicate stack implemented for malware prevention and computer security. The shadow stack contains return addresses which are obtainable without requiring an unwinding of the traditional call stack. As such, triaging based on return address information can be performed more quickly and more efficiently, and with a reduced utilization of processing resources. Additionally, the generation of a verified stack trace can be performed, with such a verified stack trace containing return addresses that are known to be correct and not corrupted. The return addresses can either be read from the traditional call stack, or derived therefrom, and then verified by comparison to corresponding return addresses from the shadow stack, or they can be read directly from the shadow stack.


