Enclave Resume Instruction for Asynchronous Exit Handling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing trusted execution environments (TEEs) face challenges in efficiently handling asynchronous exits caused by interrupts and exceptions, leading to performance overhead and the need for cumbersome code refactoring.

Innovation Solution

The introduction of a modified enclave resume instruction with return-to-handler (RTH) functionality allows TEEs to efficiently handle asynchronous exits by reducing the number of context switches and enabling customizable security policies to mitigate interrupt-driven attacks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional enclave exit and resume mechanisms are used to handle asynchronous exits, then the trusted execution environment can maintain security, but the computational overhead increases and performance decreases

Engineering Contradiction:
ImprovesecurityVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent pre-establishes handler routines and control structures within the enclave before asynchronous exits occur. The enclave resume instruction is pre-configured with return addresses and handler information, allowing the CPU to quickly restore enclave state and jump to appropriate handlers without extensive context switching or security verification overhead when exits occur.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary enclave resume instruction that acts as a bridge between the external interrupt/exception handling mechanism and the internal enclave execution context. This intermediary instruction manages the transition efficiently by preserving enclave state and controlling the flow back into the enclave, reducing the overhead of direct context switching.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If traditional enclave exit and resume mechanisms are used to handle asynchronous exits, then the trusted execution environment can maintain security, but the code complexity increases due to cumbersome refactoring requirements

Engineering Contradiction:
ImprovesecurityVSAvoidcode complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent creates a universal enclave resume instruction that handles multiple types of asynchronous exits (interrupts, exceptions, signals) through a single unified mechanism. This multi-functional instruction eliminates the need for separate handling code paths for different exit types, reducing code complexity while maintaining security through consistent state management.

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

Solution Approach 2:

The enclave resume instruction is designed to automatically manage its own execution context, including restoring registers, updating program counters, and switching privilege levels without requiring extensive external helper functions. This self-service capability reduces the amount of supporting code needed and simplifies the overall handling mechanism.

Inventive Principle:
Principle #25Self-service

Data Source

PatentEP4020274B1Apparatuses, methods, and systems for instructions to allow trusted execution environments to react to asynchronous exits
Publication Date: 2025.03.05 INTEL CORP
  • EP4020274B1 patent drawingFigure 1
  • EP4020274B1 patent drawingFigure 2
  • EP4020274B1 patent drawingFigure 3

AI summary

Systems, methods, and apparatuses relating to an instruction that allows a trusted execution environment to react to an asynchronous exit are described. In one embodiment, a hardware processor includes a register comprising a field, that when set, is to enable an architecturally protected execution environment for code in an architecturally protected enclave in memory, a decoder circuit to decode a single instruction comprising an opcode into a decoded instruction, the opcode to indicate an execution circuit is to invoke a handler to handle an asynchronous exit from execution of the code in the architecturally protected enclave and then resume execution of the code in the architecturally protected enclave from where the asynchronous exit occurred, and the execution circuit to respond to the decoded instruction as specified by the opcode.