SYSTEM AND METHOD FOR DELEGATING RESTRICTED OPERATIONS FROM TRUSTED EXECUTION ENVIRONMENTS
Restricted operations unavailable inside a trusted execution environment (TEE) are delegated to a common memory executable enabling practical sub-process isolation. When an enclave-aware executable needs to run a restricted instruction, it calls an executable running in common memory using an enclave-aware application binary interface (eABI)-defined function call. The eABI-common executable reconstructs the call using an eABI calling convention that copies arguments across TEE boundaries, invokes the restricted instruction, system call, standard library service, or operating system interface outside the TEE, and forms a result to return. Data inside the TEE that is not represented by an argument or otherwise selected for transfer remains inaccessible to the common executable. An enclave-aware compiler may generate the protected caller, unprotected service code, eABI metadata, a controlled entry point, request logic, and return logic from generic source code that omits enclave-specific interfaces, lifecycle calls, transition wrappers, and explicit marshaling.
Latest Applied Enclaves LLC Patents:
- SYSTEM AND METHOD FOR AUTOMATING SECURE DATA TRANSFER BETWEEN TRUSTED EXECUTION ENVIRONMENTS
- SYSTEM AND METHOD FOR TRUST-POLICY-GOVERNED LOADING OF ENCLAVE-AWARE EXECUTABLES INTO TRUSTED EXECUTION ENVIRONMENTS
- SYSTEM AND METHOD FOR KERNEL-RESIDENT TRUSTED EXECUTION ENVIRONMENTS
- SYSTEM AND METHOD FOR ENCLAVE-AWARE APPLICATION BINARY INTERFACE INTEROPERABILITY
- SYSTEM AND METHOD FOR RUNTIME-MEDIATED CONTROL TRANSFER AND DATA EXCHANGE ACROSS TRUSTED EXECUTION ENVIRONMENTS
This application is a continuation-in-part of U.S. patent application Ser. No. 19/029,871, filed Jan. 17, 2025, entitled “SYSTEM AND METHOD FOR RUNNING ENCLAVE-AWARE EXECUTABLES” (the “'871 application”), which claims the benefit of U.S. Provisional Patent Application Ser. No. 63/565,907, filed Mar. 15, 2024, entitled “METHOD TO PARTITION MULTIPLE EXECUTABLES INTO INDIVIDUAL ENCLAVES IN A COMMON PROCESS SPACE” (the “'907 provisional”). This application claims the benefit of the '871 application under 35 U.S.C. § 120 and 37 C.F.R. § 1.78 and, through the '871 application, claims the benefit of the '907 provisional under 35 U.S.C. § 119 (e) and 37 C.F.R. § 1.78. The entire disclosures of the '871 application and the '907 provisional, including the specifications, claims, abstracts, and drawings thereof, are incorporated herein by reference.
This application is also a continuation-in-part of International Application No. PCT/US2025/012106, filed Jan. 17, 2025, entitled “SYSTEM AND METHOD FOR ENCLAVE-AWARE ARCHITECTURE,” which designates the United States (the “PCT application”). This application claims the benefit of the PCT application under 35 U.S.C. §§ 120 and 365(c) and 37 C.F.R. § 1.78. The entire disclosure of the PCT application, including its specification, claims, abstract, and drawings, is incorporated herein by reference.
Applicant certifies that International Application No. PCT/US2025/012106 has not been withdrawn and has not been considered withdrawn, either generally or as to the United States, before the filing date of the present application.
STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENTPursuant to a determination under 37 C.F.R. § 501.6(a)(2), title to the invention was left with the inventor, subject to reservation to the United States Government of a nonexclusive, irrevocable, royalty-free license in the invention with power to grant licenses for all governmental purposes. Any assignment of the invention is subject to the foregoing Government license.
THE NAMES OF THE PARTIES TO A JOINT RESEARCH AGREEMENTNot applicable. No joint research agreement within the meaning of 35 U.S.C. § 100(h) and 37 C.F.R. § 1.9(e) applies to the claimed invention. Applicant is not relying on 35 U.S.C. § 102(c), 37 C.F.R. § 1.71(g), or 37 C.F.R. § 1.104(c)(4)(ii) to except any subject matter from prior art on the basis of a joint research agreement.
STATEMENT REGARDING PRIOR DISCLOSURES BY THE INVENTOR OR A JOINT INVENTORWithout conceding that any disclosure identified in this paragraph is prior art, Applicant identifies the following disclosures as inventor-originated disclosures under 37 C.F.R. § 1.77 (b)(6) and for purposes of the exceptions set forth in 35 U.S.C. § 102 (b). The disclosures identified in this paragraph were made by Mark Nelson, the inventor of the present application, or by another who obtained the subject matter disclosed directly or indirectly from Mark Nelson. The identified disclosures include: U.S. Provisional Patent Application Ser. No. 63/565,907, filed Mar. 15, 2024, entitled “METHOD TO PARTITION MULTIPLE EXECUTABLES INTO INDIVIDUAL ENCLAVES IN A COMMON PROCESS SPACE”; U.S. patent application Ser. No. 19/029,332, filed Jan. 17, 2025, entitled “SYSTEM AND METHOD FOR COMPILING ENCLAVE-AWARE EXECUTABLES”; U.S. patent application Ser. No. 19/029,871, filed Jan. 17, 2025, entitled “SYSTEM AND METHOD FOR RUNNING ENCLAVE-AWARE EXECUTABLES”; U.S. Pat. No. 12,657,287, issued Jun. 16, 2026 from U.S. patent application Ser. No. 19/029,931, filed Jan. 17, 2025, entitled “SYSTEM AND METHOD FOR LOADING ENCLAVE-AWARE EXECUTABLES”; International Application No. PCT/US2025/012106, filed Jan. 17, 2025, entitled “SYSTEM AND METHOD FOR ENCLAVE-AWARE ARCHITECTURE”; and any U.S., WIPO, or foreign patent publication corresponding to any of the foregoing.
Applied Enclaves LLC, a limited liability company founded by Mark Nelson in November 2025, is the assignee of the present application, or the entity to which the inventor is under an obligation to assign the present application. In addition, to the extent any disclosure identified in paragraph is considered subject matter disclosed in a U.S. patent, U.S. patent application publication, or WIPO published application under 35 U.S.C. § 102(a)(2), the claimed invention of the present application and the subject matter disclosed in the identified references were, not later than the effective filing date of the claimed invention, commonly owned by, or subject to an obligation of assignment to, Applied Enclaves LLC. Applicant intends that the identified disclosures be treated under all applicable exceptions to prior art, including 35 U.S.C. §§ 102(b)(1)(A), 102(b)(1)(B), 102(b)(2)(A), 102(b)(2)(B), and 102(b)(2)(C), to the extent the requirements of those exceptions are satisfied.
BACKGROUND OF THE INVENTION Technical FieldThe present disclosure relates generally to computer security, trusted computation, and trusted execution environments, and more particularly to enclaves, application binary interfaces (ABIs), loaded executables, compiler-generated executable files from generic source code, loader operations, runtime-mediated control transfer or data exchange, metadata, policy and trust mechanisms for controlling code execution, application of data security modes for protecting function arguments and data passed between different execution environments, and protection of code or data across usermode, kernelmode, common memory, and trusted execution environments.
BackgroundModern computing platforms may execute applications, libraries, runtime systems, operating system services, and other executable components that transfer control or exchange data through conventional binary interfaces and calling conventions. These executable components may interact without authenticated provenance, tamper resistance, private data, or policy-defined constraints governing control transfer or data exchange between components. As a result, executables in a common execution environment may be unable to distinguish trusted executables from untrusted executables, prevent one executable from interfering with another, or protect entry points, function arguments, or return values from other executables operating within the same process, kernel, or computing environment. Although trusted execution environment hardware and software may permit developers to construct customized isolated execution systems using specialized software development kits (SDKs), technical challenges remain in enabling broad adoption of enclave-aware toolchains, including compilers, loaders, and runtimes. This disclosure introduces an enclave-aware application binary interface configured to permit a compiler to translate generic source code into executables having metadata, processor instructions, and binary-level semantics configured to address provenance, tamper resistance, controlled interoperability, data protection, and policy-governed control transfer, or data exchange across execution environment boundaries.
Trusted execution environments (TEEs) or enclaves may protect selected code or data through isolated execution, integrity or confidentiality protections, controlled entry and exit, attestation, key establishment, restricted-instruction enforcement, or combinations thereof. TEEs or enclaves may be implemented using specialized processor instructions, memory managers, virtualization, firmware, coprocessors, hypervisors, or dedicated hardware.
One or more TEEs may coexist with code executing outside the TEEs within a common virtual address space, process, or kernel. “Calling conventions” define how control is transferred, data is exchanged, or symbols are accessed across these execution boundaries.
One type of TEE may include a memory enclave that provides a protected execution environment for code executing on a computing platform that also executes code outside the memory enclave. In some embodiments, instructions executing outside a trusted execution environment may be restricted from accessing code, data, metadata, keys, or other protected content maintained within the trusted execution environment, while instructions executing inside the trusted execution environment may access selected data inside the trusted execution environment, outside the trusted execution environment, or combinations thereof.
A TEE may also support measurement, launch validation, controlled transitions, attestation, key derivation, sealing, protected communication, debug modes, or restricted-instruction enforcement. Control transfers into or out of a TEE may be limited to designated entry or exit points. There remains a need for an enclave-aware calling convention.
A trusted execution environment developed by Intel® is called Intel® Software Guard Extensions (SGX) enclave technology. Other trusted execution technologies include AMD® Secure Encrypted Virtualization (SEV) confidential computing technology, ARM® TrustZone® isolation technology, Apple® Secure Enclave® security module, RISC-V® Keystone Enclave open standard technology, Qualcomm® Secure Execution Environment (QSEE) trusted execution environment, or Huawei® Trusted Execution Environment.
Some enclave implementations use digital signatures or measurements that establish integrity but do not, by themselves, establish a certificate chain-based publisher, provenance, or permitted-use relationship. Additional trust information may therefore be evaluated when loading, initializing, or authorizing an executable.
In some TEE lifecycle models, code and data are constructed or loaded before the TEE is initialized. Initialization may verify expected contents or configuration and transition the TEE to an execution-ready state in which protected code and data are isolated from unauthorized access.
Intel® Software Guard Extensions (SGX) enclaves may be used by applications specifically programmed with SDK-aware source code that uses an Application Programming Interface (API) or Software Development Kit (SDK). This may require substantial development, new tooling, and expert knowledge of the SGX SDK.
Trusted execution environments or enclaves may also be used in a Library OS framework such as Gramine™ (formerly Graphene), a Library Operating System (LibOS) framework in which applications may be generally unaware of enclaves, but a large portion of the system may be loaded into a single enclave. This potentially increases the volume of code within a single trusted computing base, including code from multiple anonymous publishers, thereby rendering the enclave a coarse-grained trust boundary rather than an executable-specific or publisher-specific trust boundary. A LibOS framework does not have policy-governed loading or control transfer, nor does it protect arguments used by external calls between executables.
Memory isolation may be applied at system, process, or sub-process scope. Sub-process isolation may partition code or data within a usermode process or common virtual address space, including by placing separate executable components in separate TEEs while permitting controlled interoperability among them.
A TEE may also be associated with a kernel, operating system service, hypervisor, or firmware component to isolate selected privileged functionality while permitting controlled interoperability with usermode processes, common memory, or other TEEs.
Computer programs may represent a substantial investment in development resources, a return on which may be realized only if the programs are believed to be both useful and secure by end users. Sub-process isolation may use TEEs to help ensure that programs are utilized in their intended manner by providing confidentiality and integrity guarantees to end users. Retrofitting support for TEEs after a program has already been developed may be time consuming and may create substantial risk. Furthermore, it may be difficult to add support for TEEs to a software library without access to the source code, design documents, or permission to modify it.
The Application Binary Interface (ABI) defines the low-level interface between compiled executables and the operating system or between a traditional main executable and a traditional library executable. Unlike an Application Programming Interface (API), which specifies how source code components interact, an ABI governs how binary executables interoperate, including details like calling conventions, datatype layouts, register usage, how external symbols are accessed, system call mechanisms, and return values. ABIs enable compatibility between compiled code (executables) and the underlying runtime environment, allowing software to interoperate on a given platform.
For example, in the context of a C executable, the ABI (calling conventions) may specify how function arguments are passed (e.g., in registers or on the stack), how return values are handled, and how memory alignment is maintained. Traditional ABIs, such as the System V AMD64 ABI for Linux® open source operating system or the Microsoft® x64 Calling Convention for Windows® operating system, play a role in enabling interoperability between different compilers, libraries, and operating systems. Compilers must generate executables that conform to these interoperability standards. By adhering to these standards, developers and toolchain providers ensure that software may execute reliably across diverse environments. However, traditional ABIs may expect all executables to be in common memory. Therefore, traditional ABIs may not be aware of enclaves.
Compilers are essential tools in software development, converting text-based generic source code like C, C++, Go, or Rust into traditional executables. The processor instructions and data are placed into sections. At the end of the compilation process, a new traditional executable file may be created by writing out metadata, headers, and the contents of each section, which are then arranged into an executable file. This executable file may be copied to other computers and may be run at will by non-programmers. When a user is ready to run the executable file, another program called a “loader” may analyze the executable file, identify dependent “shared libraries” and “runtime” software, and load selected portions into memory. The loader may carefully load portions of all these files into a “common virtual address space”. Finally, the loader may create a “thread of execution” and may set the CPU's instruction pointer to an entry point in a main executable.
The compiler toolchain for the C language may consist of several stages, including preprocessing, compilation, assembly, and linking. The Linux® open source operating system includes compilation toolchains such as GCC (GNU Compiler Collection) or Clang® compiler frontend (LLVM® Project). The Microsoft® Windows® operating system compilation toolchain includes Microsoft® Visual C++® or MinGW® (Minimalist GNU for Windows) compiler and runtime environment. Compilation processing includes lexical analysis, syntax analysis, semantic analysis, optimization, and code generation.
Compilation outputs may include object files or executable files targeted to a processor architecture or ABI and may be published or distributed before being loaded for execution.
An executable file may organize code, data, and metadata into sections or segments. Text sections may contain processor instructions, data sections may contain data, and some informational sections need not be loaded into memory.
After an executable is compiled, it may use traditional program loaders and the runtime environment to execute. The traditional loader may be responsible for loading the executable into memory, recursively resolving shared library dependencies (dependent executables), and setting up the initial execution environment, including stack, heap, and program arguments. In the Linux® open source operating system, the loader may be the dynamic linker/loader (ld.so), which may be invoked by the kernel. In the Microsoft® Windows® operating system, the loader may be a component of the Windows® Application Programming Interface (API).
The runtime environment provides essential services such as dynamic memory allocation, standard I/O handling, and signal processing, often implemented by libraries like glibc on Linux® or the Microsoft® C Runtime Library (msvcrt.dll) dynamic link runtime library on Microsoft® Windows®. This cohesive ecosystem ensures that a compiled executable may reliably run across a large and diverse user base.
The technical burden of compiling, loading, and operating enclaves may limit an end user's ability to maintain security protections across their computing environment due to lack of tools such as compilers, loaders, and runtimes that support enclaves. The reliance on traditional process isolation methods and the limited availability of systems configured to support sub-process isolation with generic source code may leave code and data susceptible to breaches, especially when supervisory systems like operating systems or hypervisors are compromised. Furthermore, the limited ability to verify the trustworthiness of third-party libraries may compound these security risks, making it difficult to ensure the integrity and confidentiality of data. Broader adoption of trusted execution environments requires a reevaluation of the relationship between executables and libraries, along with a redefined ABI that supports stricter security protocols. Making TEEs ubiquitous may mitigate one or more of these issues. An enclave-aware ABI, enclave-aware compiler, and enclave-aware loader may provide commercially deployable toolchain support for translating generic source code into enclave-aware executables that participate in trusted execution environments while preserving interoperability with existing software ecosystems.
DESCRIPTION OF RELATED ARTAs shown in
A person having ordinary skill in the art (“PHOSITA”) would understand that traditional executables 334 may assume a single common virtual address space 220 (
A PHOSITA would further understand that existing Trusted Execution Environment (TEE) 326 technologies, including Intel® Software Guard Extensions (SGX), ARM® TrustZone®, AMD® Secure Encrypted Virtualization (SEV), and other confidential computing technologies, have historically used development models in which programmers write SDK-aware source code 332 (
Under such approaches, a developer typically writes SDK-aware source code that explicitly defines enclave entry points, enclave calls, and enclave interfaces using SDK-specific constructs. For example,
A PHOSITA would further recognize that SDK-specific source code containing the function calls to create and destroy an enclave (
Furthermore, the resulting SDK-specific build process often produces separate binaries or enclave artifacts that must be managed independently of a single traditional application executable. In contrast, an enclave-aware compiler 122 may translate generic source code into a single enclave-aware executable 126 having enclave-aware metadata, protected sections 156, enclave-aware instructions 128, or enclave-aware binary-level semantics.
A PHOSITA would recognize that SDK-aware source code 332 may impose a substantial burden on developers and may limit the ability of conventional software written in generic source code 118 to easily adopt enclave-based execution.
BRIEF SUMMARY OF THE INVENTIONThe present disclosure describes an enclave-aware architecture in which enclave semantics may be introduced during compilation rather than being expressed through SDK-aware source code by the programmer.
The present disclosure also describes an enclave-aware Application Binary Interface (eABI) 114 that extends or modifies a traditional ABI 342 to support controlled interaction between code executing in Trusted Execution Environments (TEEs) 326 such as enclaves 104 and code executing in common memory 166 (
An enclave-aware architecture may use generic source code 118 (
The present disclosure describes “eABI-aware” artifacts that utilize the eABI for interoperating between enclave-aware code that may be running in common memory or in a TEE such as an enclave (
The resulting executables may be interpreted by other components of the architecture, including an enclave-aware loader 146 (
In this architecture, the enclave-aware compiler generates executable structures (
As a result, enclave semantics may be introduced by an enclave-aware compiler 122 (
A PHOSITA would recognize that the architecture described herein enables enclave participation to be introduced during compilation without requiring source-level enclave constructs. Generic source code may be compiled by an enclave-aware compiler 122 that generates executable structures enabling enclave execution, control transfer, or data exchange between TEEs.
As a result, traditional applications may be compiled into enclave-aware executables capable of participating in trusted execution environments without requiring developers to write SDK-aware source code 332 or rely on specialized SDK workflows. The architecture may thereby support commercial adoption by allowing generic source code 118 to be extended with enclave-aware behavior while preserving compatibility with existing software ecosystems.
In certain embodiments, the present disclosure provides systems, methods, and non-transitory computer-readable media for enhancing security in computing environments by enabling generic source code to be translated into executable files that participate in trusted execution environments through an enclave-aware compiler, an enclave-aware loader, an eABI-aware runtime, and an enclave-aware Application Binary Interface (eABI). The disclosed technology may support executable-level or sub-process isolation using the eABI to permit executable components to interoperate across common memory, trusted execution environments, enclaves, kernel-level execution environments, or combinations thereof.
The eABI (
In certain embodiments, an enclave-aware compiler may translate generic source code into an enclave-aware executable file or an eABI-aware executable file (
In certain embodiments, an enclave-aware executable may include one or more protected sections configured for placement in a trusted execution environment and one or more unprotected sections configured for placement in common memory (
In certain embodiments, an enclave-aware loader may analyze an enclave-aware executable, eABI-aware executable, eABI-common executable, certificate information, target execution environment information 266, or combinations thereof. The enclave-aware loader may create, instantiate, load, map, provision, initialize, or otherwise prepare one or more trusted execution environments, and may load protected portions of executable files (
In certain embodiments, an eABI-aware runtime may mediate, facilitate, route, dispatch, broker, or otherwise support control transfer or data exchange between loaded executables according to the eABI (
In certain embodiments, a note may be formed, routed, dispatched, processed, returned, encrypted, decrypted, authenticated, validated, or otherwise handled according to the eABI (
In certain embodiments, a data security mode (
In certain embodiments, certificate-based trust mechanisms may be used to control loading, initialization, execution, external symbol dependency resolution, eABI participation, or data security mode availability (
In certain embodiments, the disclosed technology may be applied to kernel-level execution environments. A trusted execution environment may be instantiated within, loaded into, associated with, or made accessible to a kernel, kernel module, operating system service, device driver, hypervisor, firmware component, bootloader, privileged service, secure monitor, or other privileged execution environment (
In certain embodiments, methods are provided for compiling, loading, initializing, validating, executing, routing, dispatching, or mediating executable components according to the eABI (
The drawings described herein are illustrative and are not intended to limit the scope of the present disclosure. Unless expressly stated otherwise, any component, flow, field, table entry, relationship, or ordering shown in a drawing may be used independently or in combination with other disclosed components, flows, fields, table entries, relationships, or orderings.
Reference numbers used in the drawings are intended to identify corresponding structures, operations, data, metadata, or relationships described in the specification. A figure may omit details of another figure for clarity, and a figure that illustrates a particular embodiment does not require the same arrangement in every embodiment.
The following description presents illustrative embodiments and does not limit the claimed subject matter. Unless expressly stated otherwise, method steps need not be performed in the order presented and may be performed concurrently. The articles “a” and “an” mean one or more where the context permits.
The terms “comprising,” “including,” and “having” are open-ended unless the context expressly requires otherwise. A recited combination therefore may include additional interoperating software or hardware components.
Although the terms first, second, third, etc. may be used herein to describe various elements, components, regions, layers, and/or sections, these elements, components, regions, layers, and/or sections should not be limited by these terms. These terms may be used only to distinguish one element, component, region, layer, or section from another element, component, region, layer, or section. Terms such as “first,” “second,” and other numerical terms when used herein do not imply a sequence or order unless clearly indicated by the context. Thus, a first element, component, region, layer, or section discussed below could be termed a second element, component, region, layer, or section without departing from the teachings of the example embodiments. For example, references to a first executable, second executable, first enclave, or second enclave are used for clarity and do not require a particular order, hierarchy, location, trust level, or temporal sequence unless expressly stated.
“Semantics” refers generally to rules, information, structures, or operational behaviors that define, constrain, guide, or indicate how an operation or data structure is interpreted or performed. Semantics may be expressed by processor instructions 120, metadata 244, section attributes, symbol tables 314, note 212 structures, field values, policies, loader behavior, runtime behavior, calling conventions, data layouts, candidate data security modes 372, or combinations thereof.
The terms below describe components and operations of the enclave-aware execution architecture. Unless expressly stated otherwise, a feature described for one term, component, or embodiment may be used independently or in combination with another disclosed feature.
System/Computing EnvironmentA “system” 100 may include a processor 106 and memory 108. As shown in
A “processor” 106 (
A processor 106 (
An “enclave-aware processor” 124 is a processor 106 configured to support one or more trusted execution environments 326, such as enclaves 104. The enclave-aware processor may include hardware, microcode, firmware, memory-management mechanisms, or combinations thereof that enforce isolation between trusted execution environments and common memory, support enclave-aware instructions 128 and controlled transitions, enforce restricted-instruction policies, and protect enclave memory from processor instructions executing outside the enclave.
An enclave-aware processor 124 may support enclave creation, loading, measurement, initialization, entry, exit, attestation, key management, and removal. It may enforce memory-access rules that prevent code outside an enclave 104 from accessing protected enclave memory while permitting code inside the enclave to access authorized enclave and common memory regions. An enclave-aware loader 146, eABI-aware runtime 180, operating system 148, hypervisor 226, firmware, kernel component, or combination thereof may initiate, coordinate, request, or validate TEE lifecycle operations.
In some embodiments, an enclave-aware processor 124 may include hardware support for trusted execution environments (TEEs) 326 including, by way of non-limiting example, Intel® Software Guard Extensions (SGX) enclave technology, ARM® TrustZone® isolation technology, AMD® Secure Encrypted Virtualization (SEV) confidential computing technology, RISC-V enclave extensions, or other enclave-capable architectures.
Unless otherwise specified, references to a “processor” 106 are not limited to traditional processors 324 and may include enclave-aware processors 124 described herein.
Non-Transitory Computer-Readable Medium“Non-transitory computer-readable medium” 346 refers to one or more non-transitory storage media or storage resources configured to store computer-readable data before the data is loaded into memory 108 or otherwise used by a processor 106. A non-transitory computer-readable medium may include persistent storage, non-volatile memory, a filesystem, solid state storage, magnetic storage, optical storage, firmware storage, removable storage, network accessible storage, cloud storage, or combinations thereof. The computer-readable data may include source code 188, object code, executable files 190, libraries 328, metadata 244, eABI metadata 246, symbol tables 314, certificates 168, cryptographic keys, policies, configuration information, processor instructions 120, enclave-aware instructions 128, or combinations thereof.
In certain embodiments, the non-transitory computer-readable medium 346 may store one or more executable files 190 including a traditional executable file 234, eABI-aware executable file 238, enclave-aware executable file 264, eABI-common executable file 248, or combinations thereof. A loader, including a traditional loader 336 or enclave-aware loader 146, may load at least a portion of an executable file from the non-transitory computer-readable medium into memory 108 to form a loaded executable 364.
In certain embodiments, one or more non-transitory computer-readable media 346 store instructions that cause a processor to translate generic source code 118 into an eABI-common executable file 248, load at least part of that file into common memory 166 (
In certain embodiments, a non-transitory computer-readable medium 346 stores instructions that cause one or more processors 106 to analyze an eABI-aware executable file 238 or enclave-aware executable file 264; load protected sections 156 into a trusted execution environment 326 and unprotected sections 154 into common memory 166 (
In certain embodiments, processor instructions stored in one or more non-transitory computer-readable media 346 may cause one or more processors, loaded eABI-aware executables 240, an eABI-aware runtime 180, an enclave-aware loader 146, an entry/exit bootstrap module 288, or combinations thereof to perform method operations described herein. Such instructions may cause the one or more processors to maintain execution environments, form loaded eABI-aware executables, identify eABI metadata 246, apply binary-level semantics defined by the eABI, mediate or dispatch control transfer or data exchange, form or process notes 212, apply validation semantics, or otherwise support eABI-governed interoperability among loaded executables in different execution environments.
Processor InstructionsCertain terms are used herein to describe instruction types associated with execution within enclave-aware computing environments. Unless otherwise specified, these terms are intended to be interpreted broadly and may encompass processor instructions 120, enclave-aware instructions 128, restricted instructions 204, and related instruction types.
A “processor instruction” 120 (
Processor instructions 120 may execute inside or outside an enclave 104 unless restricted by the processor 106, memory manager, or execution environment.
An “enclave-aware instruction” 128 may be a processor instruction 120 associated with enclave-based execution semantics. In certain embodiments, enclave-aware instructions may be configured to enter an enclave 104, exit an enclave, create an enclave, perform enclave attestation, perform enclave key operations, or otherwise interoperate with TEEs 326 such as enclaves. In certain embodiments, enclave-aware instructions may be generated, emitted, stored, loaded, or executed in connection with an enclave-aware compiler 122, enclave-aware loader 146, enclave-aware executable 126, or combinations thereof.
Enclave-aware instructions 128 may fall into two categories, including privileged enclave-aware instructions for managing enclaves, and unprivileged enclave-aware instructions for interoperating with an enclave (
A “restricted instruction” 204 (
Unless otherwise specified, references to “processor instructions” 120 may include privileged instructions 242, unprivileged instructions 254, enclave-aware instructions 128, restricted instructions 204, or combinations thereof.
A “thread of execution” 224 may refer to a sequence of processor instructions 120 executed by a processor 106. The thread of execution may represent the smallest unit of processing that may be scheduled independently by an operating system 148. The thread of execution may enter or exit a TEE or an enclave 104. Multiple threads of execution may run concurrently in a system 100. The thread of execution may share resources such as the common virtual address space 220, open files, and execution state with other threads of execution while each thread maintains its own independent execution flow. The thread of execution may run inside an enclave, executing an instruction whose address is inside the enclave and accessing data or other instructions within the enclave (
When a thread of execution 224 is executing a processor instruction 120 outside an enclave 104, the thread of execution may not access data inside an enclave (
The “memory” 108 (
The “common virtual address space” 220 may be mapped from memory 108 or may include common memory 166. A PHOSITA would appreciate that the common virtual address space may include common memory, one or more enclaves 104, one or more trusted execution environments 326, one or more loaded executables 364, or combinations thereof for use by a usermode process 150 (
The “usermode process” 150 may perform a substantial portion of the workload 252 of the system 100. The usermode process is a partitioning scheme (
“Common memory” 166 may be in the common virtual address space 220 and may include memory 108 that does not contain an enclave 104 (
It should be appreciated that common memory 166 may provide interoperability among loaded executables 364 while offering a different protection model than a trusted execution environment 326 or enclave 104. In certain embodiments, an enclave-aware loader 146 may load unprotected sections 154 into common memory, and an eABI-aware runtime 180 may use common memory, transit buffers 308, notes 212, or loaded eABI-common executables 250 to support eABI-governed control transfer or data exchange between loaded executables in different execution environments (
Common memory 166 and TEEs 326 may use different initialization, access control, and control transfer mechanisms. Common memory may be mapped with ordinary read, write, or execute permissions and may permit control transfer to addresses allowed by the operating system, whereas an enclave or TEE may require measured or validated initialization and entry through defined entry points. An enclave or TEE may maintain enclave-compatible cryptographic keys 170 and other protected state not made available in unprotected form in common memory.
In certain embodiments, code or data that uses restricted instructions 204, operating system services, system calls 232, hypervisor 226 calls, traditional runtime services, common memory services, or eABI-common executable services may be placed in common memory 166 while protected code or protected data is placed in one or more trusted execution environments 326 according to eABI metadata 246, section attributes, data security modes 130, policy, or combinations thereof (
An “execution environment” refers to a memory region in which processor instructions of a loaded executable, executable portion, or section are configured to execute. An execution environment may include common memory 166, a trusted execution environment (TEE) 326 such as an enclave 104, a kernel-resident trusted execution environment 416 such as a kernel-resident enclave 402, a protected memory region, an unprotected memory region, a usermode execution domain, a kernelmode execution domain, or combinations thereof. An execution environment may be established, selected, identified, or initialized based at least in part on target execution environment information 266, loader analysis, runtime configuration, processor configuration, memory permissions, trust policy 386, isolation rules, or combinations thereof.
An “execution context” 420 refers to invocation-specific, per-call, per-thread, per-transition, or return-path state associated with a calling executable, thread of execution 224, control transfer 214, data exchange 312, note 212, outbound note 290, return note, or combination thereof and used to suspend, correlate, restore, resume, or complete execution associated with an invocation. The execution context may include register state, stack state, base-pointer state, stack-pointer state, instruction-pointer state, argument state, return state, note state, runtime state, selected data security mode state, thread state, an invocation identifier, note identifier, return-path identifier, replay resistance value, return-routing information, or combinations thereof.
A calling execution context refers to an execution context 420 associated with an invocation initiated by a calling executable.
In certain embodiments, an execution environment refers to a memory, execution, privilege, isolation, or protection domain in which one or more loaded executables may execute or be prepared for execution. In contrast, an execution context 420 refers to per-call, per-thread, per-transition, or per-invocation state used during execution or interoperability, including register state, stack state, argument state, return state, note state, runtime state, selected data security mode state, or combinations thereof. An execution environment may contain or be associated with one or more execution contexts, but the terms are not coextensive.
An “enclave” 104 is a type of trusted execution environment (TEE) 326. An enclave may refer to a trusted execution environment mapped into, associated with, or otherwise made available to a usermode process 150, common virtual address space 220, kernel, hypervisor, firmware component, or other execution environment. An enclave may provide security properties different from common memory 166 and may be protected from direct access by code executing outside the enclave (
Unless the context requires an enclave-specific hardware mechanism, operations described herein for creating, loading, provisioning, initializing, registering, or otherwise preparing an enclave may also be performed for a trusted execution environment that provides corresponding lifecycle, isolation, access-control, or protected-execution functionality.
A “trusted execution environment” 326 such as an enclave 104 may employ cryptographic techniques, enforcement mechanisms, access control mechanisms, memory management mechanisms, processor-enforced mechanisms, or combinations thereof to create a protected boundary within memory 108. Examples of trusted execution environment technologies may include Intel® Software Guard Extensions (SGX) enclave technology, AMD® Secure Encrypted Virtualization (SEV) confidential computing technology, ARM® TrustZone® isolation technology, Apple® Secure Enclave® security module, RISC-V® Keystone Enclave open standard technology, Qualcomm® Secure Execution Environment (QSEE) trusted execution environment, Huawei® Trusted Execution Environment, or combinations thereof. An enclave may be implemented using CPU instructions, GPU instructions, memory managers, hypervisors 226, dedicated hardware, firmware, microcode, secure monitors, virtualization mechanisms, or combinations thereof.
When a thread of execution 224 outside an enclave 104 attempts to access contents of the enclave, the thread of execution may fail or may be prevented from completing the attempted access according to processor-enforced, memory management, or trusted execution environment restrictions (
As used herein, the term “enclave” 104 may refer to a single enclave instance or to any one of multiple enclave instances that may concurrently exist within a usermode process 150 or other execution environment. More than one enclave may be created, loaded, initialized, or executed by an enclave-aware loader 146, and each such enclave instance may be configured to interoperate with the usermode process, with other enclaves, with common memory 166, with a loaded executable 364, or combinations thereof according to the eABI 114, through an eABI-aware runtime 180, by using notes 212, or combinations thereof. References in this description to “the enclave” are intended to encompass any enclave instance or a plurality of enclaves, unless the context expressly indicates otherwise.
Prior to initialization, the contents of an enclave 104 may be visible to an operating system 148 or other loading component; however, the enclave-aware processor 124 may be restricted from executing processor instructions 120 within the enclave. Initialization may transition the enclave from a constructed, loaded, or provisioned state into an execution-ready state in which selected processor instructions within the enclave may be executed and selected data within the enclave may be protected from direct access by code executing outside the enclave.
Initializing a trusted execution environment 326, including an enclave 104, may include creating, measuring, validating, authenticating, attesting, provisioning, configuring, or otherwise preparing the trusted execution environment for execution. Initializing the trusted execution environment may include verifying that an enclave-compatible cryptographic key 170 used to initialize the trusted execution environment or protected executable portion therein is trusted by the system 100, creating a secure identity for the trusted execution environment, authenticating or attesting other trusted execution environments or enclaves in the usermode process 150, evaluating trustworthiness of other trusted execution environments or enclaves, creating a secure enclave-compatible cryptographic key for use between trusted execution environments or enclaves, or combinations thereof. Initializing the trusted execution environment may also include initializing protected execution-environment data structures within, or associated with, the trusted execution environment, including a private stack, private heap, dispatch table, symbol table 314, key table, trust table, external symbol dependency map, published symbol map, or combinations thereof, without requiring significant developer involvement (
Initializing a trusted execution environment 326, including an enclave 104, may further include obtaining published symbol information from one or more loaded executables 364 (
In certain embodiments, a first trusted execution environment and a second trusted execution environment within a common virtual address space may be initialized with respective protected execution-environment data structures. The respective protected execution-environment data structures may include respective private stacks, private heaps, dispatch tables, symbol tables, key tables, trust tables, external symbol dependency maps, published symbol maps, or combinations thereof. Such structures may be initialized separately for loaded eABI-aware executables occupying different trusted execution environments so that symbol resolution, controlled entry, validation, data exchange, control transfer, or combinations thereof are maintained according to the eABI for the corresponding trusted execution environment.
During initialization, an enclave 104 may be cryptographically verified to determine the enclave's integrity or authenticity, thereby providing assurance that the enclave has not been tampered with and conforms to an expected configuration. After a successful verification, contents of the enclave may not be visible to privileged threads, e.g., an operating system 148 or threads running in common memory 166. After a successful verification, processor instructions 120 within the enclave may be executed by an enclave-aware processor 124, and the enclave may securely store or process protected code, protected data, protected sections 156, sensitive information, cryptographic material, metadata, or combinations thereof. The enclave may be cryptographically re-validated to verify that it is an intended enclave, including by verifying that an unauthorized, substituted, or unintended enclave has not been mapped instead of the intended enclave.
In some conventional implementations, an enclave 104, trusted execution environment 326, protected section 156, or enclave-aware executable 126 may be associated with a cryptographic signature 228 that supports integrity verification, while the cryptographic signature need not be associated with a certificate 168, certificate chain 388, certificate-based public key infrastructure 172, publisher identity, provenance information 380, or other information demonstrating an origin, attribution, or trust status of the signed code or data.
An “enclave-compatible cryptographic key” 170 is used to verify that the data and code loaded into an enclave are genuine and have not been tampered with since they were digitally signed by a publisher using an enclave-compatible cryptographic key. An enclave-compatible cryptographic key may be bound to, derived from, included in, authenticated by, certified by, referenced by, or otherwise associated with a certificate 168 associated with an enclave-aware executable file 264 or protected section 156. An enclave-aware loader 146 may verify the relationship between the enclave-compatible cryptographic key and the certificate before initializing a trusted execution environment 326 containing a loaded enclave-aware executable 268.
In certain embodiments, the verification may be used to detect, prevent, restrict, or respond to substitution of an unauthorized key, certificate, protected section, executable file 190, or combinations thereof before protected code or data is admitted into the trusted execution environment.
In certain embodiments, the enclave-compatible cryptographic key may be used to support enclave initialization, integrity verification, attestation, data security mode 130 processing, interoperability according to the eABI, governed launch, or combinations thereof.
In certain embodiments, when verification of the relationship between the enclave-compatible cryptographic key used to initialize the trusted execution environment and the certificate fails, the enclave-aware loader 146 may generate or update a trust determination to indicate that initialization of the trusted execution environment 326 is not permitted and may refrain from or prevent initializing the trusted execution environment.
A “main enclave” 200 (
A “library enclave” 202 may contain or correspond to a loaded enclave-aware executable 268 that publishes one or more symbols 194, functions, services, or data used to satisfy external symbol dependencies 184 of another executable. A library enclave may have its own dependent executables 280 (
An “Application Binary Interface” (ABI) (
A “traditional ABI” 342 is an ABI for traditional executables 334 operating in common memory 166 of a common virtual address space 220 through direct calls, shared memory, and conventional calling conventions. A traditional ABI need not define binary-level semantics for interoperability across enclave or other trusted execution environment boundaries.
An “enclave-aware Application Binary Interface” (eABI) 114 (
The eABI 114 may govern interoperability (
The eABI 114 may preserve selected traditional ABI behavior for intra-executable or common memory operations while adding semantics for calls, data transfer, symbol access, notes 212, restricted operations, or isolated kernel resource access across execution environment boundaries. It may apply where a thread lacks access to all memory in a usermode process 150 or crosses a boundary among usermode, kernelmode, common memory, trusted, untrusted, and protected execution environments.
The eABI 114 may be embodied by executable file and symbol metadata, eABI metadata 246, processor instructions 120, note 212 structures (
“Data exchange” 312 refers to data, arguments, return values, status information, copied data, referenced data, descriptors, pointers, handles, metadata 244, or combinations thereof used for control transfer 214, symbol access, note processing, or combinations thereof according to the eABI. The data to be exchanged may be stored in common memory 166, an enclave 104, a trusted execution environment 326, a note, a protected payload 276, a transit buffer 308, or combinations thereof. The data to be exchanged may be represented, copied, protected, validated, or transferred according to eABI metadata 246, note formation semantics 370, selected data security mode 374, policy, or combinations thereof.
An “external reference” 366 refers to a call, access, invocation, read, write, or other use by a loaded executable 364 of functionality or data associated with a symbol defined outside that loaded executable. An external reference may correspond to an external symbol dependency 184, imported or published symbol 194, relocation, function or data symbol, service, entry point 262, control transfer 214, or combination thereof.
A “control transfer” 214 is an eABI-governed transfer for a thread of execution 224 from a calling loaded executable 364 in a first execution environment to callable functionality associated with a called loaded executable, a common-memory executable, a kernel service interface, or other target functionality in a different execution environment. A local branch, local function call, or other intra-executable change in an instruction pointer, program counter, call stack, or equivalent processor execution state that remains within the same loaded executable and the same execution environment is not, by itself, a control transfer in this eABI sense. In an eABI-aware environment, the requested target of the control transfer may be represented by an external symbol dependency 184, resolved to a published symbol 194 and a defined entry point 262, and coordinated using note 212 formation, dispatch, routing, delivery through the defined entry point, direct note transfer, or a combination thereof according to the eABI 114.
A “dependency rule” refers to one or more criteria, requirements, constraints, or policy values used to determine whether an external symbol dependency 184 may be resolved to a published symbol 194, whether a loaded executable 364 is eligible to satisfy the external symbol dependency, or which of multiple published symbols may be selected to satisfy the external symbol dependency. A dependency rule may be based on a symbol name, symbol hash, datatype, function prototype, calling convention, executable identity, executable version, publisher identity, provenance information 380, certificate 168 status, trust determination, target execution environment information 266, data security mode 130, or combinations thereof.
The eABI 114 may govern calling and called executable roles; outbound, inbound, and return notes; runtime-mediated transfer through a transit buffer 308 or processor-supported direct note transfer; selected data security modes; routable envelopes; protected, argument, referenced-data, return, common, syscall, and kernel payloads; and corresponding dispatch, routing, delivery, data-transfer, controlled-entry, validation, and return semantics.
A “calling executable” (
A “called executable” refers to a loaded eABI-aware executable that, for the particular invocation, receives or delivers the invocation and performs, provides, or controls access to the requested functionality, data, service, or combination thereof. The calling executable and called executable roles are relative to the particular invocation and are not permanent properties of the loaded eABI-aware executables. A loaded eABI-aware executable that is the called executable for one invocation may be the calling executable for another invocation (
For a particular invocation, the calling executable remains the calling executable and the called executable remains the called executable during an associated return pathway. Accordingly, dispatch of a return note by the called executable and delivery of the return note by the calling executable does not reverse the calling executable and called executable roles for the original invocation.
“Called functionality” refers to a function, service, operation, data access, or other functionality performed or provided in response to an invocation by a called executable, isolated kernel code 418, a kernel service interface 414, or another execution component associated with the destination of the invocation. Use of the term called functionality does not require the execution component providing the functionality to constitute a separately loaded executable.
The eABI 114 may define symbol resolution semantics for resolving an external symbol dependency 184 associated with one loaded executable 364 to a published symbol 194 associated with another loaded executable (
Symbol resolution semantics defined by the eABI 114 may include semantically matching an external symbol dependency 184 to a published symbol 194 using one or more compatibility criteria. The compatibility criteria may include a symbol name, symbol hash, datatype, return datatype, parameter datatype, function prototype, calling convention, version, data security requirement, permitted data security mode 130, certificate 168 status, trust status, production mode 174 compatibility, target execution environment information 266, usermode or kernelmode execution status, publisher identity, provenance information 380, symbol-level policy, note-level policy, or combinations thereof. Semantic matching may include determining that the external symbol dependency and the published symbol are identical, equivalent, compatible, authorized, or otherwise resolvable according to the eABI.
In certain embodiments, resolving an external symbol dependency to a published symbol requires collective satisfaction of multiple compatibility criteria. For a resolution requiring a dependency symbol identifier or dependency symbol hash, a dependency function prototype, a dependency eABI version, and a dependency boundary class, the corresponding published-symbol identifier or published-symbol hash, published-symbol function prototype, published-symbol eABI version, and supported boundary class are each compared. The resolution is accepted only when every required comparison indicates a match or permitted compatibility under the eABI. If any required comparison fails, the resolution is rejected, deferred, or directed to another compatible published symbol.
Kernel-service symbols may identify isolated kernel code 418 or functionality exposed through a kernel service interface 414 for controlled access to an isolated kernel resource 412, and may be invoked using kernel notes 410. Such symbols may be resolved and accessed under the eABI 114 subject to applicable trust, policy, boundary-class, controlled-entry, and data security mode requirements.
An “eABI operation” is an operation governed, permitted, restricted, mediated, or performed according to the eABI 114, including symbol publication or access, dependency resolution, note formation or processing, dispatch, routing, delivery, return processing, control transfer 214, data exchange 312, data security mode use, registration, or combinations thereof. A “permitted eABI operation” is an eABI operation authorized by a trust determination, policy, registration record, operation-specific permission, or combination thereof.
The eABI may be implemented as operational behavior of loaded eABI-aware executables 240, an eABI-aware runtime 180, an enclave-aware loader 146, processor-supported mechanisms, or combinations thereof using eABI metadata, instructions, note structures, phase rules, return rules, validation rules, and data security mode rules described herein.
“eABI participation” is the ability, eligibility, or authorization of a loaded executable 364, trusted execution environment 326, kernel-resident trusted execution environment 416, kernel service interface 414, or other component to perform one or more eABI operations, including symbol publication or access, dependency resolution, note processing, control transfer, data exchange, return processing, or data-security-mode use.
eABI participation may be permitted, restricted, or denied based on a trust determination, certificate 168, certificate validation result 378, provenance information 380, production mode 174, selected data security mode 374, policy, registration record, operation-specific permission, or combination thereof. A component that does not satisfy the applicable conditions may be restricted from publishing or satisfying symbols, sending or receiving notes, using selected modes, or performing other eABI operations.
Source CodeCertain terms are used herein to describe forms of source code 188 relevant to the compilation and execution architectures disclosed in the present application. Unless otherwise specified, the term “source code” is used in a generic sense and may refer to generic source code 118, SDK-aware source code 332, enclave-aware source code 142, or other variants.
“Source code” 188 (
“Generic source code” 118 refers to source code 188 written in a conventional programming language (
Generic source code 118 may be compiled into executable files configured for execution, in whole or in part, in common memory 166, one or more trusted execution environments 326, kernel-resident trusted execution environments 416, or combinations thereof. The enclave-aware compiler 122 may generate protected and unprotected sections, eABI metadata 246, processor instructions 120, note formation information, candidate data security modes, and trust information that support controlled entry, protected placement, note-mediated interoperability, and reduced exposure of unpublished data without requiring SDK-aware source code 332.
Enclave-aware compiler-generated executable structures may provide executable-level partitioning within a usermode process 150 or other computing environment. Protected and unprotected sections, eABI metadata 246, published-symbol and external-dependency information, note formation semantics, and candidate data security modes 372 may permit an enclave-aware loader 146 and eABI-aware runtime 180 to place and interoperate executable components across common memory 166 and separate trusted execution environments 326 while preserving sub-process isolation (
Source code 188 may include “generic main source code” 236 that identifies a program entry point 262 and invokes functions or services provided outside the main executable. An enclave-aware compiler 122 may translate the generic main source code into an enclave-aware main executable 196 having a published entry point, external symbol dependencies 184, and processor instructions and eABI metadata 246 for eABI-mediated invocation of dependent functionality.
Source code 188 may also include generic library source code 274 defining published symbols 194 and associated entry points, and may include external symbol dependencies 184 on other executables. A compiler may derive symbol tables 314, eABI metadata 246, function signature information, note formation information, and routing or resolution information from the source for use by an enclave-aware loader 146, eABI-aware runtime 180, and loaded executables 364.
“SDK-aware source code” 332 refers to source code 188 that expresses enclave semantics through SDK-specific constructs provided by a specialized Software Development Kit (SDK) (
“Enclave-aware source code” 142 (
A “trusted execution environment transition wrapper” refers to manually written source code 188, automatically generated source code, a stub, proxy, trampoline, bridge, or other executable logic that explicitly initiates, performs, or manages control transfer or data exchange across a boundary of a trusted execution environment 326. An enclave-transition wrapper is a trusted execution environment transition wrapper associated with an enclave 104.
Unlike SDK-aware source code 332, enclave-aware source code 142 (
The following example of enclave-aware source code 142 uses the enclave source code parameter 144 “#pragma txMaxThreads 1” to inform the enclave-aware compiler 122 that this program may be configured for one thread of execution 224. In another example, the enclave-aware source code uses a compiler-recognized “private” storage class-like specifier (
In certain embodiments, generic source code 118 and enclave-aware source code 142 may overlap. For example, source code 188 may remain generic in the sense that it does not require SDK-specific enclave constructs, SDK-specific APIs, SDK-specific lifecycle calls, or SDK-specific interface definition artifacts, while also being enclave-aware in the sense that it includes compiler-recognizable annotations, parameters, qualifiers, attributes, pragmas, storage class-like specifiers, command line responsive constructs, or other source-level information associated with enclave-aware compilation. Accordingly, the distinction between generic source code and enclave-aware source code may depend upon the extent to which enclave-related semantics are expressed in the source code itself, supplied through compiler options or metadata, or introduced automatically during compilation. This overlap may allow ordinary software to receive enclave-aware treatment through incremental source-level guidance, compiler configuration, eABI metadata 246, policy, or combinations thereof without requiring a specialized enclave SDK workflow (
In contrast, a PHOSITA would recognize that SDK-aware source code 332 (
Unless otherwise specified, unqualified references to “source code” 188 are not limited to generic source code 118 and do not exclude SDK-aware source code 332, enclave-aware source code 142, or combinations thereof.
“Function signature” refers to source code 188 information, function metadata 244, compiler-derived information, symbol information, type information, calling convention information, or combinations thereof associated with a function, procedure, method, subroutine, service, published symbol 194, external symbol, entry point 262, or other callable code portion. A function signature may include a function name, symbol name, function identifier, symbol identifier, function hash, symbol hash, external symbol dependency 184, published symbol, return type, return datatype, argument count, argument order, argument names, parameter names, argument datatypes, parameter datatypes, pointer or reference type information, const qualification, calling convention, variadic-function information, or combinations thereof. A function signature may be used by an enclave-aware compiler 122 to support symbol resolution, note formation, control transfer, data exchange, argument handling, return handling, or interoperability according to an eABI.
In certain embodiments, a function call in source code 188 may be associated with a function signature. The function signature may identify a called function, published symbol 194, imported symbol, external symbol dependency 184, entry point 262, service, functionality, or data associated with a symbol, or combinations thereof. The function signature may further identify argument type information, argument order information, return-type information, calling convention information, variadic-function information, or combinations thereof used by an enclave-aware compiler 122 to generate processor instructions 120, eABI metadata 246, note formation semantics, symbol metadata, argument payload 318 information, referenced-data payload 350 information, return payload 352 information, or combinations thereof. The generated information may support conveying function call arguments, referenced data, return values, status information, or combinations thereof across execution environment boundaries according to an eABI (
When generic source code 118 (
Information derived from a function signature may be distributed between a routable envelope 272 and a protected payload 276. The envelope may expose information sufficient for routing, logging, policy evaluation, or transit buffer handling, while the protected payload may contain symbol, function signature, argument, referenced-data, return, or cryptographic information protected from interpretation outside an authorized execution environment.
In certain embodiments, generic source code 118 may include a function call written without an enclave-specific interface definition language, enclave-specific call declaration, manually written enclave transition wrapper, explicit marshaling, or combinations thereof. An enclave-aware compiler 122 may infer, derive, or determine function signature information and argument payload 318 information from the generic source code and may generate processor instructions 120, metadata 244, note formation semantics, or combinations thereof for conveying the corresponding function call arguments 362 across an execution environment boundary according to the eABI 114 (
Certain terms are used herein to describe compilers associated with the execution architectures disclosed in the present application. Unless otherwise specified, the term “compiler” is used in a generic sense and may refer to a traditional compiler 330, enclave-aware compiler 122, or another compiler variant (
“Compiler” (
A “traditional compiler” 330 (
An “enclave-aware compiler” 122 (
An enclave-aware compiler may generate executables 110 configured to operate in common memory 166, within a trusted execution environment 326, within an enclave 104, within a kernel-resident enclave 402, within a kernel-resident trusted execution environment 416, or combinations thereof, while using an eABI for control transfer or data exchange between loaded executables 364 in different execution environments.
An enclave-aware compiler may generate an eABI-kernel executable configured to be loaded into a kernel-resident enclave 402, a kernel-resident trusted execution environment 416, or combinations thereof, while using an eABI for control transfer or data exchange between loaded executables 364 in different execution environments.
For a particular executable role, the enclave-aware compiler 122 may produce a single enclave-aware executable file 264 corresponding to that executable. For example, generic main source code 236 may produce a first executable file corresponding to a main executable 278, and generic library source code 274 may separately produce a second executable file corresponding to a library executable 284 (
An enclave-aware compiler 122 may generate an eABI-aware executable file 238 including sections 152, processor instructions 120, eABI metadata 246, external symbol dependencies 184, published symbols 194, note formation semantics 370, candidate data security modes 372, note-ingest/dispatch-capability 368, return semantics, certificate information, or combinations thereof. After at least a portion of the eABI-aware executable file is loaded into memory 108 to form a loaded eABI-aware executable 240, the loaded eABI-aware executable may interoperate with one or more loaded executables 364 according to the eABI 114.
An enclave-aware compiler 122 may translate restricted source code 206 into an eABI-common executable file 248 configured to be loaded into common memory 166 (
In certain embodiments, an enclave-aware compiler 122 may include one or more components of a compilation toolchain configured to produce an eABI-aware executable 112 or an enclave-aware executable file 264. Such components may include a compiler frontend, compiler backend, assembler, linker, loader preparation tool, metadata generator, section generation tool, relocation processor, symbol table processor, code signing tool, certificate insertion tool, post-link processing tool, compiler driver, build tool, or combinations thereof. Accordingly, an operation described as being performed by an enclave-aware compiler may be performed by a single compiler program, by a compiler driver invoking multiple toolchain components, by a linker or post-link tool operating after compilation, or by another toolchain component configured to produce, modify, sign, or finalize an eABI-aware executable. The enclave-aware compiler may therefore represent a compiler stage, link stage, post-link stage, signing stage, packaging stage, or build system stage implementation of eABI 114 support.
An enclave-aware compiler 122 may derive function signature information and use the derived information to generate eABI metadata 246 and processor instructions 120 defining argument representations, referenced-data representations, return representations, note-layout information, and argument-implied sharing for eABI-governed control transfer or data exchange (
When generic source code 118 includes an external symbol dependency 184, the enclave-aware compiler 122 may generate eABI metadata 246, processor instructions 120, symbol information, note-formation information, candidate data security modes 372, and dispatch information for use, after loading, in resolving the external symbol dependency and invoking a corresponding published symbol 194.
When generic source code 118 includes a published symbol 194, the enclave-aware compiler 122 may generate eABI metadata 246, processor instructions 120, entry point information, validation information, and candidate data security modes 372 that identify the published symbol and one or more defined entry points and restrict external access or control transfer to a defined entry point.
The enclave-aware compiler 122 may be configured to produce executables 110 that are backward compatible with traditional executables 334. The enclave-aware compiler may also include options for targeting alternate hardware architectures and alternate ABIs where the alternate system uses alternative trusted execution environments 326. In certain embodiments, the enclave-aware compiler may preserve selected traditional ABI 342 behavior for intra-executable calls or common memory calls while adding eABI-governed semantics for calls, data transfers, restricted instruction execution, symbol access, or note 212 processing involving different execution environments.
The enclave-aware compiler may introduce enclave semantics during compilation of generic source code 118 (
In certain embodiments, for a particular executable 110, the enclave-aware compiler 122 may apply a default placement rule (
In certain embodiments, the default placement rule applies to each section generated from source code for a particular executable, including text sections, data sections, metadata sections, and other loadable sections. Each such section is designated for placement in a trusted execution environment unless the source code, a compiler input, a section attribute, a policy, or eABI metadata expressly designates the section for common memory placement, or the section is generated from restricted source code corresponding to an operation that is to execute outside the trusted execution environment. The enclave-aware compiler generates eABI metadata, section attributes, or both identifying the selected target execution environment for each generated section.
An enclave-aware compiler 122 or another toolchain component may generate, insert, or associate a certificate 168, certificate chain 388, cryptographic signature 228, enclave-compatible-key information, signed-section information, or other trust information with an executable file 190 or protected section 156 for use in governed loading (
An enclave-aware compiler 122 may receive one or more enclave command line parameters 140 (
An enclave-aware compiler 122 need not execute on an enclave-aware processor 124. For example, the enclave-aware compiler may execute on a development system, build server, traditional processor 324, virtualized build environment, or other computing environment while generating enclave-aware executables 126 configured to execute on, be loaded for, or interoperate with an enclave-aware processor, trusted execution environment 326, enclave 104, kernel-resident enclave 402, kernel-resident trusted execution environment 416, alternate hardware architecture, alternate eABI, or combinations thereof.
Unless otherwise specified, unqualified references to “compiler” are not limited to traditional compilers 330 and may include an enclave-aware compiler 122, compiler frontend, compiler backend, assembler, linker, code signing tool, build tool, or combinations thereof.
“Enclave command line parameters” 140 (
In certain embodiments, an enclave command line parameter 140 may select, constrain, or configure an output type, target execution environment, trusted execution environment 326, enclave 104, kernel-resident enclave 402, kernel-resident trusted execution environment 416, common-memory placement, protected placement, default data-placement rule, section-placement rule, eABI-common executable 208 generation, restricted instruction 204 handling, enclave-aware storage class 270, data security mode 130, note 212 formation behavior, note routing behavior, symbol publication behavior, external symbol dependency 184 behavior, entry point 262 behavior, thread of execution 224 behavior, memory allocation, stack size, heap size, maximum thread count, debug mode setting, vendor identifier, processor target, alternate eABI, certificate 168 information, cryptographic signature 228 information, enclave-compatible cryptographic key 170 information, production mode 174 requirement, governed launch requirement, kernel-resident-TEE interoperability treatment, or combinations thereof.
In response to an enclave command line parameter 140, the enclave-aware toolchain may generate, modify, insert, associate, select, or omit processor instructions 120, enclave-aware instructions 128, eABI metadata 246, section or segment attributes, target execution environment information 266, symbol information, relocation information, note formation information, candidate data security modes 372, certificate information, signature information, kernel note information, configuration information, or combinations thereof. The generated information may be used by an enclave-aware loader 146, eABI-aware runtime 180, loaded executable 364, operating system 148, hypervisor 226, trusted execution environment 326, or combinations thereof during placement, loading, initialization, validation, attestation, governed launch, dispatch, routing, delivery, return processing, restricted-operation handling, symbol resolution, or eABI-governed interoperability.
Enclave command line parameters 140 may provide enclave-aware behavior without requiring SDK-aware source code 332 (
The terms described in this section may identify different aspects of an executable 110, including a lifecycle state, execution environment, interoperability capability, or program role. For example, an executable may be an executable file 190 before loading and a loaded executable 364 after loading; may be eABI-aware, enclave-aware, eABI-common, traditional, or combinations thereof; and may operate as a main executable 278, library executable 284, operating system 148 kernel, or combinations thereof unless the context indicates otherwise.
An “executable” 110 (
An executable may be created by a compiler (
An “executable file” 190 refers to an executable 110 as stored in a non-transitory computer-readable medium 346 (
A “loaded executable” 364 refers to an in-memory executable instance, executable image, executable portion, or execution-ready representation formed from at least a portion of an executable file 190 after the portion has been loaded, mapped, copied, relocated, linked, instantiated, initialized, or otherwise prepared for execution in memory 108 (
An executable 110 may initiate eABI-governed access to functionality or data through an external symbol dependency 184 that is resolved to a published symbol 194 and a corresponding defined entry point 262 (
An enclave-aware loader 146 may obtain dependent executable files (
An eABI-aware runtime 180 may use published-symbol, external-dependency, and symbol resolution information to dispatch, route, or deliver notes 212 (
A “main executable” 278 (
A “library executable” 284 (
A “traditional executable” 334 (
A “traditional executable file” 234 may be loaded by a traditional loader 336 into common memory 166 to form a “loaded traditional executable” 192 (
A PHOSITA would understand that traditional executables 334 formed from generic source code 118 (
An “eABI-aware executable” 112 (
The eABI-aware executable 112 may also include eABI metadata 246 and inter-execution environment interoperability semantics not required by a traditional executable 334 for eABI-enabled interoperability. Inter-trusted execution environment interoperability semantics may include note formation semantics 370, candidate data security modes 372, note ingestion semantics, controlled entry point semantics, note dispatch semantics, routable envelope 272 semantics, protected payload 276 semantics, return semantics, restricted instruction call semantics, or combinations thereof.
In certain embodiments, an eABI-aware executable 112 may include processor instructions 120 generated by an enclave-aware compiler 122 that cause a loaded executable 364 to form, populate, protect, transmit, receive, validate, decrypt, or process a note 212 according to the eABI 114 during execution.
Accordingly, an eABI-aware executable 112 may carry eABI metadata 246 or binary-level interoperability information that enables an enclave-aware loader 146, eABI-aware runtime 180, entry/exit bootstrap module 288, loaded eABI-aware executable 240, trusted execution environment 326, eABI-common executable 208, kernel-resident enclave 402, kernel-resident trusted execution environment 416, or combinations thereof to support control transfer or data exchange between loaded executables 364 in different execution environments, whereas a traditional executable 334 generally relies on traditional ABI 342-defined direct calls and common memory 166 symbol access.
An eABI-aware executable 112 may support access to a kernel-resident trusted execution environment 416, isolated kernel code 418, an isolated kernel resource 412, or a kernel service interface 414 by forming or processing a syscall note 306 or kernel note 410 according to the eABI 114.
An “eABI-aware executable file” 238 refers to an eABI-aware executable 112 as stored in a non-transitory computer-readable medium 346 (
A “loaded eABI-aware executable” 240 refers to an in-memory executable instance, executable image, executable portion, or execution-ready representation formed from at least a portion of an eABI-aware executable file 238 after the portion has been loaded, mapped, copied, relocated, linked, instantiated, initialized, or otherwise prepared for execution in memory 108 (
An eABI-aware executable 112 may perform a control transfer or data exchange 312 between loaded eABI-aware executables 240 in different execution environments using notes 212. Notes may be used to convey arguments, referenced data, return values, requests, responses, or other data exchange associated with processor instructions 120, data, services, functions, or published interfaces through an external symbol dependency 184 resolved to a published symbol 194. An enclave-aware loader 146 may determine the type of execution environment into which the eABI-aware executable is to be loaded, the execution environments including common memory 166, a trusted execution environment 326, an enclave 104, or combinations thereof.
A loaded eABI-aware executable 240 may advertise, support, request, accept, maintain, or apply candidate data security modes 372 for a published symbol 194, external symbol dependency 184, note 212, control transfer, data exchange, return path, or other eABI operation. A selected data security mode 374 may be chosen from modes supported by the participating executables and permitted by applicable policy (
An “eABI-aware main executable” 182 refers to an eABI-aware executable 112 having a main-executable role. In certain embodiments, an eABI-aware main executable may initiate, launch, or establish a usermode process 150, may include an entry point 262, and may interoperate with one or more other loaded executables 364 according to the eABI 114. A loaded eABI-aware main executable refers to an in-memory instance, executable image, executable portion, or execution-ready representation of an eABI-aware main executable after loading.
An “eABI-aware library executable” 186 refers to an eABI-aware executable 112 having a library-executable role. In certain embodiments, an eABI-aware library executable may provide one or more published symbols 194, services, functions, data, interfaces, or defined entry points 262 that satisfy external symbol dependencies 184 of one or more other executables according to the eABI 114. A loaded eABI-aware library executable refers to an in-memory instance, executable image, executable portion, or execution-ready representation of an eABI-aware library executable after loading.
An eABI-aware main executable 182 or eABI-aware library executable 186 may be implemented as, or may be included in, an enclave-aware executable 126, an eABI-common executable 208, a loaded eABI-aware executable 240, or a loaded enclave-aware executable 268 when the applicable subtype, lifecycle state, and execution environment are indicated by context.
“eABI metadata” 246 is metadata 244 associated with an eABI-aware executable 112 and used to support interoperability according to the eABI 114. It may identify target execution environments and section placement; protected and unprotected sections; external symbol dependencies 184 and published symbols 194; candidate data security modes 372; eABI versions; trust, publisher, or provenance information; cryptographic support information; kernel-service or isolated-resource requests; function signature, note formation, controlled entry, return, or other eABI information; and combinations thereof.
“Target execution environment information” 266 refers to eABI metadata 246, section information, section-placement information, segment attribute information, compiler-generated information, loader-readable information, policy information, or combinations thereof that identifies, requests, requires, constrains, or permits an execution environment into which a section 152, executable portion, processor instruction 120, data object, protected section 156, unprotected section 154, or combination thereof is to be loaded, mapped, provisioned, initialized, or executed. The target execution environment may include common memory 166, an enclave 104, a trusted execution environment 326, a kernel-resident enclave 402, a kernel-resident trusted execution environment 416, or combinations thereof. Target execution environment information may be generated by an enclave-aware compiler 122, linker, loader-preparation tool, metadata generator, policy component, or other toolchain component and may be used by an enclave-aware loader 146, eABI-aware runtime 180, operating system 148, trusted execution environment, or combinations thereof during loading, placement, initialization, registration, routing, validation, or execution.
An enclave-aware loader 146 may use eABI metadata 246 and target execution environment information 266 to determine whether a portion of an executable file 190 is loaded into common memory 166, a trusted execution environment 326, an enclave 104, a kernel-resident trusted execution environment 416, or another protected region, or is deferred or excluded from loading (
An eABI-aware runtime 180 may use eABI metadata 246 and runtime information derived during loading, registration, symbol resolution, or execution to facilitate eABI-governed control transfer or data exchange. The runtime-derived information is not itself limited to metadata stored in an executable file (
In contrast, traditional executable 334 metadata may not typically include metadata 244 identifying protected sections 156, candidate data security modes 372, note formation semantics 370, isolated kernel resource request information, or combinations thereof.
An “eABI-common executable” 208 (
An “eABI-common executable file” 248 refers to an eABI-common executable 208 (
An “unprotected executable section” refers to an unprotected section 154 containing processor instructions 120 configured for execution in common memory 166. An unprotected executable section may comprise an “unprotected text section” 162.
A “loaded eABI-common executable” 250 refers to an in-memory executable instance, executable image, executable portion, or execution-ready representation formed from at least a portion of an eABI-common executable file 248 after the portion has been loaded, mapped, copied, relocated, linked, instantiated, initialized, or otherwise prepared for execution in common memory 166 (
A loaded eABI-common executable 250 may execute a restricted instruction 204 in common memory 166 on behalf of, or in response to a control transfer or data exchange from, a loaded enclave-aware executable 268, a kernel-resident enclave 402, or kernel-resident trusted execution environment 416 (
In some embodiments, a loaded eABI-common executable 250 is treated as a loaded executable 364 governed by the eABI 114 for restricted instruction call semantics, symbol resolution semantics, dispatch semantics, data transfer semantics, and return semantics, even when the loaded eABI-common executable executes in common memory outside a trusted execution environment.
In certain embodiments, a loaded eABI-common executable 250 in common memory 166 may implement or provide a common memory service (
An “enclave-aware executable” 126 (
Because an enclave-aware executable 126 is a specialized eABI-aware executable 112, features described herein for an eABI-aware executable may also be included in, used by, or performed by an enclave-aware executable unless the context indicates otherwise.
In certain embodiments, an enclave-aware executable 126 may include protected sections 156 and unprotected sections 154, where the protected sections are configured to be loaded into a trusted execution environment 326 and the unprotected sections are configured to be loaded into common memory 166 (
Unlike a traditional executable 334, an enclave-aware executable 126 may include enclave-aware instructions 128, protected sections 156, eABI metadata 246 associated with the protected sections, eABI trust evidence 382, enclave-compatible cryptographic key 170, a certificate 168 associated with the enclave-compatible cryptographic key, candidate data security modes 372, entry point 262 information for controlled entry into a trusted execution environment 326, published symbol 194 metadata configured for controlled access from outside the trusted execution environment, external symbol dependency 184 metadata configured for access from inside the trusted execution environment, note formation semantics 370 for trusted execution environment boundary crossing, protected payload 276 semantics, semantics for sharing keys between trusted execution environments, restricted instruction 204 handling information or combinations thereof.
An “enclave-aware executable file” 264 refers to an enclave-aware executable 126 as stored in a non-transitory computer-readable medium 346 (
In certain embodiments, an enclave-aware executable file 264 may be produced by an enclave-aware compiler 122 from generic source code 118 (
In certain embodiments, eABI trust evidence 382 may be generated, issued, inserted into, embedded in, appended to, digitally signed, or otherwise associated with an enclave-aware executable file 264 compiled from generic source code 118 by an enclave-aware compiler 122.
An enclave-aware loader 146 may analyze the enclave-aware executable file 264 (
An enclave-aware loader 146 may extract, read, reference, validate, or otherwise access eABI trust evidence 382 from an enclave-aware executable file 264 before loading a protected section 156 into a trusted execution environment 326 such as an enclave 104, before initializing the trusted execution environment, or before permitting eABI-mediated control transfer or data exchange. The validation may determine whether the protected section is authorized for loading under the trust policy 386, production mode 174 state, trusted root set, certificate validity status, certificate usage constraint, revocation status, or combinations thereof.
In certain embodiments, a trust determination (
A “loaded enclave-aware executable” 268 refers to an in-memory executable instance, executable image, executable portion, or execution-ready representation formed from at least a portion of an enclave-aware executable file 264 after the portion has been loaded, mapped, copied, relocated, linked, instantiated, initialized, or otherwise prepared for execution in a trusted execution environment 326 or enclave 104 (
A loaded enclave-aware executable 268 may be configured to interoperate with a loaded eABI-aware executable 240, a loaded eABI-common executable 250, another loaded enclave-aware executable, a loaded executable 364 in common memory 166, or combinations thereof according to the eABI 114. Such interoperability may include control transfer, data exchange, note 212 formation, note dispatch, return semantics, symbol resolution, validation, encryption, candidate or selected data security mode 374 processing, or combinations thereof.
Portions of a loaded enclave-aware executable 268 loaded into a trusted execution environment 326 may be isolated from common memory 166 and from other executable components, such that processor instructions 120 executing outside the trusted execution environment cannot directly access protected sections 156 or internal data structures contained therein (
A loaded enclave-aware executable 268 may expose only designated entry points 262 and may use signed or otherwise validated published-symbol and external-dependency information (
In certain embodiments, a loaded eABI-aware executable 240, loaded eABI-common executable 250, loaded enclave-aware executable 268, or other loaded executable 364 may maintain, receive, determine, negotiate, or apply a selected data security mode 374 determined from a set of candidate data security modes 372 (
In one restricted operation embodiment, a loaded enclave-aware executable 268 has an external symbol dependency corresponding to a published symbol of a loaded eABI-common executable 250. Invocation causes the loaded enclave-aware executable to form and dispatch an outbound note, syscall note 306, or kernel note 410 having a routable envelope and authorized call data; the loaded eABI-common executable receives the request, performs the restricted operation in common memory 166, and forms a return note carrying result, status, error, return-value, or modified-data information according to the return semantics (
An “untrusted enclave-aware executable file” may include an unsigned enclave-aware executable file, an enclave-aware executable file that does not satisfy the trust policy, or an enclave-aware executable file having a certificate chain that does not satisfy the trust policy (
In certain embodiments, a loader may load an untrusted enclave-aware executable file forming a “loaded untrusted enclave-aware executable” when the production mode 174 is not in the active state 178 (
Unless otherwise specified, an executable 110 may be traditional, eABI-aware, enclave-aware, or eABI-common; may have a main or library role; and may be an executable file 190 or a loaded executable 364. The applicable subtype and lifecycle state are determined from context, including whether the discussion concerns a stored executable file or an in-memory executable instance.
SectionsA “section” 152 (
As used herein, the term “section” is used in a format-neutral sense to refer to a subdivision, region, block, or grouping of executable file content, object file content, binary image content, or in-memory executable image content. In different executable formats or loading models, such subdivisions may be referred to as segments, sections, loadable segments, program regions, memory mapped regions, or other file or memory regions. Unless expressly stated otherwise, a “section” may include an ELF section, an ELF segment, a PE section, or another executable format structure that groups, organizes, describes, loads, maps, protects, or otherwise manages code, data, metadata, or other executable content.
An “unprotected section” 154 may be loaded into common memory 166. An “unprotected section” may include an “unprotected text section” 162, “unprotected data section” 164, or combinations thereof. An unprotected text section may include a restricted instruction 204 that may not run inside an enclave 104 or other trusted execution environment 326.
An eABI-common executable 208 may consist entirely of unprotected sections 154 loaded into common memory 166 and may perform restricted operations for one or more protected callers.
A “protected section” 156 may be loaded into an enclave 104, trusted execution environment 326, kernel-resident enclave 402, kernel-resident trusted execution environment 416, or combinations thereof. The protected section may be digitally signed or otherwise associated with eABI trust evidence 382, including a certificate 168, cryptographic signature 228, enclave-compatible cryptographic key 170, or combinations thereof.
A protected section 156 may be generated by an enclave-aware compiler 122, linker, signing or certificate insertion tool, post-link tool, or build tool and may be loaded into a trusted execution environment 326, including a kernel-resident trusted execution environment 416. Protected sections may include protected text sections 158 and protected data sections 160 and may be associated with eABI trust evidence, measured or signed content, memory permissions, controlled entry, confidentiality, integrity, or authenticity protections.
A “protected data section” 160 may be loaded into an enclave 104 or trusted execution environment 326 and may include data, eABI metadata 246, or eABI trust evidence, or combinations thereof, rather than processor instructions 120.
A “protected text section” 158 is the code-bearing portion of a protected section 156 that is configured to be loaded into an enclave 104, trusted execution environment 326, kernel-resident enclave 402, kernel-resident trusted execution environment 416, or combination thereof. The protected text section includes processor instructions 120, enclave-aware instructions 128, or both for execution within the corresponding protected execution environment after loading and initialization.
In certain embodiments, a protected text section 158 may include compiler-generated processor instructions, entry-point code, note-formation code, dispatch code, delivery code, return-processing code, controlled-entry code, or other eABI-mediated interoperability instructions associated with eABI metadata 246.
In certain embodiments, section placement may be identified by eABI metadata 246, target execution environment information 266, section attributes, segment attributes, compiler-generated information, enclave command line parameters 140, enclave source code parameters 144, policy, or combinations thereof. An enclave-aware loader 146 may use the section placement information to determine whether a section is loaded into common memory 166, an enclave 104, a trusted execution environment 326, a kernel-resident enclave 402, a kernel-resident trusted execution environment 416, or combinations thereof.
A protected section does not imply that it is running in protected memory, a term that usually refers to kernel memory. The term protected section may imply that the section is configured to run in trusted execution environments or enclaves.
LoaderCertain terms are used herein to describe program loading mechanisms associated with execution of compiled eABI-aware executables 112, traditional executables 334, or other executables 110. Unless otherwise specified, the term “loader” is used in a generic sense and may refer to traditional loaders 336, enclave-aware loaders 146, or other variants.
A “loader” (
A “traditional loader” 336 (
An “enclave-aware loader” 146 (
In certain embodiments, the enclave-aware loader 146 may instantiate, request, provision, or configure a usermode process 150 including a common virtual address space 220. The enclave-aware loader may provision the usermode process to interoperate with one or more enclaves 104, trusted execution environments 326, eABI-aware executables 112, enclave-aware executables 126, eABI-common executables 208, or combinations thereof. The enclave-aware loader may further initialize an eABI-aware runtime 180 or entry/exit bootstrap module 288 and prepare loaded executables 364 for interoperability according to an enclave-aware Application Binary Interface (eABI) 114.
An enclave-aware loader 146 may load an eABI-common executable file 248 or an unprotected executable portion into common memory 166 to form a loaded eABI-common executable 250.
The enclave-aware loader 146 may interpret executable structures generated by a compiler, linker, signing tool, certificate insertion tool, metadata generator, post-link tool, or build tool. The structures may include eABI metadata 246, section or segment attributes, target execution environment information 266, protected or unprotected section indicators, candidate data security modes 372, and eABI trust evidence 382, which the loader uses to place executable portions in common memory 166, trusted execution environments 326, kernel-resident trusted execution environments 416, or combinations thereof.
The enclave-aware loader 146 may load at least a portion of one or more protected sections 156, including a protected text section 158, protected data section 160, or both, into an enclave 104 or trusted execution environment 326. The enclave-aware loader may also load at least a portion of one or more unprotected sections 154, including an unprotected text section 162, unprotected data section 164, or both, into common memory 166.
In certain embodiments, the enclave-aware loader 146 may manage, request, coordinate, or validate enclave 104 lifecycle operations including enclave creation, initialization, provisioning, measurement, attestation, key association, and association with loaded eABI-aware executables 240. The enclave-aware loader may coordinate with an enclave-aware processor 124, operating system 148, hypervisor 226, firmware component, kernel component, eABI-aware runtime 180, or combinations thereof to enforce memory isolation, execution constraints, restricted instruction 204 constraints, controlled entry point semantics, or combinations thereof.
In an embodiment using a first enclave-aware executable file and a second enclave-aware executable file with respective first and second trusted execution environments, the enclave-aware loader loads protected sections originating from the first enclave-aware executable file only into the first trusted execution environment and loads protected sections originating from the second enclave-aware executable file only into the second trusted execution environment. Accordingly, the first trusted execution environment contains no protected section loaded from the second enclave-aware executable file, and the second trusted execution environment contains no protected section loaded from the first enclave-aware executable file. After loading, the enclave-aware loader transitions each trusted execution environment to an execution-ready state, identifies a defined initialization entry point for each loaded executable from eABI metadata, and causes the respective initialization code to execute only through the corresponding defined initialization entry point.
The enclave-aware loader 146 may verify that an enclave 104 or trusted execution environment 326 is initialized using an enclave-compatible cryptographic key 170 associated with certificate information, a certificate chain 388, or other eABI trust evidence 382 (
Loader validation may include checking executable headers and sections for tampering or alterations; accessing a certificate 168, certificate chain 388, signature 228, public or enclave-compatible key, trusted root information, provenance information 380, and certificate validation information; and verifying signatures, validity periods, usage constraints, policy constraints, integrity, revocation, trusted root status, and section correspondence. If production policy is not satisfied, the loader may prevent or restrict loading, initialization, registration, control transfer, or data exchange and record or report a trust status. When production mode is inactive, the loader may permit an unsigned or non-production executable for development use while recording an untrusted, development-only, or restricted status.
The enclave-aware loader 146 may recursively identify, analyze, load, defer, or initialize dependent executable files (
For each of a plurality of enclave-aware executable files 264 having respective protected sections 156 and eABI trust evidence 382, the enclave-aware loader 146 may separately validate the evidence, generate a respective trust determination, and apply separate loading, initialization, and registration permissions. A protected section is loaded into its corresponding trusted execution environment 326, initialized, and registered only when the applicable permission permits the operation; at least two of the corresponding trusted execution environments may be different.
The enclave-aware loader 146 may start (
The enclave-aware loader 146 may be implemented within, invoked by, or distributed across one or more system components, including an operating system 148, eABI-aware runtime 180, hypervisor 226, standard library 282, firmware component, bootloader, kernel component, dynamic linker, executable launcher, entry/exit bootstrap module 288, trusted execution environment 326, or combinations thereof.
In the architecture described herein, an “eABI-aware loader” need not be provided as a distinct category of loader. Loading an eABI-aware executable 112 only into common memory 166 may, in some cases, resemble traditional loading behavior. By contrast, an enclave-aware loader 146 may provide additional functionality associated with trusted execution environments 326, including protected section 156 loading, enclave 104 creation, governed launch, eABI trust evidence 382 validation, execution environment selection, or combinations thereof.
eABI runtime functionality may be implemented by a separately loaded eABI-aware runtime 180 or by runtime support code introduced into one or more executable files by an enclave-aware compiler 122. In some embodiments, the eABI-aware runtime may be implemented as a runtime library, shared object, service, loader-associated component, operating-system component, common memory component, or trusted execution environment component. In addition, or alternatively, runtime support code may be generated, linked, inserted, or otherwise associated with each eABI-aware executable file 238, enclave-aware executable file 264, or eABI-common executable file 248, including within protected sections 156, unprotected sections 154, or both, so that the corresponding loaded executable 364 includes toolchain-introduced code for eABI-mediated interoperability. Such runtime support code is not application code manually written by a developer to implement enclave-specific interfaces, explicit enclave lifecycle calls, manually written enclave-transition wrappers, or explicit marshaling code; rather, the code may be introduced by the toolchain to support execution-environment setup, symbol resolution, note formation, dispatch, routing cooperation, delivery, return processing, policy enforcement, restricted-operation handling, data-security-mode processing, or other eABI operations.
The enclave-aware loader 146 may prepare and validate execution environments and executable portions and may make runtime information available to the separately loaded runtime component, the toolchain-introduced runtime support code in the loaded executables, or both.
During loading, initialization, or registration, the enclave-aware loader 146 may make available published-symbol, external-dependency, candidate- or selected-data security mode status, trust determination, certificate validation, provenance, and eABI trust evidence 382 information. The information may be associated with an executable file 190, loaded executable 364, symbol, dependency, note 212, payload, envelope, control transfer, data exchange, or execution environment and may be provided to loaded executables, runtime components, or trusted execution environments.
Unless otherwise specified, “loader” may refer to a traditional loader 336 or an enclave-aware loader 146.
RuntimeThe terms “runtime,” “C runtime,” and “CRT” may refer to traditional runtimes 338, eABI-aware runtimes 180, or other runtime variants unless context requires a particular subtype.
A “runtime” (
A “traditional runtime” 338 (
A traditional runtime 338 need not provide eABI-mediated interoperability across trusted execution environment boundaries or mediate control transfer or data exchange between protected and unprotected execution environments.
An “eABI-aware runtime” 180 (
An eABI-aware runtime 180 may execute wholly or partly in common memory 166, in a trusted execution environment 326, in executable-side components, or across multiple environments. It may apply eABI-defined binary-level semantics while preserving the protections of the participating execution environments.
An eABI-aware runtime 180 may cooperate with an entry/exit bootstrap module 288, enclave-aware loader 146, operating system 148, policy component, certificate validation component, or production mode mechanism. It may use runtime information including trust determinations, certificate validation results 378, provenance information 380, production mode state, policy constraints, and data security mode constraints when permitting or processing eABI operations.
The eABI-aware runtime 180 may be loaded, initialized, invoked, or made available by an enclave-aware loader 146, operating system 148, entry/exit bootstrap module 288, loaded executable 364, or combination thereof (
An eABI-aware runtime 180 or one of its components may publish or depend on symbols and may participate in resolving an external symbol dependency 184 to a compatible published symbol 194 according to the eABI 114.
The enclave-aware loader 146, eABI-aware runtime 180, loaded executable 364, or combination thereof may resolve, assist in resolving, or use runtime information derived from resolving an external symbol dependency 184 to a published symbol 194.
An eABI-aware runtime 180 may include executables, libraries 328, initialization or cleanup code, dispatch or note-processing code, and other runtime modules. It may provide stack, heap, global-state, entry point, memory, I/O, operating system, system call, and return-processing services.
A loaded executable 364 may form a note 212 that runtime components relay or route toward another loaded executable according to the eABI 114 (
An eABI-aware runtime 180 may be implemented as a relay, bridge, shim, trampoline, thunk, dispatcher, routing component, or combination thereof and may interoperate with a traditional runtime 338 while providing eABI-mediated operations.
A “runtime component” is software, processor instructions 120, executable-side runtime functionality, a runtime module, loaded executable 364, common memory routing code, firmware, hardware, or combination thereof that performs or causes at least one eABI-aware runtime operation. Runtime components may be separate from, incorporated into, or distributed among loaded executables and execution environments.
In certain embodiments, the one or more runtime components of an eABI-aware runtime may include calling-side runtime functionality associated with a calling loaded executable, routing functionality implemented outside or between source and destination execution environments, and called-side runtime functionality associated with a called loaded executable.
The calling-side runtime functionality may dispatch an outbound note or other eABI-defined transfer representation from a source execution environment; the routing functionality may route the transfer representation while the transfer representation is in transit; and the called-side runtime functionality may deliver an inbound transfer representation within a destination execution environment. The runtime components may be separate from the loaded executables, incorporated into or associated with the loaded executables, distributed among different execution environments, implemented by a processor-supported transfer mechanism, or implemented by a combination thereof.
A “routing component” is software, processor instructions 120, firmware, hardware, runtime, loader, operating system, hypervisor, kernel, executable-side, processor-supported, or combined functionality that determines or applies a route for a note 212, control transfer 214, data exchange 312, or return pathway. It may supply routing information, forward a note, enable controlled entry or exit, or establish a direct note-transfer path.
An eABI-aware runtime 180 may be initialized before, during, or after one or more loaded executables 364 by an enclave-aware loader 146, entry/exit bootstrap module 288, operating system 148, loaded executable, or combination thereof.
An eABI-aware runtime 180 or entry/exit bootstrap module 288 may be implemented as an eABI-common executable 208 in common memory 166, as an enclave-aware executable 126 in a trusted execution environment 326, as functionality compiled into participating eABI-aware executables 112, or as a combination thereof.
An “enclave CRT” 340 refers to toolchain-introduced runtime support code, a protected C runtime portion, runtime library portion, shim, stub, dispatcher, trampoline, initialization component, or other support code associated with a loaded enclave-aware executable 268 or loaded eABI-aware executable 240 and configured to execute within an enclave 104 or trusted execution environment 326. In certain embodiments, an enclave CRT may be generated, linked, inserted, adapted from a C runtime, derived from a language runtime, or otherwise associated with a protected section 156 of an enclave-aware executable file 264 by an enclave-aware compiler 122, linker, loader-preparation tool, runtime library, enclave-aware loader 146, or other toolchain component. The enclave CRT is not application code manually written by a programmer to implement an enclave-specific interface, explicit trusted execution environment lifecycle call, manually written trusted execution environment transition wrapper, or explicit marshaling code. Rather, the enclave CRT may provide protected runtime support that allows code executing within the enclave or trusted execution environment to interoperate according to the eABI 114.
In certain embodiments, the enclave CRT 340 may perform or assist with program initialization, library initialization, protected runtime state setup, stack setup, heap setup, thread-local storage setup, exception handling, cleanup, entry point handling, dispatch table setup, symbol table setup, key table setup, trust table setup, external symbol dependency map setup, published symbol map setup, or combinations thereof. The enclave CRT may also perform or assist with note 212 formation, note ingestion, dispatch, delivery, return processing, selected data security mode 374 application, encryption, decryption, authentication, integrity checking, replay checking, validation, controlled-entry enforcement, argument recovery, return-value handling, restricted-operation request handling, or combinations thereof. In runtime-mediated transfer embodiments, the enclave CRT may stream, copy, encrypt into, decrypt from, or otherwise convey all or a portion of an outbound note 290, inbound note 292, protected payload 276, return note, or return payload through a transit buffer 308 while cooperating with an eABI-aware runtime 180, routing component, entry/exit bootstrap module 288, unprotected runtime portion, loaded eABI-common executable 250, or combinations thereof. In direct note-transfer embodiments, the enclave CRT may perform source-side or destination-side protected processing without requiring a protected payload or return payload to be placed in a transit buffer in common memory 166.
In certain embodiments, a conventional C runtime, standard library runtime support, or other language runtime may be split, partitioned, adapted, supplemented, or replaced so that a protected runtime portion executing within an enclave 104 or trusted execution environment 326 forms at least part of the enclave CRT 340, while an unprotected runtime portion executes in common memory 166 to perform services unavailable, restricted, or intentionally external to the enclave or trusted execution environment. The enclave CRT may cooperate with the unprotected runtime portion to provide conventional runtime behavior to generic source code 118 or enclave-aware source code 142 while preserving eABI-governed interoperability across execution environment boundaries. An enclave CRT need not include an entire traditional runtime 338, entire standard library 282, or entire eABI-aware runtime 180 within the enclave or trusted execution environment.
Runtime components may support a call transition or data exchange by preparing arguments; maintaining a per-call or per-thread execution context 420; forming, dispatching, routing, receiving, or delivering a note 212; processing return information; and restoring or resuming execution state.
An eABI-aware runtime may facilitate an eABI operation by applying eABI metadata associated with executable files, runtime information derived during loading or execution, symbol resolution information, note routing information, selected data security mode information, trust information, execution environment information, or combinations thereof. The runtime may permit, coordinate, reject, defer, or request reformulation of the operation according to those inputs.
A “runtime registration record” (
Registering a loaded enclave-aware executable 268 for eABI-mediated interoperability may include creating, updating, or making available a runtime registration record that associates the loaded executable with identity, trust, symbol, dependency, boundary-class, entry point, data security mode, or operation-specific permission information.
A runtime registration record may be centralized or distributed, persistent or transient, and represented by table entries, maps, descriptors, handles, capabilities, tokens, metadata fields, cached values, policy results, or combinations thereof. The enclave-aware loader 146, eABI-aware runtime 180, operating system 148, hypervisor 226, firmware, trusted execution environment 326, loaded executable 364, or policy service may maintain or expose all or part of the record.
Before permitting an eABI-mediated operation involving a registered loaded executable, the eABI-aware runtime 180 or another enforcing component may access the runtime registration record and apply the corresponding operation-specific permission to permit, restrict, rate-limit, defer, or deny the operation.
In certain embodiments, registration for eABI-mediated interoperability establishes operation-specific authorization state for a loaded enclave-aware executable 268. Registration may be completed when a runtime registration record has been created or updated to associate a trust determination and an identity of the loaded enclave-aware executable or a protected section 156 with at least one operation-specific permission and the runtime registration record has been made available for enforcement. Merely identifying a file name, binary identity, storage location, enclave handle, or executable location without establishing an operation-specific permission need not complete registration for eABI-mediated interoperability. After registration, an eABI-aware runtime 180 or loaded executable 364 may permit an eABI operation only in accordance with the corresponding operation-specific permission in the runtime registration record.
Before resolving an external symbol dependency 184 of a first loaded executable to a published symbol 194 of a second loaded executable, the eABI-aware runtime 180 or first loaded executable may evaluate the second executable's runtime registration record and provenance information 380. Resolution may require a certificate validation result 378 and publisher identity accepted by a trust policy 386, an executable version satisfying a dependency rule, and an operation-specific permission authorizing the symbol or dependency. If a condition fails, resolution may be denied, deferred, or directed to another compatible and authorized publisher.
A runtime registration record may expressly associate a published symbol 194 with one or more permitted external symbol dependencies 184 and an operation-specific permission for resolution. The eABI-aware runtime 180 applies that permission, together with applicable trust, publisher, provenance, version, and dependency-policy conditions, before completing the resolution.
In the architecture described herein, an “enclave-aware runtime” need not be provided as a distinct category of runtime executing within each enclave 104. Execution within an enclave may be performed by one or more loaded enclave-aware executables 268 under control of an enclave-aware processor 124, while interoperability between untrusted and trusted execution environments 326 may be mediated, facilitated, or coordinated by the eABI-aware runtime 180. Accordingly, runtime functionality associated with cross-boundary communication may be centralized within the eABI-aware runtime, distributed among loaded executables 364, implemented within one or more trusted execution environments, implemented within the kernel, or combinations thereof.
In certain embodiments, separating eABI-aware runtime 180 functionality from one or more enclaves 104 may reduce the trusted computing base within the enclaves by avoiding inclusion of a full runtime environment inside enclave memory. For example, the eABI-aware runtime may execute at least partly in common memory 166 and may coordinate control transfer, data exchange, note 212 routing, note dispatch, return processing, data security mode 130 selection, policy evaluation, or combinations thereof across enclave boundaries.
Unless otherwise specified, “runtime,” “C runtime,” and “CRT” may refer to a traditional runtime 338 or an eABI-aware runtime 180.
An “entry/exit bootstrap module” 288 (
In certain embodiments, an initial outbound note 290 may include a main note 316 formed by, or formed in response to, the entry/exit bootstrap module 288 after initialization of the eABI-aware runtime 180, one or more loaded executables 364, or combinations thereof. The initial outbound note may correspond to a startup control transfer, initialization routine, entry point 262, main function, initial external symbol dependency 184, or combinations thereof.
In some embodiments, the enclave-aware loader 146 loads an entry/exit bootstrap module 288 within the common virtual address space 220 and provides entry point 262 information for a loaded eABI-aware main executable to the entry/exit bootstrap module. The entry/exit bootstrap module may initiate a thread of execution and may cause the thread of execution to enter the loaded eABI-aware main executable at an entry point identified by the entry point information.
Data Security ModeA “data security mode” 130 (
A default data security mode 130 may be established at loading, initialization, registration, or startup, and a selected data security mode 374 may be selected or changed during execution. Selection may account for candidate modes, allowed modes, trust policy, certificate validation result, provenance, system or user policy, symbol or dependency requirements, security objectives, performance objectives, and operating conditions. Different modes may trade confidentiality, integrity, identity assurance, cryptanalytic resistance, latency, throughput, and computational cost (
“Candidate data security modes” 372 refer to one or more data security modes 130 that an eABI-aware executable 112, published symbol 194, external symbol dependency 184, note 212, protected payload 276, routable envelope 272, control transfer, data exchange, or combinations thereof is configured to support, accept, request, process, or use according to the eABI. In certain embodiments, an enclave-aware compiler 122 may generate, insert, encode, or associate candidate data security modes with an eABI-aware executable based on generic source code 118, enclave-aware source code 142, compiler options, pragmas, policy, or combinations thereof.
In certain embodiments, candidate data security modes 372 may be identified, generated, derived, stored, communicated, or updated by an enclave-aware compiler 122 (
“Data security mode information” refers to information identifying, representing, constraining, requesting, selecting, applying, or prohibiting one or more data security modes 130. Data security mode information may include candidate data security modes 372, allowed data security modes 376, a selected data security mode 374, a requested data security mode, a default data security mode, a preferred data security mode, a required data security mode, a prohibited data security mode, a rejected data security mode, a fixed data security mode, or combinations thereof.
“Allowed data security modes” 376 (
A “selected data security mode” 374 (
A selected data security mode is maintained, applied, associated with, or in effect for a loaded executable 364, execution environment, usermode process 150, user session, note 212, control transfer 214, data exchange 312, published symbol 194, external symbol dependency 184, or combinations thereof. The selected data security mode may be determined according to a compatibility determination and may remain unchanged or may be modified during execution in response to policy evaluation, trust evaluation, runtime conditions, user requests, application requests, performance conditions, security requirements, or combinations thereof.
A “compatibility determination” refers to a determination of whether one or more candidate data security modes 372 supported by a first eABI-aware executable 112, one or more candidate data security modes supported by a second eABI-aware executable, and one or more allowed data security modes 376 established by a trust policy 386 include at least one data security mode 130 usable for a note 212, control transfer, data exchange, protected payload 276, routable envelope 272, or combinations thereof according to the eABI 114. In certain embodiments, the compatibility determination may consider candidate data security modes (
In certain embodiments, changing a selected data security mode 374 is not merely a selection of an encryption level for a network request or a sensitivity level assigned to a service request. Rather, the selected data security mode may be changed within eABI-mediated interoperability between loaded eABI-aware executables 240 in different execution environments based on compiler-generated eABI metadata 246, symbol metadata, processor instructions 120, candidate data security modes 372, allowed data security modes 376, published symbol 194 information, external symbol dependency 184 information, note 212 information, routable envelope 272 information, protected payload 276 information, or combinations thereof. In certain embodiments, the compatibility determination may be performed for a particular eABI-mediated control transfer 214, data exchange 312, note, published symbol, external symbol dependency, return note, return payload 352, or combinations thereof, rather than for a network endpoint, web service request, application programming interface request, or load-balancing decision.
In certain embodiments, a policy may establish one or more allowed data security modes 376 for eABI-mediated interoperability. The policy may apply to a system 100, operating system 148, user session, usermode process 150, executable file 190, loaded executable 364, execution environment, published symbol 194, external symbol dependency 184, note 212, protected payload 276, routable envelope 272, control transfer, data exchange, trust determination, certificate validation results 378, provenance information 380, or combinations thereof.
A selected data security mode 374 may be determined based on the intersection of candidate data security modes 372 (
In certain embodiments, the eABI-aware runtime 180 may determine, negotiate, or facilitate determination of a selected data security mode 374 and may communicate the selected data security mode to one or more loaded executables 364. The loaded executables may form, transmit, validate, encrypt, decrypt, route, dispatch, reject, reformulate, or process notes 212 according to the selected data security mode.
If a requested or selected data security mode 374 is unsupported by a participating loaded executable 364 or prohibited by policy, an eABI-aware runtime 180, enclave-aware loader 146, loaded executable, or policy component may reject, block, defer, downgrade, upgrade, renegotiate, request reformulation, or report an error. A permitted mode may change during execution in response to user or application requests, performance or load conditions, latency or throughput constraints, security requirements, trust determinations, or policy changes.
The eABI-aware runtime 180 may operate as a policy-aware broker or compatibility engine for data security modes 130 (
Policy constraints for a data security mode 130 may be derived from eABI metadata 246, eABI trust evidence 382, a published symbol 194, an external symbol dependency 184, an execution environment, user session, usermode process 150, system or operating system policy, trust determination, certificate validation result 378, provenance information 380, system load, performance, user or application preference, security requirement, or combination thereof.
A loaded executable 364 may communicate a data security mode profile 384 to an eABI-aware runtime 180 or another loaded executable. The profile may identify candidate, supported, requested, preferred, rejected, minimum, required, prohibited, or allowed data security modes for a note 212, protected payload 276, published symbol 194, external symbol dependency 184, control transfer, or data exchange.
The eABI-aware runtime 180 or a participating enclave-aware executable may select or facilitate selection of a data security mode 374 by evaluating the participating executables' candidate modes, policy-allowed modes, requested or preferred modes, rejected or prohibited modes, trust and certificate results, provenance, performance conditions, and security requirements. The selected mode may be maintained per executable, symbol, dependency, note, transfer, exchange, session, process, execution environment, or combination thereof.
When a requested or selected data security mode is unsupported or violates policy, trust, certificate, provenance, or other constraints, the eABI-aware runtime 180, loaded executable 364, enclave-aware loader 146, or policy component may reject, block, defer, downgrade, upgrade, renegotiate, report an error, or request reformulation. A participating executable may reformulate the note, payload, envelope, control transfer, or data exchange using a permitted mode.
“Plaintext mode” 132 (
“Encryption mode” (
“Encryption-with-validation mode” refers to a data security mode 130 (
“Validation mode” 136 (
“Secure mode” 137 (
“Max mode” 138 (
A “published symbol” 194 (
In certain embodiments, when an enclave-aware compiler 122 identifies a published symbol 194 in generic source code 118 (
In certain embodiments, a loaded eABI-aware executable 240 may make published symbol information available to another loaded eABI-aware executable, an eABI-aware runtime 180, enclave-aware loader 146, symbol resolution service, trusted execution environment 326, or combinations thereof (
An “external symbol dependency” 184 (
When an enclave-aware compiler 122 identifies an external symbol dependency 184, it may generate processor instructions 120, eABI metadata 246, symbol table information, note formation semantics, candidate data security modes 372, and other information used after loading to resolve the dependency and form, dispatch, route, deliver, or process a note 212.
A “symbol table” 314 may be included in an executable file, metadata, runtime, or other structure identifying published symbols 194, external symbol dependencies 184, names, identifiers, addresses or offsets, sections 152, datatypes, function signatures, relocations, or combinations thereof. A compiler, linker, loader, runtime, or loaded executable may use the symbol table for linking, loading, resolution, note formation, dispatch, or controlled entry.
In some embodiments, eABI metadata 246 of an eABI-aware executable file 238 includes one or more symbol table entries, dependency records, published symbol records, relocation records, or other binary-level records used by an enclave-aware loader or by a symbol resolution interface defined by the eABI. A symbol table entry may identify an external symbol dependency of a loaded eABI-aware main executable, and another symbol table entry may identify a published symbol of a loaded eABI-aware library executable corresponding to the external symbol dependency. Symbol table entries may be transmitted to other eABI-aware executables or the eABI-aware runtime to facilitate symbol resolution to the TEEs or enclaves containing the published symbol.
A published symbol 194 (
In certain embodiments, a loaded eABI-aware executable 240, enclave-aware loader 146, eABI-aware runtime 180, trusted execution environment 326, kernel-resident enclave 402, kernel-resident trusted execution environment 416, kernel service interface 414, isolated kernel code 418, or combinations thereof may compare an external symbol dependency 184 to published symbol information and determine symbol resolution information, note routing information, or both. The note routing information may identify a target loaded executable 364, target execution environment, published symbol, entry point 262, selected data security mode 374 constraint, isolated kernel resource request information, or combinations thereof for an outbound note 290. The target execution environment may include common memory 166, a trusted execution environment, kernel-resident enclave, kernel-resident trusted execution environment, isolated kernel code, or combinations thereof.
In a traditional execution environment, an external symbol dependency 184 may be resolved within common memory 166 according to a traditional ABI 342, and symbol resolution may result in direct control transfer or data access using an address associated with a published symbol 194. In an eABI-aware environment, an external symbol dependency may be resolved according to the eABI 114, and access to the corresponding published symbol may be mediated using note 212 formation, controlled entry point semantics, eABI-aware runtime 180 dispatch, direct note transmission, validation semantics, selected data security mode 374 processing, or combinations thereof. This allows eABI-aware executables 112 in different execution environments to interoperate while preserving trusted execution environment 326 isolation.
NoteA “Note” 212 (
A note may include a routable envelope 272, protected payload 276, argument payload 318, referenced-data payload 350, return payload 352, cryptographic support information, tamper resistance information, replay resistance information, or combinations thereof (
In certain embodiments, notes, protected payloads 276, routable envelopes 272, transit buffers 308, and selected data security modes 374 may be used to support protected communication between loaded eABI-aware executables 240, loaded enclave-aware executables 268, loaded eABI-common executables 250, kernel-resident enclaves 402, kernel-resident trusted execution environments 416, or combinations thereof. The protected communication may include encryption, authentication, validation, integrity protection, replay resistance, policy evaluation, or combinations thereof according to the eABI 114.
A note may be formed by a loaded enclave-aware executable 268, loaded eABI-aware executable 240, loaded eABI-common executable 250, eABI-aware runtime 180, entry/exit bootstrap module 288, kernel code, or combinations thereof (
A note need not be stored as eABI metadata 246 in an executable file 190 and may instead be formed during execution by processor instructions 120 generated by an enclave-aware compiler 122. Generic source code 118 (
A “processor-supported direct note-transfer mechanism” refers to processor hardware, microcode, firmware, a memory-management mechanism, a trusted execution environment transfer facility, an interconnect, or combination thereof configured to implement a direct note-transfer mode.
A note may be conveyed by runtime-mediated transfer through common memory 166 or a transit buffer 308 (
In kernel-resident trusted execution environment embodiments, a kernel note or return kernel note may be processed under a selected data security mode while also being subject to a separate confidentiality or non-exposure requirement associated with the kernel service interface, published kernel-service symbol, isolated kernel resource, trust policy, or invocation. When the kernel note contains system call parameters, sensitive buffers, cryptographic material, credentials, authentication tokens, policy requests, symbol information, referenced data, return information, or other request data required to remain unavailable in unprotected form outside the destination trusted execution environment, the selected data security mode is selected or enforced so that the protected payload or return payload is recoverable by authorized code in the destination trusted execution environment but is not obtainable in unprotected form by a routing component or by kernel code outside the destination trusted execution environment. The routable envelope may remain visible for routing, policy, logging, or delivery purposes, while the protected payload remains interpretable only by authorized code within the destination trusted execution environment.
“Dispatch” or “dispatching” (
“Routing” (
“Delivery” or “delivering” (
“Dispatch semantics,” “routing semantics,” and “delivery semantics” refer to eABI-defined rules, requirements, formats, eABI metadata 246, processor instructions 120, operations, or combinations thereof governing dispatch, routing, and delivery, respectively. “Note routing semantics” refers to routing semantics applied to a note 212.
A “note-transfer path” refers to a logical or physical pathway through which all or a portion of a note is conveyed between execution environments. A note-transfer path may include one or more transit buffers 308 (
A “direct note-transfer mode” refers to an eABI-defined routing or transfer mode in which a processor-supported direct note-transfer mechanism or other routing mechanism transfers a note 212 from a first execution environment toward a second execution environment without requiring a common memory routing component to receive or copy the protected payload 276 or to interpret protected payload information in unprotected form. Before direct transfer, an eABI-aware runtime 180, enclave-aware loader 146, processor 106, or other routing component may establish or supply destination information, routing information, permission information, trust information, cryptographic-support information, selected data security mode information, target execution environment information 266, return-routing information, or combinations thereof. After supplying such information, the supplying component need not receive, copy, route, dispatch, decrypt, or interpret the protected payload or a corresponding return payload. The direct note-transfer mode may apply to an outbound note, a return note, or both, and need not place the protected payload or return payload in a transit buffer 308 in common memory 166.
“Note formation semantics” 370 (
“Data transfer semantics” refer to eABI-defined rules, formats, representations, operations, or requirements for transferring arguments, referenced data, return values, status information, buffers, or combinations thereof between loaded executables 364 across an execution environment boundary. Data transfer semantics may define data layout (
In certain embodiments, data transfer semantics may define note payload size information, note payload offset information, alignment requirements, parameter-slot locations, in-note stack offsets, in-note heap offsets, payload descriptors, copied-data descriptors, referenced-data descriptors, or combinations thereof.
“Data security mode semantics” refer to eABI-defined rules, requirements, operations, eABI metadata 246, processor instructions 120, or combinations thereof governing how a note, protected payload 276, routable envelope 272, data exchange, control transfer, return value, return status, or combinations thereof is protected or processed under a selected data security mode 374.
“Cryptographic support information” includes fields (
In certain embodiments, cryptographic support information may include a caller identifier, target identifier, source identifier, destination identifier, caller hash, target hash, source hash, destination hash, note identifier, transit buffer identifier, boundary class identifier, execution environment identifier, or combinations thereof.
“Controlled entry point semantics” refer to eABI-defined rules, requirements, eABI metadata 246, processor instructions 120, or combinations thereof that direct or restrict a control transfer to one or more defined entry points 262 corresponding to a published symbol 194. In certain embodiments, when an external symbol dependency 184 in a first loaded eABI-aware executable 240 is resolved to a published symbol in a second loaded eABI-aware executable, the eABI may require the control transfer to occur through an entry point, gateway, trampoline, stub, dispatch target, or other defined interface corresponding to the published symbol, thereby reducing arbitrary control transfers into the second loaded executable 364.
A “controlled entry point” refers to a defined entry point 262 governed by controlled entry point semantics. A controlled entry point may be identified by eABI metadata 246, a published symbol 194, a symbol table 314, a dispatch table, a kernel service interface 414, processor-enforced entry information, or combinations thereof.
In certain embodiments, during delivery of an inbound note, the called loaded executable validates that a requested control transfer target is a defined entry point identified by eABI metadata for the published symbol. The called loaded executable rejects, traps, or otherwise prevents a requested control transfer to any address within the called loaded executable that is not designated as the defined entry point. Accordingly, the inbound note may be prevented from causing control transfer to an arbitrary address within the called loaded executable. A PHOSITA would recognize that controlled entry points increase the security of eABI-aware executables because controlled entry points prevent jumps or calls to arbitrary addresses in executables.
“Restricted instruction call semantics” (
“Validation semantics” (
“Return semantics” (
“Boundary class” refers to a category of control transfer or data exchange between execution environments according to the eABI 114. Boundary classes may include trusted execution environment-to-common memory transfers, common memory-to-trusted execution environment transfers, trusted execution environment-to-trusted execution environment transfers, kernel-to-usermode transfers, usermode-to-kernel transfers, or combinations thereof. The eABI may define different note formats, dispatch semantics, return semantics, data transfer semantics, validation semantics, data security mode semantics, or combinations thereof for different boundary classes.
Common memory 166 may include a “transit buffer” 308 (
A note may include a main note 316, outbound note 290, inbound note 292, encrypted note 302, plaintext note, syscall note 306, return note, or combinations thereof.
A “main note” 316 may initiate execution of a workload 252, main function, program entry point 262, or combinations thereof after initialization of an eABI-aware runtime 180 or one or more loaded executables 364. In certain embodiments, a main note may be composed by the entry/exit bootstrap module 288.
An “outbound note” 290 may be formed by a first loaded eABI-aware executable 240 and routed, dispatched, directly transmitted, or otherwise conveyed toward a second loaded eABI-aware executable according to the eABI.
An “inbound note” 292 may be received, transformed, copied, decrypted, authenticated, validated, re-encoded, or otherwise processed by the second loaded eABI-aware executable 240 according to the eABI.
An “encrypted note” 302 refers to a note 212, outbound note 290, inbound note 292, return note, syscall note 306, kernel note 410, or portion thereof in which at least a portion of a protected payload 276 is encrypted according to a selected data security mode 374. The encrypted note may include, or be associated with, a routable envelope 272 usable by a routing component to route, dispatch, transmit, deliver, or return the encrypted note while the encrypted portion of the protected payload remains unavailable in unprotected form to the routing component. The encrypted portion of the protected payload may include symbol information, argument payload information, referenced-data payload information, return payload information, cryptographic support information, validation information, or combinations thereof, and may further be encoded, authenticated, integrity-protected, replay-protected, freshness-protected, validated, or otherwise protected according to the eABI 114. In certain runtime-mediated transfer embodiments, all or a portion of the encrypted note may be streamed, copied, encrypted into, decrypted from, or otherwise conveyed through a transit buffer 308, and a destination trusted execution environment 326 or enclave 104 may perform streaming decryption, authentication, integrity checking, replay checking, validation, or combinations thereof during note ingestion. In certain direct note-transfer embodiments, the encrypted note may be transferred without placing the encrypted portion of the protected payload in a transit buffer in common memory 166.
A “plaintext note” may include a protected payload 276, or portion thereof, that is conveyed without encryption according to plaintext mode 132, although the plaintext note may be signed, hashed, authenticated, integrity checked, validated, or otherwise processed when permitted by the selected data security mode 374.
A “decrypted note” 310 refers to a note 212, protected payload 276, or portion thereof after encrypted, encoded, authenticated, integrity-protected, or otherwise protected note information has been decrypted, decoded, authenticated, validated, or otherwise made available in an unprotected or interpretable form within an authorized execution environment. In certain embodiments, a decrypted note is produced by streaming an encrypted note 302, protected payload, or portion thereof from a transit buffer 308 into a trusted execution environment 326 or enclave 104 and performing streaming decryption, authentication, integrity checking, replay checking, validation, or combinations thereof during note ingestion. A decrypted note need not be made available in common memory 166 or to a routing component, and may exist only transiently within the destination trusted execution environment for delivery, symbol identification, argument recovery, return processing, or other eABI-governed processing.
A “syscall note” 306 (
A restricted operation corresponding to a restricted instruction 204 (
In certain embodiments, a loaded enclave-aware executable may request performance of a restricted operation by forming an outbound note according to the eABI (
When generic source code 118 contains an operation that requires, invokes, or compiles into a restricted instruction 204, an enclave-aware compiler 122 may identify the corresponding source code or intermediate representation portion and translate it into an eABI-common executable file 248 for loading into common memory 166 as a loaded eABI-common executable 250. The compiler may generate eABI metadata 246, symbol information, processor instructions 120, note formation semantics, and restricted instruction call semantics that cause protected executable content to request the operation, transfer only authorized call data, permit the loaded eABI-common executable to perform the operation outside the trusted execution environment 326, and return result information according to return semantics (
Runtime-mediated dispatch, routing, and delivery of a note may collectively include preparing and protecting the note in the source execution environment (
In certain embodiments, a note may be transferred according to a direct note-transfer mode. In the direct note-transfer mode, a first loaded eABI-aware executable 240 may transmit an outbound note 290, an encrypted representation of the outbound note, a protected payload 276, a routable envelope 272, or combinations thereof from a first execution environment toward a second execution environment without requiring transfer of the outbound note through a transit buffer 308 in common memory 166. The first execution environment and the second execution environment may comprise respective first and second trusted execution environments 326. In one such embodiment, the first loaded eABI-aware executable may transmit the outbound note directly to a second loaded eABI-aware executable to implement control transfer, data exchange, or both without the eABI-aware runtime 180 receiving, routing, or dispatching the outbound note. Before the direct transmission, the eABI-aware runtime may establish or supply runtime state, routing information, security mode information, permissions, trust information, destination information, or combinations thereof used by the loaded eABI-aware executables for the direct note-transfer mode without interpreting the protected payload.
In certain embodiments, the direct note-transfer mode applies bidirectionally to an outbound note and a corresponding return note transferred between first and second trusted execution environments. Before dispatch, an eABI-aware runtime may supply destination information, permission information, trust information, cryptographic support information, selected data security mode information, target execution environment information 266, return-routing information, or a combination thereof. After supplying the information, the eABI-aware runtime does not receive, copy, route, dispatch, decrypt, or otherwise interpret the outbound note, the return note, the protected payload, or the return payload. The processor transfers the outbound note toward the second trusted execution environment and transfers the return note toward the first trusted execution environment using routing information in the respective routable envelopes, without placing either the protected payload or the return payload in a transit buffer in common memory and without requiring processor instructions executing outside the first and second trusted execution environments to receive or copy either payload. An enclave-aware compiler may generate eABI metadata and processor instructions within each participating executable file to implement the bidirectional direct note-transfer mode.
“Routable envelope” 272 (
“Protected payload” 276 (
A protected payload may include an argument payload 318, referenced-data payload 350, return payload 352, validation information, symbol information, copied data, in-note stack 356 data, in-note heap 358 data, or combinations thereof. A protected payload may be encrypted, encoded, authenticated, integrity protected, validated, or otherwise protected so that an eABI-aware runtime 180 may route a note using a routable envelope 272 without allowing the eABI-aware runtime, operating system 148, hypervisor, or other executables not involved with the note to interpret the protected payload in unprotected form.
In certain embodiments, a note 212 may separate routing visibility from symbol visibility (
“Tamper resistance information” (
In certain embodiments, a target execution environment identifier may be stored in the routable envelope, and a corresponding copy may be stored in the protected payload for comparison after the protected payload is processed in the target execution environment. If the value does not match, an enclave-in-the-middle attack may be detected.
“Replay resistance value” refers to information, fields, values, metadata 244, eABI metadata, cryptographic values, freshness values, ordering values, session values, invocation values, or combinations thereof configured to detect, reject, limit, or prevent reuse of a note 212, routable envelope 272, protected payload 276, or combinations thereof. Replay resistance information may include a nonce, one-time-use value, freshness value, sequence value, invocation identifier, monotonic counter, timestamp, random value, session identifier, execution environment identifier, loaded executable 364 identifier, note identifier, return path identifier, or combinations thereof. In certain embodiments, replay resistance information may bind a note to a particular invocation, session, source execution environment, target execution environment, loaded executable, selected data security mode 374, or combinations thereof.
“Argument payload” 318 refers to information, data, metadata 244, eABI metadata 246 values, constants, variable names, key-value pairs, descriptors, type information, storage location information, copying instructions, policy information, or combinations thereof included in a note 212 and used to represent one or more function call arguments 362 passed from a calling loaded executable 364 to a called loaded executable across an execution environment boundary according to the eABI 114. An argument payload may include direct argument information 348, pass-by-value data, constants, scalar values, aggregate values, pointer values, reference values, parameter-order information, calling convention information, datatype information, register-argument information, stack-argument information, descriptors referencing a referenced-data payload 350, descriptors referencing an in-note heap 358, or combinations thereof.
“Direct argument information” 348 refers to argument payload information used to represent a function call argument 362 directly in a note 212 without copying additional referenced data. Direct argument information may include constant values, literal values, immediate values, scalar values, pass-by-value values, fixed-size aggregate values, register-argument values, stack-argument values, datatype information, size information, alignment information, parameter-order information, expression values, or combinations thereof.
“Referenced-data payload” 350 refers to information, data, metadata 244, copied data, temporary data, descriptors, layouts, offsets, sizes, type information, storage location information, copying instructions, policy information, or combinations thereof included in a note 212 and used to represent, copy, describe, validate, restore, or return data referenced by an argument across an execution environment boundary according to the eABI 114. A referenced-data payload may include copied referenced data, shallow-copy data, deep-copy data, copied strings, copied arrays, copied buffers, copied structures, copied object graphs, buffer descriptors, bounds information, length information, alias information, ownership information, mutability information, copy-in descriptors, copy-out descriptors, copy-in/copy-out descriptors, return-copy descriptors, in-note heap 358 allocations, in-note stack 356 allocations, or combinations thereof.
In certain embodiments, an enclave-aware compiler evaluates generic source code and enclave-aware source code to determine how each argument in a function call will map to an argument payload (
In certain embodiments, information in a protected payload corresponding to an invocation is limited to direct values of arguments of the invocation, referenced data expressly selected for transfer or copying according to a function signature, eABI metadata, a policy, or a combination thereof, descriptors identifying the selected referenced data, and return-related information. Data maintained in the source trusted execution environment that is neither represented by an argument of the invocation nor selected for transfer remains inaccessible to the called executable and, when the destination is a kernel-resident trusted execution environment, to kernel code outside the destination trusted execution environment.
In certain embodiments, when an in-note stack is used, the in-note stack may store stack-argument information, variadic-argument data, call frame data, or a combination thereof. An in-note heap may store variable-size copied data, referenced data, serialized data, or a combination thereof.
“Return payload” 352 refers to information, data, metadata 244, values, descriptors, status information, or combinations thereof included in a note 212 or return note and used to return control, return values, modified referenced data, output buffer data, status codes, error information, exception information, or combinations thereof from a called loaded eABI-aware executable 240 to a calling loaded eABI-aware executable across an execution environment boundary according to the eABI. After a called loaded eABI-aware executable performs a control transfer or data exchange associated with an inbound note 292, the called loaded executable 364 may form a return note including the return payload and dispatch the return note toward the calling loaded executable according to return semantics.
Before dispatching an outbound note 290, a calling executable may save an execution context 420 associated with an invocation. The saved execution context may include register state, stack state, base-pointer state, stack-pointer state, instruction-pointer state, per-thread state, argument state, return state, note state, selected data security mode state, or a combination thereof. Runtime state, note state, or caller-private state may associate an invocation identifier, note identifier, return-path identifier, replay resistance value, saved calling context identifier, or a combination thereof with the saved execution context and may indicate whether the invocation is being dispatched, routed, delivered, processed by called functionality, or returned. In certain embodiments, at least a portion of the saved execution context may be caller-encrypted, authenticated, integrity protected, stored in caller-private memory, stored in a protected payload 276 (
The return payload 352 may use the same data security mode 130 as the initiating note or a different data security mode according to the eABI.
“Common payload” refers to data, metadata 244, arguments, identifiers, handles, descriptors, references, copied data, transformed data, sanitized data, plaintext data, unencrypted data, or combinations thereof included in, associated with, referenced by, or stored for use with a note 212 and usable by a loaded eABI-common executable 250 in common memory 166 to perform a requested operation according to the eABI 114. A common payload may be maintained in a form accessible to the loaded eABI-common executable rather than encrypted from the loaded eABI-common executable. In certain embodiments, a common payload may be associated with a restricted instruction 204 request and may provide information usable by the loaded eABI-common executable to perform a restricted operation without requiring direct access to private data maintained within a trusted execution environment 326.
In certain embodiments, a common payload associated with an outbound note for a restricted operation may include a symbol identifier, service identifier, operation identifier, restricted operation identifier, function identifier, argument information, handle, descriptor, copied argument value, sanitized data, or combinations thereof. The symbol identifier, service identifier, operation identifier, or restricted operation identifier may correspond to a published symbol of a loaded eABI-common executable and may be usable by the loaded eABI-common executable to identify processor instructions configured to perform the restricted operation in common memory without requiring direct access to private data maintained within a trusted execution environment.
“Call data” includes argument information, referenced data, direct values, copied or transformed data, sanitized data, handles, descriptors, identifiers, function signature information, return-related information, or combinations thereof associated with an invocation. “Selected call data” is call data selected under eABI metadata 246, data transfer semantics, function signature information, policy, or a combination thereof for release from a source execution environment or use by called functionality.
In one embodiment, a single enclave-aware executable file includes a protected section and an unprotected section corresponding to a restricted operation. Loading the protected section into a trusted execution environment forms at least part of a loaded enclave-aware executable that acts as a calling executable, and loading the unprotected section into common memory forms at least part of a loaded eABI-common executable that acts as a called executable. eABI metadata in the single enclave-aware executable file identifies the trusted execution environment as a target execution environment for the protected section, identifies common memory as a target execution environment for the unprotected section, identifies an external symbol dependency associated with the protected section, and identifies a published symbol and defined entry point associated with the unprotected section. The protected and common executable portions may therefore originate from the same executable file while operating as distinct loaded eABI-aware executables according to the eABI.
An “in-note argument region” 354 (
An “in-note stack” 356 (
An “in-note heap” 358 (
In certain embodiments, generic source code 118 (
In certain embodiments, a loaded executable 364 or eABI-aware runtime 180 may use the note formation semantics 370, eABI metadata 246, selected data security mode 374, policy, or combinations thereof to form, validate, dispatch, reformulate, or process the argument payload 318, referenced-data payload 350, return payload 352, call data, or combinations thereof according to the eABI 114.
“Note ingestion” may include locating or copying a note 212 or partial note from a transit buffer 308; decrypting, authenticating, validating, deduplicating, or interpreting note information; selecting a key; determining whether the note represents a new call, restricted operation, kernel request, or return; and transferring authorized data into the destination execution environment. The ingested note or derived information may be provided to an in-enclave dispatcher 344 or return-processing logic.
An “in-enclave dispatcher” 344 is processor instructions, executable code, dispatch logic, symbol or resolution information, or note ingestion logic associated with a loaded eABI-aware executable 240 or trusted execution environment 326 and configured to process a note 212 according to the eABI 114. It may identify a published symbol 194, defined entry point 262, kernel service interface 414, data object, or return path and transfer control or data accordingly.
An enclave-aware compiler 122, linker, enclave-aware loader 146, eABI-aware runtime 180, or combination thereof may generate, insert, configure, associate, or make available the processor instructions, eABI metadata 246, symbol tables 314, resolution information, and note ingestion or dispatch information used by an in-enclave dispatcher 344.
Generic source code 118 (
This section describes opposing default data-placement postures that an enclave-aware compiler 122 may apply to variables 286, data objects, and referenced data (
A “variable” 286 refers to a data object, referenced-data object, local variable, global variable, initialization value, storage region, relocation-associated data, or combinations thereof represented in source code 188, an executable 110, memory 108, a note 212, or combinations thereof. A variable may be placed in common memory 166, a protected section 156, an enclave 104, a trusted execution environment 326, a kernel-resident enclave 402, a kernel-resident trusted execution environment 416, a protected payload 276, or combinations thereof according to compiler-generated information, eABI metadata 246, policy, or combinations thereof. A variable may also be associated with a published symbol 194, external symbol dependency 184, argument payload 318, referenced-data payload 350, return payload 352, or combinations thereof.
“Share-by-choice mode” (
For example, enclave-aware source code 142 (
In the preceding example, the enclave-aware compiler 122 may place a_secret_value in a trusted execution environment 326 and not_a_secret in common memory 166. Variables in the same source unit may therefore receive different placement based on the selected default rule, source-level guidance, policy, or a combination thereof.
“Protect-by-choice mode” (
For example, enclave-aware source code 142 processed in protect-by-choice mode may leave an unmarked variable in common memory by default and mark another variable for protected placement:
In the preceding example, the enclave-aware compiler 122 may place not_a_secret in common memory 166 and a_secret_value in a trusted execution environment 326. Variables in the same source unit may therefore receive different placement based on the selected default rule, source-level guidance, policy, or a combination thereof.
In certain embodiments, share-by-choice mode, protect-by-choice mode, or combinations thereof may be selected, configured, or constrained by an enclave command line parameter 140, compiler option, pragma, build system setting, source-level directive, source code annotation, project configuration, or combinations thereof. The selected mode may apply at a source file, translation unit, executable file 190, loaded executable 364, variable 286, symbol, note 212, function call, argument, execution environment, or policy level.
An enclave-aware source code annotation, storage class-like specifier (
“Argument-implied sharing” 360 refers to compiler behavior in which an argument relationship in generic source code 118 (
For example, source code may pass protected data as an argument to a function associated with a published symbol:
In the preceding example, the argument relationship may authorize data corresponding to a_secret to be represented in a protected payload 276 for the called function or execution environment without maintaining the data in common memory 166 in unprotected form. The enclave-aware compiler 122 may generate note formation semantics 370, processor instructions 120, or eABI metadata 246 to convey a copy, reference, descriptor, or other permitted representation.
Governed Launch, Trust Policy, and PKI“Governed launch authorization” (
A “governed operation” refers to a loading, initialization, registration, symbol-resolution, control transfer, data exchange, note processing, data security mode evaluation, execution, or other operation whose performance is permitted, restricted, denied, deferred, or conditioned based on a trust policy 386, trust determination, operation-specific permission, or combination thereof. Governed launch authorization may authorize one or more governed operations associated with loading, initialization, or registration.
“Trust policy” 386 refers to one or more rules, requirements, constraints, or configuration values used by an enclave-aware loader 146, eABI-aware runtime 180, operating system 148, hypervisor 226, or combinations thereof to determine whether an enclave-aware executable file 264, certificate 168, certificate chain 388, protected section 156, loaded enclave-aware executable 268, or other eABI-aware executable 112 is trusted for loading, initialization, control transfer, or data exchange between loaded eABI-aware executables 240 according to the eABI 114.
The trust policy 386 may include a trusted root requirement, publisher allowlist or denylist, certificate usage requirement, executable type requirement, protected section requirement, dependency rule, organization policy, user policy, administrator policy, enterprise policy, data security mode 130 requirement, provenance requirement, certificate validation requirement, production mode requirement, eABI participation requirement, or combinations thereof.
In certain embodiments, the enclave-aware loader 146 may evaluate the trust policy before loading a protected section 156 into a trusted execution environment 326 or before initializing the trusted execution environment, and an eABI-aware runtime 180 may evaluate the trust policy before permitting symbol resolution, note 212 processing, control transfer, data exchange, selected data security mode 374 use, or other eABI-mediated interoperability.
A trust policy 386 may be evaluated at load time, initialization time, runtime, note-processing time, control transfer time, data exchange time, symbol resolution time, or combinations thereof.
A trust policy 386 evaluated at one time may differ from a trust policy evaluated at another time. For example, a trust policy evaluated when an executable file was loaded may differ from a trust policy evaluated during execution. An enclave-aware loader, eABI-aware runtime, or policy component may reevaluate the trust policy and update a trust determination, eABI participation status, operation-specific permission, data security mode constraint, or combinations thereof.
A “policy component” refers to software, firmware, hardware, metadata, configuration information, executable code, runtime logic, loader logic, operating system logic, kernel logic, trusted execution environment logic, or combinations thereof configured to evaluate, enforce, communicate, determine, apply, update, or otherwise participate in application of a trust policy. A policy component may determine one or more allowed data security modes 376, evaluate trust information, evaluate a trust policy 386, evaluate provenance information 380, evaluate a certificate validation result 378, determine a selected data security mode 374, authorize or deny a control transfer 214, authorize or deny a data exchange 312, or combinations thereof. A policy component may be implemented within an enclave-aware loader 146, eABI-aware runtime 180, operating system 148, trusted execution environment 326, kernel service interface 414, kernel-resident trusted execution environment 416, loaded executable 364, or combinations thereof.
“Production mode” 174 refers to an operating state, configuration state, policy state, platform state, firmware state, administrative setting, enterprise setting, user setting, application setting, or combinations thereof that indicates whether trust requirements are to be enforced before loading, initializing, registering, executing, or permitting eABI-mediated interoperability involving an eABI-aware executable 112, enclave-aware executable file 264, protected section 156, loaded executable 364, or combinations thereof.
In certain embodiments, production mode 174 may be represented by one or more state indicators, configuration bits, policy values, registry values, firmware settings, enterprise policy settings, loader flags, deployment mode values, or combinations thereof.
When the production mode 174 has an “active state” 178, the enclave-aware loader 146, operating system 148, hypervisor 226, firmware component, or combinations thereof enforces governed launch authorization before loading a protected section 156 into a trusted execution environment 326.
When the production mode 174 has an “active state” 178, the eABI-aware runtime may require satisfaction of a trust policy 386 before allowing control transfer, data exchange, selected data security mode 374 use, or other eABI-mediated interoperability.
In certain embodiments, when production mode 174 is in an active state 178 and the certificate validation result derived from an enclave-aware executable file 264, protected section 156, or loaded executable 364 does not satisfy a trust policy 386, an enclave-aware loader 146 may prevent loading of the protected section into a trusted execution environment 326, prevent formation of a loaded enclave-aware executable 268, prevent initialization of the trusted execution environment, prevent registration for eABI-mediated interoperability, prevent control transfer or data exchange involving the loaded eABI-aware executable 240, prevent use of one or more selected data security modes 374, or combinations thereof.
“Development use” refers to the use of an executable for development, testing, debugging, evaluation, recovery, education, profiling, another non-production mode, or combinations thereof while production mode 174 is not in the active state 178.
In certain embodiments, when production mode 174 is not in an active state 178, an enclave-aware loader 146 may permit loading of an unsigned executable file 190, untrusted executable file, executable file having an untrusted certificate chain 388, or combinations thereof. The enclave-aware loader may record a trust status, development status, restriction status, eABI participation status, or combinations thereof associated with the executable file or with a loaded executable 364 formed from the executable file (
“Provenance information” 380 may identify a publisher, developer, user, organization, vendor, signing authority, executable family, executable version, executable identity, protected section identity, certificate policy, permitted use, distribution channel, product line, or combinations thereof. An enclave-aware loader 146, eABI-aware runtime 180, operating system 148, hypervisor 226, or combinations thereof may evaluate the provenance information as part of a trust policy 386 to determine whether loading, initialization, control transfer, data exchange, selected data security mode 374 use, or other eABI-mediated interoperability is permitted.
Certificate-based public key infrastructure 172 may be used to determine whether a certificate chain 388 satisfies a trust policy 386, a protected section 156 is authorized for loading, production mode 174 permits governed launch, or a loaded executable 364 may participate in one or more eABI operations.
A “certificate” 168 is a signed, cryptographically verifiable, or authenticated data structure binding identity, provenance information 380, a public key or identifier, enclave-compatible key 170, executable or protected section identity, signing identity, policy, permitted use, or combination thereof to an executable, protected section, trusted execution environment, publisher, developer, organization, or signing authority. It may be embedded in, appended to, referenced by, or otherwise associated with an eABI-aware executable, eABI metadata 246, signature block, or key information and used for trust, governed launch, provenance, mode, or participation decisions.
In certain embodiments, a certificate 168 associated with an enclave-aware executable file 264, protected section 156, enclave-compatible cryptographic key 170, or combinations thereof may include provenance information 380, identity information, attribution information, or combinations thereof.
“Signed section information” is a value or data structure corresponding to a protected section 156 and digitally signed, bound, or otherwise cryptographically associated with a certificate 168. It may include a hash, measurement, or section manifest generated over bytes, pages, relocation-adjusted content, section attributes, permissions, eABI metadata 246, a protected section, or combinations thereof.
Signed section information (
A “certificate chain” 388 is an ordered or otherwise verifiable set of certificates 168 linking an end-entity certificate associated with an executable, protected section 156, key, publisher, or other identity to a trusted root certificate 390 or trust anchor. The chain may include intermediate and root certificates, policy and usage information, validity and revocation information, timestamps, signatures 228, public keys, or combinations thereof.
“Certificate chain validation” may include verifying signatures, validity periods, usage and policy constraints, integrity, revocation, timestamps, trusted root status, provenance information 380, and combinations thereof.
A “certificate usage constraint” identifies or limits a permitted, prohibited, required, or intended use of a certificate 168, public key or identifier, enclave-aware executable file 264, protected section 156, or combination thereof. A trust policy 386 may require the applicable usage constraint before permitting loading, initialization, registration, or another eABI operation.
“Trusted root certificates” 390 include certificates, public keys or identifiers, trust anchors, root certificate authority certificates, and enterprise-, administrator-, system-, firmware-, or user-designated roots recognized by a public key infrastructure 172 or trust policy 386. They may be maintained in a certificate, policy, firmware, enterprise, operating system, deployment, hardware security module, or trusted platform store.
A certificate chain 388 satisfies a trusted root requirement when an associated root certificate, intermediate certificate, public key, identifier, or other trust anchor corresponds to an accepted trusted root 390. A trust policy 386 may combine that requirement with publisher, usage, policy, provenance, production mode, or other conditions for loading, initialization, registration, eABI participation, or data security mode use.
For example, a trust policy 386 may permit loading a protected section 156 only when the certificate chain 388 terminates at an accepted trusted root 390, provenance information 380 identifies an authorized publisher or organization, the certificate 168 satisfies a loading-related usage constraint, and the certificate is not revoked. The enclave-aware loader 146 evaluates each required condition when generating the trust determination.
“Certificate validation result” 378 refers to information representing, recording, or resulting from validation of certificate 168 information associated with an eABI-aware executable file 238, protected section 156, enclave-compatible cryptographic key 170, trusted execution environment 326, or combinations thereof. A certificate validation result may include certificate validity status, certificate chain validation result, revocation status, certificate usage status, certificate policy status, certificate signature status, trusted root status, integrity status, timestamp status, or combinations thereof. A certificate validation result may further describe a state, condition, usability, trustworthiness, expiration state, policy-compliance state, issuance state, or combinations thereof associated with a certificate or certificate chain 388.
In certain embodiments, a certificate validation result 378 may be generated by validating a certificate chain 388 including a certificate 168 associated with an enclave-aware executable file 264, a protected section 156, an executable portion, a publisher, a developer, an organization, a vendor, a signing authority, or combinations thereof. The certificate validation result may indicate whether the certificate chain is valid, invalid, expired, revoked, incomplete, untrusted, stale, malformed, policy-incompatible, or otherwise acceptable or unacceptable according to certificate validation criteria.
In certain embodiments, validating a certificate chain 388 may include verifying that each certificate signature in the certificate chain is valid, that each certificate is within a validity period, that the certificate chain terminates at or otherwise corresponds to a trusted root certificate 390, that a certificate usage or certificate policy permits loading into a trusted execution environment, that the certificate has not been revoked, that a timestamp satisfies a trust policy, that provenance information satisfies a publisher allowlist, denylist, or other provenance requirement, and that an executable identity or protected section identity in the certificate information corresponds to the enclave-aware executable file or protected section being loaded.
“eABI trust evidence” 382 refers to certificate information, provenance information 380, certificate validation result 378, attestation information, cryptographic key information, trusted root information, trust policy information, or combinations thereof presented, accessed, obtained, generated, or derived for validation under a trust policy 386 to support governed launch, trust determination, eABI 114 participation, selected data security mode 374 use, or combinations thereof.
A “trust determination” refers to a result of evaluating eABI trust evidence associated with an eABI-aware executable 112 or protected section 156. A trust determination may indicate whether loading, initialization, governed launch, eABI 114 participation, data exchange, selected data security mode 374 use, or other eABI-mediated interoperability are permitted, restricted, denied, or conditioned. By way of non-limiting example, a trust determination may indicate that a loaded eABI-aware executable 240 is trusted, untrusted, partially trusted, development-only, restricted, enterprise-approved, publisher-approved, certificate-validated, policy-limited, or combinations thereof.
In certain embodiments, a trust determination may include a certificate validation result 378, attestation validation result, measurement validation result, signature validation result, manifest validation result, provenance validation result, key-identity validation result, policy-compliance result, or combination thereof. eABI trust evidence may be evaluated with a trust policy 386 to generate a trust determination. When a production mode is in an active state, an enclave-aware loader may load a protected section into a trusted execution environment, initialize the trusted execution environment, or both only when the trust determination indicates that the corresponding loading, initialization, or both is permitted.
In certain embodiments, a trust determination may include one or more permit, deny, restrict, defer, or reason-code fields corresponding to loading a protected section into a trusted execution environment, initializing the trusted execution environment, registering a loaded enclave-aware executable for eABI-mediated interoperability, publishing symbols, satisfying external symbol dependencies, sending or receiving notes, using one or more selected data security modes, or combinations thereof. The enclave-aware loader 146, eABI-aware runtime 180, loaded executable 364, or combinations thereof may store or access the trust determination as runtime information associated with a loaded enclave-aware executable 268.
An “operation-specific permission” refers to information, a field, flag, status, reason code, policy result, or other value indicating whether a particular operation is permitted, denied, restricted, deferred, or conditioned. An operation-specific permission may correspond to loading a protected section 156, initializing a trusted execution environment 326, registering a loaded enclave-aware executable 268 for eABI-mediated interoperability, publishing or accessing a published symbol 194, satisfying an external symbol dependency 184, processing a note 212, performing control transfer 214 or data exchange 312, using a selected data security mode 374, or combinations thereof. Before performing an operation represented by a corresponding permission field, the enclave-aware loader 146 may access and apply the operation-specific permission. The system may execute the operation only when the respective permission field indicates that the corresponding operation is permitted.
“Comparison information” is information derived from a protected section 156 for comparison with signed section information, including a recomputed digest, measured value, parsed manifest information, bytes, pages, relocation-adjusted content, attributes, permissions, entry point information, eABI metadata 246, protected section identity information, or combinations thereof. The enclave-aware loader 146 may compare the information before authorizing loading.
To verify section correspondence, the enclave-aware loader 146 may recompute a digest, measure a protected section 156, parse a signed section manifest, or otherwise derive comparison information and compare it with a signed digest, hash, measurement, or manifest covering the protected section bytes, pages, relocations, attributes, permissions, entry points, eABI metadata 246, identity information, or combinations thereof.
Kernel-Resident Trusted Execution EnvironmentsThe following terms describe kernel-resident trusted execution environments 416, kernel-resident enclaves 402, isolated kernel code 418, isolated kernel resources 412, kernel service interfaces 414, and eABI-mediated access to protected kernel functionality (
In certain embodiments, a trusted execution environment (TEE) 326 may be instantiated, initialized, mapped, loaded, reserved, scheduled, or otherwise made available for use by an operating system 148 kernel, kernel component, kernel service, device driver, kernel module, hypervisor 226, secure monitor, firmware component, boot component, privileged service, or combinations thereof. The described structures may allow selected kernel resources to be maintained inside a TEE while permitting controlled access through defined kernel service interfaces 414 according to binary-level semantics defined by the eABI.
A “kernel-resident trusted execution environment” 416 (
In certain embodiments, a trusted execution environment 326 may be instantiated, maintained, or operated within an operating system kernel, kernel address space, kernel memory, privileged execution layer, hypervisor layer, secure monitor layer, or combinations thereof. Such a trusted execution environment may be referred to as a kernel-resident trusted execution environment. A kernel-resident trusted execution environment may isolate isolated kernel code, an isolated kernel resource, a protected kernel entry point 408, a kernel service, a kernel policy, a kernel secret, kernel state, or combinations thereof from kernel code outside the kernel-resident trusted execution environment, device drivers, kernel modules, user processes, hypervisors, privileged software, direct memory access, debugging software, introspection software, or combinations thereof.
In certain embodiments, a request involving a kernel-resident trusted execution environment 416 may correspond to a kernel-to-hypervisor communication, hypervisor-to-kernel communication, secure-monitor communication, hypercall request, virtual machine exit parameter, virtual machine entry parameter, memory sharing request, device assignment request, attestation request, or combinations thereof. The request may be represented in a kernel note 410, routable envelope 272, protected payload 276, eABI metadata 246, or combinations thereof and may be routed toward a kernel service interface 414 according to the eABI 114.
A computing environment may include one or more kernel-resident trusted execution environments 416, each maintaining one or more isolated kernel resources 412 and isolated kernel code 418. Kernel code outside such an environment, device drivers, kernel modules, usermode processes 150, hypervisors 226, privileged management components, or direct memory access mechanisms may be prevented from directly accessing the isolated resource except through the associated kernel service interface 414 and its policy and controlled entry mechanisms.
A “kernel-resident enclave” 402 (
“Isolated kernel resource” 412 (
“Isolated kernel code” 418 (
Isolated kernel code 418 may be generated from generic, enclave-aware, kernel, driver, or service source code by an enclave-aware compiler 122, a kernel build system, or a combination thereof. The enclave-aware compiler, kernel build system, or combination thereof may generate an eABI-kernel executable.
An “eABI-kernel executable” is an executable or object file, library 328, kernel module, driver or service, protected section 156, metadata, package, or combination thereof from which isolated kernel code 418 is loaded, established, linked, mapped, or otherwise formed. It may include or be associated with eABI metadata 246 identifying a published kernel-service symbol, defined entry point 262, kernel service interface 414, isolated kernel resource 412, request and return representations, trust information, policy information, or combinations thereof.
“Kernel service interface” 414 (
The kernel service interface 414 may receive an eABI-defined request and cause isolated kernel code 418 to process it within the kernel-resident trusted execution environment 416. Kernel code, drivers, modules, usermode processes 150, hypervisors 226, or other components outside the environment may be restricted from accessing the isolated kernel resource 412 except through the interface.
A “kernel service” is a function, operation, request handler, device driver or operating system service, credential or cryptographic operation, policy operation, isolated-resource operation, or combination thereof performed by or through isolated kernel code 418, a kernel service interface 414, or a kernel-resident trusted execution environment 416.
A “published kernel-service symbol” is a published symbol 194 corresponding to a kernel service and exposed or made resolvable under the eABI 114 through a kernel service interface 414, isolated kernel code 418, or combination thereof. It may correspond to one or more defined entry points 262.
An enclave-aware compiler 122 or kernel build system may generate kernel service interface metadata identifying a kernel service interface 414, protected kernel entry point 408, isolated kernel code 418, isolated kernel resource 412, request and return formats, symbol resolution and entry point information, candidate data security modes, policy information, validation information, or combinations thereof.
In certain embodiments, an isolated kernel resource may include a cryptographic key or credential used by isolated kernel code 418 to perform encryption, decryption, signing, authentication, key derivation, or credential validation. The key or credential and sensitive request data remain unavailable in unprotected form outside the kernel-resident trusted execution environment 416, except for authorized representations conveyed according to the eABI 114.
In certain embodiments, a protected communication path between a trusted execution environment associated with a usermode process and a kernel-resident trusted execution environment may be implemented using one or more kernel notes, protected payloads, routable envelopes, transit buffers, selected data security modes, cryptographic support information, validation information, or combinations thereof according to the eABI (
In certain embodiments, before protected interoperability between a first trusted execution environment associated with a usermode process and a second trusted execution environment associated with an operating system kernel, the system validates an identity, measurement, or trust status of each trusted execution environment and of each calling and called executable using a certificate, eABI trust evidence, provenance information, or a combination thereof. The system establishes or derives first and second enclave-compatible session keys usable within the first and second trusted execution environments, respectively. The first and second enclave-compatible session keys may comprise respective copies of a shared symmetric key, respective keys derived from a common secret, corresponding asymmetric keys, or a combination thereof. The session keys may be cryptographically bound to one or more validated identities, validated measurements, a published symbol, a kernel service, an invocation identifier, or a combination thereof. Neither session key is made available in unprotected form to a routing component or to kernel code outside the second trusted execution environment. Dispatch of an outbound kernel note is permitted only when the validated identities, measurements, or trust statuses satisfy an applicable trust policy. The calling executable may protect an outbound protected payload using the first enclave-compatible session key, and the called executable may protect a corresponding return payload using the second enclave-compatible session key.
During initialization of a kernel-resident trusted execution environment 416, a kernel loader, boot component, firmware component, secure-monitor component, hypervisor 226, operating system initialization component, or combinations thereof may make available published symbol information, kernel service interface 414 information, protected kernel entry point 408 information, policy information, selected data security mode information, candidate data security mode information, allowed data security mode information, validation information, or combinations thereof to loaded executables outside the kernel-resident trusted execution environment, isolated kernel code 418, the kernel service interface, the operating system 148 kernel, or combinations thereof.
A kernel service interface 414 may include executable, kernel, authentication, service, or policy-enforcement code configured to process requests involving isolated kernel resources 412 according to the eABI 114.
The eABI 114 may define symbol resolution and controlled entry semantics that resolve an external symbol dependency 184 to a published kernel service symbol and permit access only through the corresponding kernel service interface 414 and defined entry point 262.
In certain embodiments, a kernel service interface 414 may mediate access to an isolated kernel resource maintained within a kernel-resident trusted execution environment. The kernel service interface may receive a request according to binary-level semantics defined by the eABI 114, validate the request, route the request to isolated kernel code executing within the kernel-resident trusted execution environment via a protected kernel entry point 408, receive result information from the isolated kernel code, and return the result information according to the eABI. The request may correspond to access to, modification of, validation of, use of, execution of, or policy evaluation associated with the isolated kernel resource.
The kernel service interface 414 may expose defined entry points, request handlers, and note interfaces according to the eABI 114. A kernel note 410 may include a routable envelope identifying the kernel service interface, destination trusted execution environment, requested operation, boundary class, selected data security mode, or routing information, and a protected payload containing symbol, argument, buffer descriptor, validation, return, or other request information interpretable by isolated kernel code 418.
A processor 106 and kernel-resident trusted execution environment 416 may enforce memory-access, controlled-entry, controlled-return, and policy restrictions that prevent kernel code, drivers, modules, usermode processes 150, hypervisors 226, privileged management or debugging software, and direct memory access mechanisms outside the environment from directly reading, writing, modifying, using, invoking, calling, dereferencing, mapping, copying, exposing, or otherwise accessing an isolated kernel resource 412 except through a kernel service interface 414 and a defined entry point 262, protected kernel entry point 408, or other controlled entry mechanism according to the eABI 114. Kernel code outside the kernel-resident trusted execution environment may possess a descriptor, handle, reference, routable-envelope field, routing identifier, or service identifier associated with the isolated kernel resource or a kernel service without having direct access to the isolated kernel resource itself. An attempted access that bypasses the kernel service interface, bypasses a defined entry point, fails validation, violates a selected data security mode requirement, or violates a policy associated with the isolated kernel resource may be rejected, trapped, denied, audited, rate-limited, or handled under a violation policy.
A policy for an isolated kernel resource 412 may evaluate caller or execution environment identity, measurements, certificates, attestation, provenance, trust determinations, data security mode requirements, operation-specific permissions, rate limits, and audit requirements. Before acting on the resource, isolated kernel code 418 may permit, deny, restrict, condition, or audit the kernel service and may return result, denial, audit, or status information under the return semantics.
The eABI 114 may define binary-level semantics for a request or return involving a kernel-resident trusted execution environment 416 or kernel-resident enclave 402, including a syscall note 306 or kernel note 410 format, argument and return representations, routing information, controlled entry and validation requirements, and data security mode requirements for a kernel service interface 414.
A “kernel note” 410 (
A kernel note 410 may be dispatched, routed, delivered, validated, decrypted, authenticated, processed, and returned according to the eABI 114. Its routable envelope 272 may be visible to an eABI-aware runtime 180, operating system 148, hypervisor 226, kernel routing code, eABI-common executable 208, executable-side routing functionality, processor-supported transfer functionality, or other routing component, while its protected payload 276 remains interpretable only by authorized code in the destination trusted execution environment. Routing may include forwarding, relaying, copying, transferring, or causing transfer of a kernel note or return kernel note using routing information in the routable envelope, and need not expose the requested kernel service, symbol information, protected request data, or return data in unprotected form. In some embodiments, the routing component receives or copies a kernel note through common memory or a transit buffer. In other embodiments, the routing component supplies destination, permission, trust, target execution environment information 266, selected-data-security-mode, cryptographic-support, or return-routing information to a processor-supported direct note-transfer mechanism without receiving, copying, decrypting, or interpreting the protected payload or return payload.
A return kernel note may contain an integrity value binding its routable envelope to its return payload and may include an invocation identifier, note identifier, return-path identifier, caller-encrypted execution context 420, nonce, sequence value, session identifier, or combination thereof that correlates the return kernel note with an outbound kernel note. Before acting on an isolated kernel resource 412, the destination may validate applicable integrity, nonce, sequence, timestamp, freshness, one-time-use, policy, or selected-data-security-mode values. After validating the return kernel note, the calling executable, calling-side runtime functionality, or trusted execution environment associated with the calling executable may compare the correlation value with saved invocation state associated with the outbound kernel note and apply return data only to the invocation or data location associated with the saved invocation state. Return data may include a return value, result information, return status information, error information, denial information, audit information, output buffer data, modified referenced data, or combinations thereof, and modified referenced data may be applied only to a location identified by function signature information, eABI metadata 246, compiler-generated return instructions, saved invocation state, or a combination thereof.
A kernel note 410 or syscall note 306 may be processed under a selected data security mode 374 (
The kernel-resident-TEE embodiments may be combined with the eABI, compiler, executable, loader, runtime, symbol-resolution, note, data security mode, governed-launch, registration, restricted operation, and direct-transfer embodiments described in this disclosure.
In certain embodiments, enclave-aware compiled files, enclave-aware loading, runtime-mediated or direct note transfer, and eABI-defined semantics automate executable-level placement, protected loading, and controlled communication without requiring programmer-authored enclave-management logic.
The disclosed systems, methods, and non-transitory computer-readable media may combine the compiler, loader, runtime, executable, note, data security mode, trust, restricted operation, and kernel-resident-TEE mechanisms described herein. Each combination remains subject to the expressly disclosed execution environment, lifecycle, role, phase, metadata, payload, transfer mode, policy, and controlled entry distinctions.
Claims
1. A system for performing a restricted operation in support of executable content operating in a trusted execution environment, the system comprising:
- a processor configured to support the trusted execution environment and to enforce an execution restriction that prevents at least one restricted instruction from being executed within the trusted execution environment; and
- memory in communication with the processor, the memory maintaining: the trusted execution environment; common memory outside the trusted execution environment; a first loaded eABI-aware executable operating at least partly within the trusted execution environment, the first loaded eABI-aware executable being a loaded enclave-aware executable; and a second loaded eABI-aware executable operating within the common memory, the second loaded eABI-aware executable being a loaded eABI-common executable;
- wherein an enclave-aware application binary interface (eABI), embodied at least by first eABI metadata associated with the first loaded eABI-aware executable, second eABI metadata associated with the second loaded eABI-aware executable, and processor instructions of the first loaded eABI-aware executable and the second loaded eABI-aware executable, defines binary-level semantics for interoperability across a boundary of the trusted execution environment, the binary-level semantics including restricted-operation request semantics, data transfer semantics, symbol resolution semantics, controlled entry point semantics, and return semantics;
- wherein the first eABI metadata identifies an external symbol dependency corresponding to the restricted operation;
- wherein the second eABI metadata identifies a published symbol and a defined entry point corresponding to processor instructions of the second loaded eABI-aware executable configured to perform the restricted operation;
- wherein the symbol resolution semantics require the external symbol dependency to be resolved to the published symbol based at least on matching function signature information associated with the external symbol dependency and the published symbol, the function signature information identifying argument order information, argument datatype information, pointer or reference properties, and return datatype information;
- wherein, for an invocation of the external symbol dependency by processor instructions of the first loaded eABI-aware executable executing within the trusted execution environment, the first loaded eABI-aware executable is a calling executable and the second loaded eABI-aware executable is a called executable;
- wherein the calling executable is configured, responsive to the invocation, to: select, according to the data transfer semantics and based at least on the function signature information, call data corresponding to the invocation, the selected call data comprising a representation of protected data maintained within the trusted execution environment and corresponding to one or more arguments of the invocation; and issue, according to the restricted-operation request semantics, a restricted-operation request for performance of the restricted operation while making the selected call data available outside the trusted execution environment to the called executable;
- wherein the called executable is configured to: receive the restricted-operation request and the selected call data; process the restricted-operation request according to the controlled entry point semantics by transferring control only to the defined entry point corresponding to the published symbol and preventing the restricted-operation request from causing control transfer to an arbitrary address within the called executable; perform, within the common memory and using the selected call data, the restricted operation, wherein the restricted operation is unavailable or disallowed within the trusted execution environment and is performed using a restricted instruction, a system call, a standard library service, or an operating system interface; and form return information including result information according to the return semantics;
- wherein the called executable performs the restricted operation without directly accessing protected data maintained within the trusted execution environment that is neither included in nor represented by the selected call data; and
- wherein the calling executable is configured to receive the return information and apply the result information to the invocation.
2. The system of claim 1, wherein executable content of the calling executable and executable content of the called executable are generated by an enclave-aware compiler from one or more portions of generic source code, the generic source code including a source-language invocation corresponding to the restricted operation and omitting, for the source-language invocation, an enclave-specific interface definition, an enclave-specific call declaration, an explicit enclave lifecycle call, a manually written trusted execution environment transition wrapper, and explicit marshaling code.
3. The system of claim 2, wherein the enclave-aware compiler is configured to:
- identify a portion of the generic source code corresponding to the restricted operation;
- translate the identified portion into an eABI-common executable file from which at least part of the called executable is formed; and
- generate, within or associated with the eABI-common executable file, processor instructions configured to perform the restricted operation, eABI metadata identifying the published symbol and the defined entry point, and data transfer metadata usable in selecting the selected call data.
4. The system of claim 2, wherein a single enclave-aware executable file includes:
- a protected section from which at least a portion of the calling executable is formed;
- an unprotected executable section from which at least a portion of the called executable is formed; and
- eABI metadata identifying the trusted execution environment as a target execution environment for the protected section and identifying the common memory as a target execution environment for the unprotected executable section.
5. The system of claim 2, wherein:
- the calling executable is formed from at least a portion of an enclave-aware executable file;
- the called executable is formed from at least a portion of an eABI-common executable file; and
- the enclave-aware executable file and the eABI-common executable file are separate executable files.
6. The system of claim 1, further comprising an enclave-aware loader configured to:
- analyze eABI metadata included in or associated with one or more executable files;
- establish or initialize the trusted execution environment;
- load a protected section identified by the eABI metadata into the trusted execution environment to form at least part of the calling executable; and
- load an unprotected executable section identified by the eABI metadata into the common memory to form at least part of the called executable.
7. The system of claim 1, wherein the symbol resolution semantics require matching the external symbol dependency to the published symbol using at least a symbol hash, a boundary class, a function prototype, and an eABI version.
8. The system of claim 1, wherein the selected call data comprises one or more of:
- a direct argument value;
- copied data referenced by an argument;
- a handle;
- a descriptor;
- a sanitized representation of data referenced by an argument;
- a shallow-copy representation;
- a deep-copy representation;
- a copy-in representation;
- a copy-out representation; and
- a copy-in/copy-out representation selected according to the function signature information.
9. The system of claim 8, wherein protected data maintained within the trusted execution environment that is neither represented by an argument of the invocation nor selected for transfer according to the first eABI metadata is excluded from the selected call data and remains inaccessible to the called executable.
10. The system of claim 8, wherein:
- the selected call data includes a descriptor identifying a copy-out transfer or a copy-in/copy-out transfer associated with a protected data object maintained within the trusted execution environment;
- the return information includes modified-data information, output-buffer data, or both corresponding to the descriptor; and
- the calling executable is configured, after receiving the return information, to update the protected data object within the trusted execution environment according to the return semantics using the modified-data information, the output-buffer data, or both.
11. The system of claim 1, further comprising an eABI-aware runtime, wherein:
- the restricted-operation request comprises an outbound note including an invocation identifier, a routable envelope containing routing information identifying the called executable, the common memory, or both, and a common payload containing the selected call data;
- the calling executable is configured to dispatch the outbound note out of the trusted execution environment;
- the eABI-aware runtime is configured to route the outbound note toward the called executable by consulting the routable envelope;
- the called executable is configured to deliver the outbound note as an inbound note, process the common payload, perform the restricted operation, and dispatch a return note including the invocation identifier or a corresponding return-path identifier and a return payload containing the result information;
- the eABI-aware runtime is configured to route the return note toward the trusted execution environment; and
- the calling executable is configured to deliver the return note by correlating the return note with the outbound note based on the invocation identifier or the corresponding return-path identifier.
12. The system of claim 11, wherein:
- the routable envelope includes a source identifier, target identifier, execution environment identifier, boundary class identifier, dispatch flag, note size, return path information, selected data security mode identifier, transit buffer identifier, runtime routing field, or combinations thereof; and
- the common payload includes direct argument information, copied referenced data, a descriptor, shallow-copy information, deep-copy information, copy-in transfer information, copy-out transfer information, copy-in/copy-out transfer information, buffer length information, bounds information, ownership information, mutability information, or combinations thereof.
13. The system of claim 11, wherein the return note includes a nonce, one-time-use value, freshness value, sequence value, monotonic counter, timestamp, random value, session identifier, return path identifier, note identifier, invocation identifier, or combinations thereof that correlate the return note to the outbound note or bind the return note to a particular invocation, session, source execution environment, target execution environment, or loaded executable.
14. The system of claim 1, wherein the restricted operation comprises an operating system interface operation, system call operation, filesystem operation, network operation, memory management operation, time operation, hardware-resource operation, processor-identification operation, I/O operation, standard library operation, hypervisor call operation, privileged instruction operation, operation modifying system state, operation requiring execution outside the trusted execution environment, or combinations thereof.
15. The system of claim 1, wherein the loaded eABI-common executable implements a common memory service configured to receive respective eABI-mediated requests from a plurality of loaded enclave-aware executables operating at least partly within respective trusted execution environments and to perform one or more restricted operations on behalf of the plurality of loaded enclave-aware executables.
16. The system of claim 1, wherein eABI-mediated access to the restricted operation, the published symbol, control transfer to the defined entry point, data exchange involving the selected call data, or combinations thereof is permitted, restricted, or validated based on published symbol information, external symbol dependency information, loaded executable identity, execution environment, trust determination, selected data security mode, policy, operation-specific permission, or combinations thereof.
17. The system of claim 1, wherein the data transfer semantics require the selected call data to be conveyed according to a selected data security mode selected from modes supported by the calling executable and the called executable and permitted by a policy, the selected data security mode comprising plaintext mode, validation mode, encryption mode, secure mode, max mode, encryption-with-validation mode, or combinations thereof, and wherein, when the selected data security mode comprises plaintext mode, the policy authorizes the selected call data to be conveyed outside the trusted execution environment without encryption.
18. A computer-implemented method for performing a restricted operation in support of executable content operating in a trusted execution environment, the method comprising:
- maintaining, in memory in communication with a processor configured to support the trusted execution environment and to enforce an execution restriction that prevents at least one restricted instruction from being executed within the trusted execution environment: the trusted execution environment; common memory outside the trusted execution environment; a calling executable comprising a loaded enclave-aware executable operating at least partly within the trusted execution environment; and a called executable comprising a loaded eABI-common executable operating within the common memory;
- applying an enclave-aware application binary interface (eABI) defining binary-level semantics for interoperability across a boundary of the trusted execution environment, the binary-level semantics including restricted-operation request semantics, data transfer semantics, symbol resolution semantics, controlled entry point semantics, and return semantics;
- resolving, according to the symbol resolution semantics, an external symbol dependency of the calling executable to a published symbol of the called executable based at least on matching function signature information associated with the external symbol dependency and the published symbol, the published symbol corresponding to a defined entry point of the called executable;
- responsive to an invocation of the external symbol dependency by processor instructions of the calling executable executing within the trusted execution environment, selecting, according to the data transfer semantics and based at least on the function signature information, selected call data comprising a representation of protected data maintained within the trusted execution environment and corresponding to one or more arguments of the invocation;
- issuing, by the calling executable and according to the restricted-operation request semantics, a restricted-operation request while making the selected call data available outside the trusted execution environment to the called executable;
- receiving, by the called executable, the restricted-operation request and the selected call data;
- processing, by the called executable, the restricted-operation request according to the controlled entry point semantics by transferring control only to the defined entry point corresponding to the published symbol and preventing the restricted-operation request from causing control transfer to an arbitrary address within the called executable;
- performing, by the called executable within the common memory and using the selected call data, the restricted operation, wherein the restricted operation is unavailable or disallowed within the trusted execution environment and is performed using a restricted instruction, a system call, a standard library service, or an operating system interface, without directly accessing protected data maintained within the trusted execution environment that is neither included in nor represented by the selected call data;
- forming, by the called executable, return information including result information according to the return semantics;
- receiving, by the calling executable, the return information; and
- applying, by the calling executable, the result information to the invocation.
19. The method of claim 18, wherein:
- the calling executable and the called executable are formed from one or more executable files generated by an enclave-aware compiler from generic source code including a source-language invocation corresponding to the restricted operation, the generic source code omitting, for the source-language invocation, an enclave-specific interface definition, an enclave-specific call declaration, an explicit enclave lifecycle call, a manually written trusted execution environment transition wrapper, and explicit marshaling code; and
- eABI metadata of at least one of the one or more executable files is generated by the enclave-aware compiler based at least on function signature information associated with the source-language invocation, the eABI metadata defining an argument representation for the selected call data and a return representation for the return information.
20. A non-transitory computer-readable medium storing processor instructions that, when executed by one or more processors, at least one of the one or more processors being configured to support a trusted execution environment and to enforce an execution restriction that prevents at least one restricted instruction from being executed within the trusted execution environment, cause the one or more processors to perform operations comprising:
- maintaining, in memory in communication with the at least one processor: the trusted execution environment; common memory outside the trusted execution environment; a loaded enclave-aware executable operating at least partly within the trusted execution environment; and a loaded eABI-common executable operating within the common memory;
- identifying, from first eABI metadata associated with the loaded enclave-aware executable, an external symbol dependency corresponding to a restricted operation that is unavailable or disallowed within the trusted execution environment;
- identifying, from second eABI metadata associated with the loaded eABI-common executable, a published symbol and a defined entry point corresponding to processor instructions of the loaded eABI-common executable configured to perform the restricted operation within the common memory;
- resolving, according to symbol resolution semantics of an enclave-aware application binary interface (eABI), the external symbol dependency to the published symbol based at least on matching function signature information associated with the external symbol dependency and the published symbol;
- selecting, according to data transfer semantics of the eABI and based at least on the function signature information, selected call data for an invocation of the external symbol dependency by processor instructions of the loaded enclave-aware executable executing within the trusted execution environment, the selected call data comprising a representation of protected data maintained within the trusted execution environment and corresponding to one or more arguments of the invocation;
- making the selected call data available outside the trusted execution environment to the loaded eABI-common executable;
- causing the loaded eABI-common executable to process a restricted-operation request according to controlled entry point semantics of the eABI by transferring control only to the defined entry point corresponding to the published symbol and preventing the restricted-operation request from causing control transfer to an arbitrary address within the loaded eABI-common executable;
- causing the loaded eABI-common executable to perform the restricted operation within the common memory using the selected call data and using a restricted instruction, a system call, a standard library service, or an operating system interface, without directly accessing protected data maintained within the trusted execution environment that is neither included in nor represented by the selected call data; and
- causing return information including result information to be formed according to return semantics of the eABI and applied to the invocation by the loaded enclave-aware executable.
Type: Application
Filed: Jul 6, 2026
Publication Date: Nov 26, 2026
Applicant: Applied Enclaves LLC (Honolulu, HI)
Inventor: Mark Nelson (Honolulu, HI)
Application Number: 19/731,224