Trusted Compiler Server for Secure Runtime Code Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional run-time compilers are resource-intensive, leading to performance degradation, security risks, and instability in computing systems due to high memory usage, lack of code sharing, and repeated compilation of the same source code during startup, which results in slow and insecure systems.

Innovation Solution

A trusted compiler server is introduced to securely generate executable codes during run-time, allowing authorized applications to access cached compiled codes, reducing memory usage and enabling secure sharing of compiled codes while preventing direct code generation by applications, thereby improving performance and security.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If traditional run-time compilers are used to generate executable codes, then code execution performance is improved, but system resource usage (memory and processor time) increases significantly

Engineering Contradiction:
Improvecode execution performanceVSAvoidsystem resource usage
Core Design Contradiction:
SpeedVSUse of energy by moving object

Solution Approach 1:

A trusted compiler server is introduced as an intermediary between applications and the compilation process. The server compiles source code into executable codes and returns them to applications, which then execute the pre-compiled codes. This separates the resource-intensive compilation process from application execution, allowing applications to benefit from optimized code without bearing the compilation overhead.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If applications directly generate executable codes using compilers, then code customization is improved, but security risks increase due to potential security holes in compiler code

Engineering Contradiction:
Improvecode customizationVSAvoidsecurity risks
Core Design Contradiction:
Adaptability or versatilityVSObject-affected harmful factors

Solution Approach 1:

The trusted compiler server acts as a secure intermediary that applications cannot directly access or modify. The server enforces security policies and controls the compilation process, preventing malicious applications from exploiting security holes in compiler code. Applications request compilation services through controlled interfaces, maintaining security while allowing code generation.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The compiler code is extracted from the application environment and placed in a separate, secure compiler server environment. This isolation removes the security vulnerabilities of compiler code from the application execution context, as the compiler runs in a controlled, monitored environment with enforced security policies.

Inventive Principle:
Principle #2Taking out (Extraction)

3Ease of operation

If each application compiles the same source code independently, then application autonomy is improved, but startup time increases due to repeated compilation

Engineering Contradiction:
Improveapplication autonomyVSAvoidstartup time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

Multiple applications share a common compilation service through the trusted compiler server. When one application compiles source code, the resulting executable code is stored and can be reused by other applications. This merging of compilation resources eliminates redundant compilation efforts and reduces overall startup time for multiple applications.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The compiler server performs compilation in advance and caches the generated executable codes. When applications need the same functionality, they can retrieve pre-compiled codes from the cache rather than compiling from scratch, significantly reducing startup time while maintaining application autonomy through on-demand retrieval.

Inventive Principle:
Principle #10Preliminary action

4Quantity of substance

If compilers run in shared libraries, then memory sharing is improved, but code sharing between applications is prevented due to process space isolation

Engineering Contradiction:
Improvememory sharingVSAvoidcode sharing
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

The compiler server serves as an intermediary that enables code sharing across process boundaries. It compiles source code once and distributes the resulting executable codes to multiple applications, bypassing the limitations of process space isolation. This allows code to be shared system-wide while maintaining the security and isolation benefits of separate process spaces.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS9946873B2Methods and apparatuses for secure compilation
Publication Date: 2018.04.17 APPLE INC
  • US9946873B2 patent drawing
  • US9946873B2 patent drawing
  • US9946873B2 patent drawing

AI summary

A method and an apparatus that provide secure executable codes generated during run time via a trusted compiler server are described. An application can send a service request to the compiler server to request executable codes. The compiler server can determine whether the service request is permitted to be served based on a security policy imposed and the security settings associated with the service request. Availability of certain compilers can be allowed if the application is authorized according to the service request.