Shadow Stack Verification for Faster Stack Trace Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvestack trace informationVSAvoiddebugging time
Core Design Contradiction:
Loss of informationVSLoss of time

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

Inventive Principle:
Principle #10Preliminary action

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

Inventive Principle:
Principle #26Copying

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

Engineering Contradiction:
Improvereturn address integrityVSAvoiddebugging reliability
Core Design Contradiction:
Loss of informationVSReliability

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

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

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

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improvedebugging data completenessVSAvoidprocessing efficiency
Core Design Contradiction:
Loss of informationVSProductivity

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

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS20250348318A1Verified Stack Trace Generation And Accelerated Stack-Based Analysis With Shadow Stacks
Publication Date: 2025.11.13 MICROSOFT TECHNOLOGY LICENSING LLC
  • US20250348318A1 patent drawing
  • US20250348318A1 patent drawing
  • US20250348318A1 patent drawing

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.