Dedicated Shadow Stack Memory Protection With Lower WRSS Overhead

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing memory protection mechanisms, such as the CET mechanism, incur high performance overhead and are difficult to adjust for protecting sensitive data and code, leading to compatibility issues and inefficient memory access.

Innovation Solution

Implement a dedicated shadow stack page independent of the CET mechanism's shadow stack page, using WRSS instructions to write sensitive data and code, and apply overhead reduction techniques like lossless compression to minimize write operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the CET mechanism is used to protect sensitive data and code, then memory integrity is improved, but performance overhead increases and adaptability decreases

Engineering Contradiction:
Improvememory integrityVSAvoidperformance overhead
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent divides memory into distinct regions: shadow stack pages for return addresses, code cache for executable code, and data regions. Each region has specific protection rules and access permissions. The shadow stack is further segmented into dedicated shadow stack pages that are independent from regular stack pages, allowing selective protection of critical memory areas without affecting overall system performance.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different protection mechanisms are applied to different memory regions based on their specific requirements. Shadow stack pages use WRSS instructions for write protection, code cache uses execute-only permissions, and data regions use standard memory protection. This localized approach ensures that each region receives appropriate protection while minimizing performance overhead in non-critical areas.

Inventive Principle:
Principle #3Local quality

2Reliability

If the CET mechanism is adjusted to protect sensitive data and code, then memory integrity is improved, but device complexity increases

Engineering Contradiction:
Improvememory integrityVSAvoidmechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The shadow stack mechanism, originally designed for return address protection, is extended to serve multiple functions: protecting return addresses, protecting sensitive data, and protecting sensitive code. The same WRSS instruction and shadow stack page structure are used across different protection scenarios, reducing the need for separate complex mechanisms and simplifying the overall system architecture.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Reliability

If frequent memory access instructions are protected, then memory integrity is improved, but speed decreases

Engineering Contradiction:
Improvememory integrityVSAvoidmemory access speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

Instead of protecting all memory access instructions uniformly, the patent applies protection selectively to critical regions. Shadow stack pages protect only the specific memory locations where return addresses and sensitive data are stored. Code cache protects only executable code regions. This partial protection approach ensures integrity for critical operations while allowing fast access in non-critical areas, avoiding the performance penalty of universal protection.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS12566843B2CET mechanism-based method for protecting integrity of general-purpose memory
Publication Date: 2026.03.03 INST OF COMPUTING TECH CHINESE ACAD OF SCI
  • US12566843B2 patent drawing
  • US12566843B2 patent drawing
  • US12566843B2 patent drawing

AI summary

A CET mechanism-based method for protecting the integrity of a general-purpose memory. In the method, the integrity of the general-purpose memory is protected on the basis of a CET mechanism. A dedicated shadow stack page is provided, and is independent of the shadow stack page maintained by the CET mechanism itself, and overhead reduction processing adaptive to content to be written that is written to the dedicated shadow stack page and requires writing overhead reduction is performed on the content to be written, so as to reduce the number of times of using WRSS instructions, such that the integrity of sensitive data and/or sensitive codes is protected in the case of using lower overhead, and performance overhead of a processor in the protection of the integrity of the general-purpose memory is reduced, thereby improving the efficiency of processing other tasks by the processor.