Binary Translation Version Protection via Page Permissions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Binary translation systems face challenges in maintaining consistency and performance due to self-modifying or cross-modifying code, where changes in native code require updating binary translations and notifying processing threads, but existing mechanisms lack efficient real-time notification and synchronization, leading to potential execution of stale translations and performance impacts.

Innovation Solution

A system that includes a binary translation module, a page permission control module, and a processing module to mark binary translations as stale when native code is altered, change access permissions, and perform recovery operations to generate new translations, ensuring timely updates and preventing execution of outdated translations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If binary translations are stored in translation cache for frequently accessed translations, then system performance is improved, but consistency between native code and binary translation deteriorates when native code is modified

Engineering Contradiction:
Improvesystem performanceVSAvoidconsistency between native code and binary translation
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary actions by setting access permissions on code pages to writable before modification and on translation pages to non-executable before invalidation. This preliminary configuration prevents stale translations from being executed and ensures consistency is maintained before the actual code modification occurs.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback mechanisms through page permission control modules that monitor and control access permissions. When native code is modified, the system detects the change through permission changes and automatically invalidates corresponding binary translations by changing their permissions to non-executable, ensuring consistency is restored.

Inventive Principle:
Principle #23Feedback

2Adaptability or versatility

If access permissions are changed to allow native code modification, then code update capability is improved, but security and execution integrity deteriorate

Engineering Contradiction:
Improvecode update capabilityVSAvoidsecurity and execution integrity
Core Design Contradiction:
Adaptability or versatilityVSObject-affected harmful factors

Solution Approach 1:

The system changes access permissions preliminarily and temporarily only when code modification is required. After the modification is complete, the permissions are restored to their original state (code pages to non-writable, translation pages to executable only if valid). This preliminary change enables updates while minimizing security exposure time.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system applies different access permissions to different code pages and translation pages based on their specific state and requirements. Each code page and translation page has its permissions independently managed, allowing fine-grained control where only the necessary pages have modified permissions at any given time, maintaining security integrity overall.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10162616B2System for binary translation version protection
Publication Date: 2018.12.25 INTEL CORP
  • US10162616B2 patent drawing
  • US10162616B2 patent drawing
  • US10162616B2 patent drawing

AI summary

The present disclosure is directed to a system for binary translation version protection. Activity occurring in a device that may potentially cause native code to be altered may cause the device to prevent binary translations corresponding to the native code from being executed until a determination is made as to whether the binary translation needs to be regenerated. The native code may be stored in a memory page having an access permission that does not permit writes. Attempts to alter the native code would require the access permission of the memory page to be set to writable, which may cause a binary translation (BT) module to be notified of the potential change. The BT module may mark any binary translations corresponding to the native code as stale, and may cause a page permission control module to update memory pages including the binary translations to have an access permission of non-executable.