Program Code Constant Loading for Execute-Only Memory Protection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current computer systems lack effective methods to protect program code from being read, which is crucial for preventing attackers from executing malicious code and stealing key algorithm logic, especially in systems with execute-only memory (XOM) features.

Innovation Solution

A data processing method that inserts data transfer instructions into program code to write constant data into registers, labels the code as unreadable, and uses call instructions to store functions with constant data in separate segments, ensuring the code is executable but not readable.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the program code is made executable only and not readable to prevent code tampering, then security protection is improved, but the program cannot access constant data stored in the code segment

Engineering Contradiction:
Improvesecurity protectionVSAvoiddata access capability
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent extracts the constant data access function from the code segment by introducing a separate literal pool segment. This allows the code segment to maintain execute-only permissions while the literal pool segment stores readable constant data. The literal pool reference instruction enables code to access these extracted constants without compromising the execute-only integrity of the main code segment.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent segments the memory into distinct regions: the code segment (execute-only) and the literal pool segment (readable). This segmentation resolves the contradiction by allowing different permission sets for different segments. The code segment maintains security through execute-only permissions while the literal pool segment provides readable constant data through separate memory allocation.

Inventive Principle:
Principle #1Segmentation

2Ease of manufacture

If the literal pool mechanism is used to store constant data in the code segment, then data storage is simplified, but the execute-only memory security feature is compromised

Engineering Contradiction:
Improvedata storage simplicityVSAvoidsecurity feature
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The patent extracts the constant data storage function from the code segment by creating a separate literal pool segment. This removes the security-compromising literal pool mechanism from within the execute-only code segment, while maintaining simplified constant data storage through the dedicated literal pool segment with appropriate read permissions.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent segments memory into code segment (execute-only) and literal pool segment (readable). This segmentation allows constant data to be stored simply in the literal pool segment while the code segment maintains execute-only permissions, resolving the conflict between storage simplicity and security.

Inventive Principle:
Principle #1Segmentation

3Reliability

If read permission is removed from the program code segment to prevent code leakage, then security is improved, but the program cannot read or access its own code

Engineering Contradiction:
Improvecode securityVSAvoidcode accessibility
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent extracts the necessary read access capability by introducing a literal pool segment with read permissions. This allows the program to read constant data without needing read permission for the entire code segment. The literal pool reference instruction provides the extracted read capability needed for constant access while maintaining execute-only permissions for the code segment.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent segments permissions by creating separate segments with different access rights. The code segment has execute-only permissions for security, while the literal pool segment has read permissions for data access. This segmentation resolves the contradiction by decoupling code execution permissions from constant data read permissions.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12632612B2Data processing method and related apparatus
Publication Date: 2026.05.19 HUAWEI TECH CO LTD
  • US12632612B2 patent drawing
  • US12632612B2 patent drawing
  • US12632612B2 patent drawing

AI summary

A data processing method includes obtaining target constant data to be accessed in first code, where a length of the target constant data is greater than a preset threshold; and inserting a plurality of data transfer instructions into the first code based on a location of an objective function in the first code to obtain second code, where the objective function is a function that needs to access the target constant data, each data transfer instruction of the plurality of data transfer instructions includes a part of data in the target constant data, the plurality of data transfer instructions are used to write the target constant data into a register, and the second code is labeled as being stored into a storage area not having a read permission.