Architectures, systems, and methods for secure computing using hardware security levels

By introducing a Trusted Execution Environment (TEE) and a security level matrix to manage data and code interaction in the System-on-Chip (SoC), the vulnerabilities in system data and code protection in the prior art are solved, achieving hardware-level security protection and preventing data leakage and system damage.

CN114912138BActive Publication Date: 2026-11-17M·伦佩尔
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111625757.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-12-28
Filing Date
2021-12-28
Publication Date
2026-11-17
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

Existing technologies have vulnerabilities in protecting data and code within systems. Hackers can exploit these vulnerabilities to launch attacks, leading to data breaches and system damage. Existing solutions cannot provide a level of security independent of the penetration scenario, and measures such as firewalls are easily bypassed.

Method used

A hardware-based security architecture is adopted. By introducing a Trusted Execution Environment (TEE) in the System-on-Chip (SoC), and using an n×n matrix to define a hybrid security level, data and code are encrypted and stored according to their security level. Interaction management is carried out through the memory controller and external interface to prevent data and code interaction with incompatible levels, thus achieving hardware moat protection.

Benefits of technology

It effectively prevents confidential data from leaving the system and reaching hostile destinations, prevents data corruption, enhances system defense capabilities, prevents known attacks, and improves system security and integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114912138B_ABST
    Figure CN114912138B_ABST
Patent Text Reader

Abstract

The System-on-a-Chip (SoC) is designed to include a protective moat, allowing the SoC's external interfaces to act as security enforcers. This prevents data from being transmitted to untrusted devices. Data may only be reserved for friendly devices capable of protecting it at their respective security levels. It also prevents code from accessing data or jumping to addresses it is not authorized to process or to. According to one embodiment, both data and code are stored encrypted at corresponding levels, each with a different encryption key. An n×n matrix defines how security levels can be mixed, particularly when two different security levels are used. This provides a method for protecting data-data, code-code, and data-code interactions. A Trusted Execution Environment (TEE) is used during configuration, processor context switching, and secure communication. The hierarchical rule matrix is ​​programmable under the TEE.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-references to related applications

[0002] This application claims priority to U.S. Provisional Application No. 63 / 131,077, filed December 28, 2020, the contents of which are incorporated herein by reference. Technical Field

[0003] This disclosure relates to computing environments, and more particularly to secure computing environments that interact with external systems that are communicatively connected to the secure computing environment. Background Technology

[0004] Protecting data and code within systems is an increasingly significant challenge for businesses of virtually any size. Malicious attacks are common, resulting in system corruption due to malware designed to steal data and ransomware, for example, designed to destroy data. While various solutions have been developed over time, it is clear every day that criminals find vulnerabilities in systems and cause significant damage, requiring large ransom payments to release captured data, or expending time and resources to recover systems from the damage left behind by such attacks. Data breach reports are also frequent, resulting in reputational damage to the entities whose data was breached or otherwise referred to as stolen.

[0005] There are various solutions to deal with attempts to compromise data and code, the most common being the use of firewalls. Firewalls attempt to block access from most known attack methods and, in some cases, can even detect common patterns in such attempts. Other protective measures include monitoring system activity and looking for anomalies, both in real-time and offline. However, every system has vulnerabilities, which hackers are eager to find and exploit. In most cases, vulnerabilities are only closed after detection, and in many cases, after at least some damage has occurred.

[0006] Sensitive data or code stored in system memory is vulnerable to attack, so existing technology solutions attempt to continuously protect this data while the system performs different operations. While these solutions have their advantages, they also have weaknesses. The biggest weakness is that they are entirely or partially software-based, and almost all attacks exploit software vulnerabilities. Of course, once security is breached, damage will occur for whatever reason. This could be because the protected system failed to identify a malicious intruder upon entry, or failed to detect the attack because the actions performed appeared legitimate. Therefore, it would be advantageous to provide a solution that offers a level of security to the system independent of the intrusion scenario.

[0007] Enforcing zero trust for every instruction and transaction would be more advantageous. For example, Evan Gilman and Doug Barth describe zero trust in Zero Trust Networks. Allowing for the easy definition and migration of Trusted Execution Environments (TEEs), which is the goal behind confidential computing initiatives, would also be more beneficial. Summary of the Invention

[0008] An overview of several exemplary embodiments of this disclosure is provided below. This overview is provided to facilitate the reader in providing a basic understanding of such embodiments and does not necessarily limit the scope of this disclosure. This overview is not a comprehensive summary of all contemplated embodiments and is neither intended to identify key or critical elements of all embodiments nor to depict the scope of any or all aspects. Its sole purpose is to present some concepts of one or more embodiments in a simplified form as a prelude to the more detailed description that follows. For convenience, the terms "some embodiments" or "certain embodiments" may be used herein to refer to a single embodiment or multiple embodiments of this disclosure.

[0009] Some embodiments disclosed herein include a security system comprising: a plurality of first memory units adapted to include a plurality of first security levels, wherein each first security level is assigned to a corresponding data portion of a plurality of data portions in the security system, the plurality of data portions including a first data portion, a second data portion, and a third data portion; a plurality of second memory units adapted to include a plurality of second security levels, wherein each second security level is assigned to a corresponding code portion of a plurality of code portions in the security system, the plurality of code portions including a first code portion, a second code portion, and a third code portion; processing circuitry; and a memory containing instructions that, when executed by the processing circuitry, configure the security system to: determine whether a first interaction between the first data portion and the second data portion is permitted based on at least one permission rule and the corresponding first security levels assigned to the first data portion and the second data portion; and when it is determined that the first interaction is permitted, based on the first security level, determine whether a first interaction between the first data portion and the second data portion is permitted; and when it is determined that the first interaction is permitted, configure the security system to: determine whether a first interaction between the first data portion and the second data portion is permitted based on the first security level assigned to the first data portion and the second data portion ... The system generates a first result security level by assigning corresponding security levels to the first data section and the second data section; when it is determined that the first interaction is not allowed, the first interaction is blocked; based on at least one permission rule and the respective first security levels assigned to the first data section and the second data section, it determines whether a second interaction between the first data section and the second data section is allowed; when it is determined that the second interaction is allowed, a second result security level is generated based on the respective security levels assigned to the first code section and the second code section; when it is determined that the second interaction is not allowed, the second interaction is blocked; based on at least one permission rule and the respective first security levels assigned to the first data section and the second data section, it determines whether a third interaction between the first data section and the second data section is allowed; when it is determined that the third interaction is allowed, a third result security level is generated based on the corresponding security levels assigned to the third data section and the third code section; when it is determined that the third interaction is not allowed, the third interaction is blocked.

[0010] Some embodiments disclosed herein also include a system for secure computing, comprising: a processing element configured as a processing matrix that defines the security level of data processed by the processing element and the interaction between code.

[0011] Some embodiments disclosed herein also include a system for secure computing, comprising: a subsystem configured to process a matrix that defines the security level of data processed by processing elements and the interaction between code. Attached Figure Description

[0012] The foregoing and other objects, features and advantages will become apparent and more readily understood from the following detailed description taken in conjunction with the accompanying drawings, wherein:

[0013] Figure 1This is a schematic block diagram of a system for determining the security level of a storage block when writing to it, according to one embodiment.

[0014] Figure 2 It is a schematic block diagram of the system, the data moving within it, and their security levels;

[0015] Figure 3 This is a flowchart illustrating the calculation of a security context based on one embodiment;

[0016] Figure 4 This is a flowchart illustrating the calculation of the security level of an operation based on one embodiment;

[0017] Figure 5A This is a block diagram of an accelerator having a first configuration according to one embodiment;

[0018] Figure 5B This is a block diagram of an accelerator with a second configuration according to one embodiment;

[0019] Figure 6 This is a block diagram of the encryption security level during write-to-store according to one embodiment;

[0020] Figure 7 This is a block diagram illustrating the encryption security level during reading from storage according to one embodiment;

[0021] Figure 8 This is a block diagram of an on-chip system according to one embodiment, including an interface that provides a security moat around SoC logic;

[0022] Figure 9 This is a communication diagram illustrating a Trusted Execution Environment (TEE) receiving a security token from a qualified server to prove its identity and security capabilities, according to one embodiment.

[0023] Figure 10 This is a process for implementing a network interface according to one embodiment;

[0024] Figure 11 It is the format of a data packet containing an encapsulated security level according to an embodiment;

[0025] Figure 12 This is a modified network interface block diagram for detecting outgoing data packets when a connection is opened, according to one embodiment.

[0026] Figure 13 This is a modified network interface block diagram for incoming packets according to one embodiment;

[0027] Figure 14 This is a block diagram illustrating the code-data and code-code compatibility checks performed on data reading according to one embodiment;

[0028] Figure 15 This is a schematic diagram of a secure execution flow according to one embodiment where the result is invalid in the case of data-data or data-code incompatibility;

[0029] Figure 16 This is a block diagram illustrating the aggregation of calls via an entry function according to one embodiment;

[0030] Figure 17 This is a communication graph comparing communication flows with and without aggregation according to one embodiment, wherein the absence of aggregation is a situation where user functions cannot invoke worker functions, more specifically, addresses within worker functions;

[0031] Figure 18 This is a block diagram of hardware protection for a vehicle using hardware identification of sensor data and drive element commands, according to one embodiment.

[0032] Figure 19 This is a block diagram illustrating how to reduce overhead when using a globally unique identifier (GUID) according to one embodiment;

[0033] Figure 20 It is a hash table of thread contexts according to one embodiment;

[0034] Figure 21 It is a data structure for a thread context using a last-in-first-out list according to one embodiment;

[0035] Figure 22 It is a diagram of a free array corresponding to a context array according to one embodiment, which lists the free, unused structures in the context array;

[0036] Figure 23 This is a block diagram of a system for secure computing using a hardware-based security method according to one embodiment;

[0037] Figure 24 This is a communication diagram according to one embodiment; and

[0038] Figure 25 This is a block diagram of uninstallation to the uninstallation engine according to one embodiment. Detailed Implementation

[0039] Various embodiments will now be described in detail with reference to the accompanying drawings to enable those skilled in the art to readily implement them. Embodiments may be implemented in various forms and are not limited to those set forth herein. For clarity, descriptions of well-known components have been omitted, and the same reference numerals refer to the same elements throughout.

[0040] It is important to note that the embodiments disclosed herein are merely examples of the many advantageous uses of the inventive teachings herein. Generally, the descriptions made in this application do not necessarily limit any of the various claims. Furthermore, some descriptions may apply to certain inventive features but not to others. Typically, unless otherwise stated, singular elements may be plural and vice versa, without loss of generality. Moreover, the terms "level" and "safety level" are used interchangeably and have the same meaning.

[0041] The System-on-a-Chip (SoC) is designed to include a protective moat, allowing the SoC's external interfaces to act as security enforcers. This prevents data from being transmitted to untrusted devices. Data may only be retained by devices that can prove they are "friendly sites" (e.g., belong to the same organization) and are permitted to receive data at a certain security level. It also prevents code from accessing data or from jumping to addresses that the code is not authorized to access or jump to. According to one embodiment, data and code are encrypted and stored according to their security levels (e.g., in non-volatile memory), each level having a different encryption key. An n × n matrix defines how security levels can be mixed, particularly when two different security levels are used. This provides a method for protecting data-data, code-code, and data-code interactions. A Trusted Execution Environment (TEE) is used during configuration, processor context switching, and secure communication. The hierarchical rule matrix is ​​programmable under the TEE. The architecture described herein implements the goals of Security Enhanced Linux (SELinux), secure computing, and zero trust in hardware.

[0042] Therefore, the disclosed embodiments provide a hardware-based security architecture for the SoC that allows confidential data to be prevented from leaving the system and reaching hostile destinations, regardless of the type of attack; and prevents data corruption. Furthermore, the architecture disclosed herein can also prevent several known attacks. All of this occurs within the same framework. Specifically, the SoC implements various components to overcome vulnerabilities in existing systems.

[0043] First, in one embodiment, each memory page, regardless of whether it contains data or code, is mapped to a security level.

[0044] Secondly, in one embodiment, a set of rules regarding permissible interactions between different security levels is applied to determine the following: i) which data levels can be mixed in operation, and the resulting mixed level; ii) whether a code level can handle a specific data class, and the resulting level; and iii) whether a code level can invoke a specific code level.

[0045] Third, in one embodiment, the following operations are performed based on the interaction rules: i) updating the security level of the data while processing the data; ii) preventing the code from accessing the data; and iii) preventing code execution from jumping to some other address in memory.

[0046] Fourth, in one embodiment, a security context is created based on the calculation of the control flow of the determined program, wherein the security level of the data operations is at least that security context.

[0047] Fifth, in one embodiment, the SoC's external interfaces act as security enforcers, preventing data from leaving the system to untrusted sites, preventing unauthorized data from entering the SoC, and further preventing code from accessing blocks of data in memory with unauthorized or incompatible security levels. Therefore, these interfaces act as hardware moats, i.e., boundary barriers established around the SoC.

[0048] Sixth, in one embodiment, data is only allowed to leave the system to friendly devices that are permitted to receive it at a certain security level. In one embodiment, an additional layer is further implemented that requires machines to have access permissions. This additional layer requires machines to belong to a friendly domain, each machine to have permissions at the level of code and data it can store, and excludes unfriendly machines (e.g., servers) from accessing or receiving data or code from the system (e.g., SoC).

[0049] Seventh, in one embodiment, data and code are encrypted in memory, with each security level having a different key. Therefore, if the level storage block mapping is corrupted, the data cannot be accessed, and even if it were possible, it would greatly increase the difficulty of compromising system integrity.

[0050] Eighth, in one embodiment, code page interaction rules are used to create secure enclaves. Secure enclaves only allow specific code to access specific data (thus preventing data corruption and secret theft). Code-to-code interaction rules can also prevent back-to-the-loop (ROP) programming, while code-to-data interaction rules can at least prevent certain types of side-channel attacks.

[0051] Ninth, according to one embodiment, a dynamic parameter tracks the security context of each stream (thread), i.e., the "minimum" security level of the data in the stream (jumps and conditional jumps) determined by the security level of the data in the conditions that determine the dynamic program. This parameter is stored and restored during subroutine calls and context switches. Since it cannot be saved by software (e.g., the operating system), the processing unit saves it, along with the security level of the data in the registers, security flags, as discussed herein, and the register contents. Adding the program counter to the saved list means that the return parameter is not on the stack, thus rendering stack overflow attacks meaningless.

[0052] Tenth, in one embodiment, the TEE is used for configuration, context switching, and secure communication.

[0053] Eleventh, in one embodiment, each machine has a list of its authorized levels, which can be stored, allowing the machine to deny or disallow access to levels it is not authorized to. This prevents worms and malware from jumping from one machine to another.

[0054] Twelfth, in one embodiment, the memory controller (MC) tracks the security level of each memory page. The MC is responsible for enforcing access rules for reads and writes. The MC is also responsible for shredding the page content when it is freed. This can be done immediately by writing 0 to the page, or during the next refresh cycle of the page. While waiting for the next refresh cycle, all reads and writes are blocked.

[0055] Thirteenth, in one embodiment, when packaging the code, the mapping of each code and data segment is added to a tier, as well as the interaction rules between tiers. These rules exist only between tiers of the program.

[0056] Fourteenth, in one embodiment, only enterprise IT can add rules between different program levels and organizational levels. Fifteenth, when downloading code from a vendor, the machine maps the tuple (vendor, vendor GUID) to an internal GUID. Therefore, the GUID of the program downloaded on each machine is different.

[0057] Sixteenth, in one embodiment, when downloading code from an IT repository, the machine retains the GUID for both the code and data portions. If the IT GUID conflicts with an internal GUID in a program downloaded from a vendor site, the computer changes the internal GUID to eliminate the conflict.

[0058] Those skilled in the art will readily understand that adhering to multiple data types, multiple code types, security levels of interaction on control machines, and data flow between control devices allows for improved storage and enables storage in new locations, which is not available in existing solutions. In particular, the protection according to the disclosed embodiments is based on content type rather than on the location of the data or code. Therefore, any content (data or code) can be stored anywhere because its corresponding protection (security level) is attached to it, as explained in more detail herein.

[0059] According to one aspect of the invention, there exists a mapping between data storage blocks and data security levels. The security level of the data can be preserved by mapping memory blocks to the security level of the data within the block. That is, each memory block is mapped according to the security level of the data stored in the block. For example, but not as a limitation, if the system has two security levels, personal and enterprise, then each (data) block is mapped to either personal or enterprise; if the system has four security levels (personal, digital rights management (DRM) data, business classification, and trade secrets), then each memory block is mapped to one of these four security levels. In one embodiment, a personal security level can essentially mean "no confidentiality, can go anywhere." Therefore, it should be readily understood by those skilled in the art that the mapping of memory blocks according to this principle is therefore agnostic to what the data (content), what virtual machine it belongs to, or what process it belongs to. Instead, in various embodiments, this mechanism is implemented orthogonally to all other mappings and based on the security level of the content itself.

[0060] In one embodiment, the memory block size is 4 kilobytes (KB). In this regard, it should be noted that 4KB is a commonly used memory page size in Double Data Rate (DDR) memory. Therefore, it has been determined that a 4KB memory block size provides improved performance compared to at least some other memory block sizes. It should be noted that the various disclosed embodiments are described with respect to the security levels associated with 4KB memory pages; however, without loss of generality, embodiments disclosed can be based on at least some sizes used between 4KB and cache line sizes.

[0061] In various implementations, more than one data level can be written into a storage block of this size. Therefore, it is necessary to address what happens when data classified as security level A is written into a block classified as security level B. According to various disclosed embodiments, when security levels i and j are mixed in a given memory block, this is handled by an n x n matrix defining the resulting security level. In one embodiment, the matrix is ​​symmetric ((i,j) = (j,i)), such that the representation can be elements above or below the diagonal. Since the matrix is ​​sparse, any efficient representation of the sparse matrix is ​​further useful according to such embodiments. Therefore, a memory page herein refers to the minimum memory size allocated for a given security level.

[0062] The hierarchical rule matrix is ​​typically programmed by a Trusted Execution Environment (TEE). As further described here, the TEE receives the matrix values ​​directly from the server, i.e., without going through the operating system (OS). In one embodiment, the default classification is a predetermined value associated with incompatibility between security levels. As a non-limiting example, the default level is -1, which means that security levels are incompatible.

[0063] In a further embodiment, when two security levels are incompatible, they cannot be written to the same memory block (or used in the same instruction). Any such attempt will result in no data being written and a hardware exception. Non-limiting examples of incompatible levels are DRM data (e.g., copyrighted videos) and commercial data. Attempting to write one type of data to a memory block classified as another type will result in a hardware exception. It should be noted that while entries (i, j) are typically either i or j, this is not required according to at least some embodiments. The owner of the matrix can set any value that provides the necessary flexibility and other advantages of the disclosed embodiments.

[0064] Now for reference Figure 1 This illustrates an example schematic block diagram of a system 100 for determining the security level of a memory block when writing to it, according to an embodiment. The security level of the memory block is a function of the security level 120 of the data and the security level of the memory block (not shown), such as the security level of the memory controller stored in a memory controller security level cache 130 (and fetched into the cache in case of a cache miss). These two levels serve as input to a data-data security category matrix 140, the output of which is the security level of the memory block after data is written. The memory block's level is updated in the cache. If these classes are incompatible, data is not written to memory, the level is not updated, and an exception is generated. In one embodiment, the security level matrix 140 may be a collection of registers or memory.

[0065] In one embodiment, to accelerate the security level checking process, the mapping of memory blocks to security levels can be cached, for example, by the memory controller 110 into the memory controller security level cache 130. By virtue of locality, once a memory block security level is cached, subsequent reads / writes from the same or adjacent memory blocks will also be prefetched and typically reside in the cache. If the mapping is done page-orderly, assuming a cache line size of 64 bytes and a security level requiring 32 bits, a cache line holds the security levels of 16 consecutive 4KB memory blocks. The cache can be written back, as the only way to lose the mapping is through a memory fault that erases all memory contents, rendering the mapping irrelevant. The memory controller 110 is also responsible for shredding memory blocks that have been freed and can be reclaimed, i.e., rewriting confidential content. Once the contents of a memory block are shredded, its corresponding security level is set to non-confidential. During this process, the hardware is adapted to prevent any type of access to such memory blocks other than the shredding process.

[0066] refer to Figure 2 The diagram illustrates an example block diagram 200 of a system according to an embodiment, including the data moving within it and its security level. When data is read from memory, the memory controller 250 also processes the security level of that data. According to one embodiment, the security level must accompany the data to its destination, cache hierarchy 230, or accelerator 240. Data moves from cache 230 to CPU 210 and register file 220. It can move from register file 220 to CPU 210, back to cache 230, and then to memory (not shown) or accelerator 240. In one embodiment of a semiconductor chip, data may reach an on-chip buffer (not shown) or a register of the SoC (System-on-a-Chip). Data can be moved from accelerator 240 back to memory, on-chip buffer, or on-chip register. The memory controller security level cache 260 can be as follows: Figure 1 It functions as explained in the context of the memory controller security level cache 130.

[0067] Bus 290 consists of data lines and control lines. According to one embodiment, a security level line is added to the bus's control lines. Those skilled in the art will readily recognize that different implementations of bus 290 can exist depending on the bus syntax and semantics. For example, bus 290 may specify a start address and word count, or start and end addresses, or simply the address of each word. Regardless of the scheme used, the security level of data written to the bus is added as part of the transaction occurring on bus 290 and, in one embodiment, is inseparable from it. According to one embodiment, transactions involving multiple security levels are divided into level-based transactions. According to one embodiment, bus 290 may support preemption to handle changes in the security level of each transaction. If bus 290 is implemented as a network on chip (NoC), the security level can be added along with the address and length to the packet syntax.

[0068] According to an embodiment, each cache line in cache 230 has an associated tag to indicate its address. This tag can be control metadata. A security level is another type of metadata and is therefore added to the tag, as shown regarding cache 230. When data arrives at cache 230 via bus 290, the security level is read and recorded in addition to the data and address. As data moves up and down the cache hierarchy, the security level moves with it (and so does the address). Any snooping / coherence mechanisms reading data from cache 230 must also read the security level. When cached data is written back, the data, address, and security level are set on bus 290. This address can be a real memory address, a memory-mapped input / output (I / O), or an on-chip buffer.

[0069] The Central Processing Unit (CPU) 210 is a pipeline, where each stage has a control register (not shown) and a data register (not shown). The stages of the pipeline can be divided into instruction fetch stage, processing stage, and write-back stage. For simplicity, this paper assumes a load-memory architecture, where data cache contents are loaded into registers, and instructions receive their operands (excluding constants, immediate values, etc.) from registers. In parallel with the processing stage, new circuitry using the data-data security level matrix and code-data security level matrix, described in more detail herein, determines the security level of the results.

[0070] For load instructions, the final data, along with its security level, is retrieved from cache 230 and moved to the write-back phase. For store instructions, data is read from registers in register file 220, along with its security level, and stored in cache 230, or placed on bus 290 along with its security level en route to its destination. For data operations, consider the exemplary and non-restrictive instruction A = B op C, where B and C are operands, "op" is the operation, and A is the result. B and C enter the operation with security levels. The level of A, i.e., the result, is determined according to the data-data security level matrix and the code-data (described later) security matrix. If the levels of B and C are incompatible, or if the security level of the instruction is incompatible with the result levels of A and B, the operation produces a hardware exception according to an embodiment. Some operations produce constant values ​​(e.g., XOR(a,a) == 0). These operations, which are sometimes used to reset register values, are identified and reset the security level of the result to non-secure.

[0071] Conditional execution has been identified as requiring special care. In existing CPUs, arithmetic operations set the value of an arithmetic flag. This flag is checked during the execution of a conditional statement. If the flag meets the condition, the execution flow proceeds in one manner. If the flag does not meet the condition, the execution flow proceeds in another manner. A safety concern with conditional statements is that execution is a result of data values, which may originate from the execution flow.

[0072] Therefore, in addition to the arithmetic flag, according to the embodiment, the CPU 210 sets an arithmetic safety level, which is the safety level of the result of arithmetic operations. When the program flow reaches a conditional branch statement, the arithmetic safety level, the safety level of the branch / jump address, and the existing flow safety level determine the flow safety level for forward execution. The flow safety level is checked against the data safety level and code safety level of each instruction during program execution.

[0073] Figure 3An example flowchart 300 for calculating a flow security level according to one embodiment is shown. It should be noted that if the jump is unconditional, the flow security level is updated only using the jump address (if it is a calculation result, i.e., data-dependent, not a constant). In one embodiment, the first security level matrix 310 may be a register, a set of registers (forming a "cache" of recently used data pairs from the complete matrix), or a memory containing a portion or the complete security level matrix. In one embodiment, the security level of the jump address 320 is a register. In one embodiment, the second security level matrix 330 may be a register, a set of registers, or a memory containing a security level matrix. In one embodiment, the flow security level may be provided from the security context register 340, and the conditional arithmetic security level may also be a register.

[0074] According to one embodiment, each program begins its execution with a security context in a non-hierarchical level. Each arithmetic operation sets the arithmetic security level. The arithmetic security level is set whenever the arithmetic flags are set and the range of the arithmetic security level is the same as the range of the arithmetic flags (i.e., if they are reset, then the arithmetic security level is also reset). Whenever a branching operation (jump, conditional jump, subroutine call) occurs, the security context is updated based on its current value, the arithmetic security level, and the security level of the branch address, for example... Figure 3 Individual operand instructions within the stream. The security level of a label is actually a constant and does not affect the stream's security level. Jumps to the computed address are possible.

[0075] Now for reference Figure 4 This describes an example flowchart 400 illustrating the calculation of the security level (data-related portion) of an operation according to one embodiment. Therefore, the calculation of the security level of the operation is enhanced to include the security context in addition to the security level of the operands. Figure 4 As shown, the security level (op1) 410 of operand 1 and the security level (op2) 420 of operand 2 are input together into the data-data security level matrix 430.

[0076] The resulting security level output from security level matrix 430, along with security context 440, is input into data-to-data security level matrix 450. The result is a mixed data security level result 460. For example, if the security level of op1 is "1" and the security level of op2 is "2", then the combined level of the result will be negotiated with the security matrix and may be found to be "3", meaning it points to content within the relevant security matrix, such as the data-to-data security matrix. If the security context is "3", then the data-to-data matrix is ​​checked again to determine which security level result is input "3" and "3", which is likely "3". Therefore, the result of this example operation will be "3". It should be understood that the values ​​"1", "2", and "3" are arbitrary values ​​used for illustrative purposes and other values ​​may be used without departing from the scope of the invention.

[0077] It should be noted that a subroutine is an execution context. It may have its own conditional statements, and therefore, within a subroutine, the security context may be elevated. When returning from a subroutine, it is best to return to the security level in effect when the subroutine call was made. Therefore, the CPU 210 tracks the depth of subroutine calls (increasing call depth, decreasing return), and for each call, it maintains the security context at the time of the call. In one embodiment, the security context of an embedded subroutine call is never lower than the security context of the subroutine that called it. This is because the condition of a subroutine call can only elevate the lowest execution security level. The subroutine depth and security level are part of the thread context and need to be safely stored when the thread context is switched, as discussed further in this paper.

[0078] When the security context, along with the security level and security flags of the registers, are stored securely as described in this article, the register data and program counter are removed from the stack once these parameters are securely stored. As a result, stack overflow attacks, i.e., overwriting the return address, become meaningless.

[0079] In the case of an "if-then" statement, one of two possible execution flows may occur. The first execution flow occurs when the condition is met (logically true), while the second execution flow occurs when the condition is not met (logically false). The conditional branch elevates the safety context until the program or subroutine terminates. To better limit the impact of the condition, static analysis is performed on the execution flow to determine the boundaries of the condition code. Therefore, when exiting the condition code, the previous safety context is switched back. By doing so, data levels higher than necessary are limited or otherwise eliminated. It should be noted that additional instructions are used to save and restore the safety context and to identify the end of the condition code. In the case of a subroutine, the "return" instruction indicates the end of the range of flow safety levels set in the subroutine.

[0080] return Figure 2 When CPU 210 writes a value to register file 220, the register receives the security level of the data written therein. When CPU 210 reads data from register file 220, it also reads the security level of the data. The security level is written to security level registers 410 and 420 associated with the data's security level. Furthermore, when data is evicted from cache 230 and written back to memory 270, it is placed on the interconnect with its security level en route to the memory controller.

[0081] Accelerator 240 provides specific processing acceleration that can be executed under the control of CPU 210. In this context, accelerator 240 can be a hardware function that receives data and configuration information as input. In one embodiment, the accelerator may have a CPU for control functions, but does not perform any data processing; instead, it is performed on accelerator 240. That is, in one embodiment, the accelerator is a hardware block only or a hardware block with fixed, authenticated firmware that is immutable once loaded and primarily used for control tasks. Non-limiting examples of such accelerators include, but are not limited to, cryptographic engines, direct memory access controllers (DMACs), JPEG accelerators, MPEG accelerators, network interfaces, etc.

[0082] The result of the processing by accelerator 240 is its output. The configuration parameters of accelerator 240 are used to determine the actual processing performed by accelerator 240. Specifically, the configuration parameters can be used to determine the execution path within accelerator 240, and can also be used to determine calculation parameters such as filter coefficients.

[0083] Now for reference Figure 5A and 5B The figures 500A and 500B respectively illustrate example block diagrams of accelerators 240 having a first configuration and a second configuration according to various disclosed embodiments. By understanding the configuration parameters fed to accelerator 240, their security levels, and the security levels of the data (individual data entries or multiple entries from different sources), it is possible to determine which input affects which output, and thus determine the security level of the data output, without following the data within accelerator 240.

[0084] When under the control of configuration register 510, as Figure 5A When configuring the accelerator as shown, the input configuration register 510 configures the accelerator, causing the first input register 520 to provide data to the first output register 540 and the second output register 550. Although Figure 5A Direct connections are shown for illustrative purposes, but it should be noted that indirect connections can be used equivalently for data processing that occurs between input and output registers according to the disclosed embodiments.

[0085] Similarly, the second input register 530 is configured to provide data directly or indirectly to the second output register 550. Assuming the first input register 520 receives data d11 and security level s11, while the second input register receives input data d12 and security level s12, the respective outputs and their security levels are determined. The first output register 540, which receives data only from the first input register 520, outputs result o11, which inherits the same security level as its input, i.e., s11. The second output register 550 receives data from both sources, the first input register 520 and the second register 530; therefore, the resulting security level will be influenced by the security levels of s11 and s12.

[0086] like Figure 5A As shown, the output o12 of the second output register 550 has a security level calculated based on s11 and s12, and is further explained in this paper regarding the operation of the security level matrix. Figure 5B The illustrated configurations of the accelerator 240 differ due to different programming of the configuration register 510. As a result, the first input register 520 provides its data directly or indirectly only to the first output register 540. Similarly, the second input register 530 provides its data directly or indirectly only to the second output register 550. Thus, the respective outputs of registers 540 and 550, which provide outputs o21 and o22 respectively, each inherit the security levels s21 and s22 of their respective input registers 520 or 530. For an accelerator that processes one level at a time, the interconnect can store the data level at the input and apply it to the output. In turn, this can save logic in the accelerator, thereby reducing the amount of memory required to store instructions encoding such logic.

[0087] It should be noted that at least a first mode and a second mode work with the pipeline accelerator, which in one embodiment can be a highly pipelined accelerator. The first, as mentioned above, configures accelerator 240 to push data, waits for all data to exit before starting another iteration; in one embodiment, this may include, but is not limited to, configuration changes, data pushing, etc. The second mode configures accelerator 240 to push data, and once all data has left the first stage (not shown) of the pipeline of accelerator 240, it is reconfigured and new data pushing begins.

[0088] In the second mode, there may be multiple data types and configurations. Therefore, as data and configurations continue to advance through accelerator 240, the security level of the output may change at points in time when new configurations emerge and data begins to exit accelerator 240. To accommodate multiple configurations in the pipeline of accelerator 240, the pre-calculated security level of the new output must flow along with the initial wave of new data passing through the pipeline. This can also accommodate different outputs generated by paths of varying lengths.

[0089] It's important to note that even though security levels move through the pipeline, they don't flow with the data or are calculated at each processing node. Instead, security levels move from one level to the next, acting like control data, until they are used. Figure 5A and 5B The accelerators shown are combinational logic and do not include processing elements such as CPUs (except for control). Therefore, the case of a "subsystem accelerator" is considered as a SoC, i.e., the behavior of the CPU, interconnects, buffers, queues, and all other elements as described herein. This paper further describes external SoCs used as offloading engines, such as GPUs, machine learning engines, and other similar computing engines.

[0090] When data moves from one processing unit of the SoC to another, it may be moved via external memory, or, to save time and power, it may be moved on-chip. In one embodiment, moving data on-chip includes storing the data on-chip. When the switch from one unit to the next is fast, this is done in either queue (not shown), as such queues may be short. The queue may be implemented without departing from the scope of the invention and connected to the producer and / or consumer on the input side, or connected to the producer / consumer, such as an accelerator or memory, on one side and to interconnect 290 on the other. When the switch is slower, a large buffer (not shown) may be used to further move the data on-chip. The buffer is typically connected to interconnect 290 on one side and to the producer / consumer, such as an accelerator or memory, on the other side.

[0091] For queues, security levels can be attached as data moves through the queue. Buffers, typically much larger than a queue, can be divided into smaller units, each receiving data with the same security level; therefore, the unit requires a common security level type. In one embodiment, hardware buffer control is configured to recognize when a unit is emptied—that is, when all consumers have read the data—so it can shred the memory, for example, resetting the contents to 0 and further resetting the security level to the minimum, for example, to 0.

[0092] It should be noted that caches can follow this rule. The cache is divided into smaller units, such as cache lines and cache paths. Since each cache line originates from the same memory block, all words on that line have the same security level; therefore, the security level is added as cache line metadata. Cache lines are only evicted when they are overwritten or invalidated, so shredding occurs naturally without requiring an additional process. According to one embodiment, a mechanism is provided to invalidate or shred a cache line when the source memory page of its data is shredded.

[0093] Now for reference Figure 6 , Figure 6 An example block diagram 600 is shown, illustrating the encryption of security levels when writing to storage according to one embodiment. Figure 7 An example block diagram 700 is shown illustrating the decryption of a security level when read from storage according to one embodiment. In one embodiment, it may be necessary to store data in non-volatile memory and retrieve it using a storage controller 650. The storage controller 650 receives data from interconnect 290 and writes it to storage device 630. Data is retrieved from storage device 630 and written to interconnect 290 en route to its desired destination. In the first case, the security level arrives at interconnect 290 along with the data. To protect the data on storage device 630, including but not limited to disks, SSDs, or removable storage devices on disks, the data is encrypted using an encryption engine 620 before being written to storage device 630.

[0094] Each security level uses a different key, which serves at least two purposes. The first purpose is defense-in-depth, meaning that if one key is compromised, the others remain intact. The second purpose is to prevent attackers from altering the level mapping of memory blocks. When an attacker wishes to steal content from a protected device, they might attempt to attack the security level mapping. The goal is to change all security levels to unprotected levels. In this case, using the teachings of this document, when data is read from the protected device according to the embodiments, it will not be decrypted, or it will be decrypted with an incorrect key, thus rendering the attack worthless for data theft. It should be noted that the processing of data and / or code within and outside the SoC, the latter referred to as storage, is consistent with its security level.

[0095] Storage controller 650 uses storage blocks from storage device 630 to map security levels to storage blocks. When a storage block is read from storage device 630, this mapping is read by storage controller 650 and written to (secure, stolen) memory for fast retrieval. In one embodiment, a block-to-security-level mapping exists on a disk (e.g., a hard disk drive (HDD) or solid-state drive (SSD)), much like a link exists in a file system. Storage controller 650 reads the mapping into a cache it controls, block 670. Each time a storage block is written to the device, the mapping in the cache / memory is updated using a hierarchy matrix containing the new data and the levels of the storage blocks, as explained in more detail herein.

[0096] It's important to note that a storage block has an atomic unit. That's the smallest unit size that can be read or written. Therefore, a security level matrix is ​​not needed as long as the memory block and storage block are the same size. Security matrix operations, based on the principles described in this article, are only necessary when the storage block is larger than the memory block and multiple storage blocks can be written to the same memory block. Alternatively, the storage block can be subdivided into sub-blocks the size of a memory block; in this case, each time a memory block is written to storage, the corresponding sub-block inherits its security level.

[0097] In one embodiment, without loss of generality, it is assumed that the size of the receiving tier memory (sub)page (e.g., 4KB or a portion thereof) and the receiving tier memory (sub)block size are the same. The size of the tier written to storage is referred to as a "block," whether it is the actual size of the block or a fraction equal to the tier memory block size. For example, the file mapping on the device is updated / copied at regular intervals according to the interval at which the operating system (OS) updates the file mapping on the device. The operating system is responsible for mapping files to storage blocks. For each file, the operating system maintains a linked list of storage blocks that make up the file in the correct order; this is the file mapping. When a block is "released" by the file system, the OS notifies the storage controller 650 so that the storage block can be reclassified as untiered. In one embodiment, data shredding is not required because the data is encrypted. In some implementations, the data in the released block may be shredded.

[0098] Now for reference Figure 7 This is an example block diagram 700 illustrating the encryption security level when read from memory according to an embodiment. Those skilled in the art should readily understand that... Figure 6 and Figure 7 The scheme described herein is naturally suitable for virtual memory schemes because storing memory pages in and retrieving pages from secondary storage preserves a level of security. Furthermore, there are no restrictions on where the retrieved pages can be placed in memory under the control of the memory controller 250.

[0099] According to one embodiment, there is a basic assumption that data is always written in blocks, so when new data is written to a block, the controller changes the security level of that block. If writing stops for some reason before the entire block is written, some old data remains in the block, encrypted with its key, and the new data is encrypted with its key. While the old, secure data will not be properly decrypted, it can be shipped anywhere, perhaps decrypted with state resources. The same thing happens if we update the security level after the entire block is written. This time, the attacker writes confidential data to a non-confidential block. When the confidential data is encrypted, the block can be shipped anywhere. To prevent this, the storage controller can buffer a block (or a mapped sub-block) before writing begins. Writing only begins after all data has been fully buffered. The only way to stop writing is to turn off the power. Another possibility is to update before writing confidential data and update after writing non-confidential data. In terms of the feasibility of the attack, if the operating system file system code is the only code that can program the storage controller, and the file system always writes in blocks, then there is an extra layer of defense in addition to the storage controller block buffer. It should also be noted that the term "storage controller" as used herein refers to the interface between the SoC and the storage device. In one embodiment, the "storage controller" may be on a device and the interface may be a PCIe, USB, or a similar interface. Therefore, the "storage controller" in the embodiments refers to the SoC interface that communicates with the storage device.

[0100] According to one embodiment, the encryption keys set for each security level can be used on all devices across the organization, with the same key for each organizational level. In another embodiment, each device generates a different key set. Using a global key ensures that removable memory devices can be transferred from one machine to another, and the new machine can access the data. It also ensures that if device keys are corrupted for any reason, they can be recovered. The advantage of using different keys on each device is that files written to a removable device by one machine cannot be read by another machine, and a key corrupted on one machine cannot be used on another. Recovering security keys will be more difficult. However, if files have been backed up, they can be downloaded to the device, just as in any disk corruption use case.

[0101] According to one embodiment, the TEE is responsible for creating security level encryption keys and configuring security level key mappings. The security level key table can only be written to by the TEE and read only by the storage controller. A complete key table mapping security levels to keys is stored in memory and belongs to the TEE. Table 610 is on-chip and stores the keys for the currently active security levels, i.e., the levels used by the SoC. According to one embodiment, this allows the range of 20 bits per level in storage to approximately 10-12 bits on-chip, since not all security levels are used simultaneously at all times.

[0102] In various embodiments, the security level of data within the device is tracked to prevent data corruption by malicious code and to ensure that data is only transmitted to authorized devices and not to unauthorized and therefore potentially malicious devices. This can be achieved by employing a variety of techniques according to various disclosed embodiments. Each device receives an identity and is known to the organization's identity system. In a sense, a device may be considered a type of user, making it uniquely identifiable.

[0103] As part of the configuration process, each device, for example but not limited to, receives an encrypted token or an identity provided by the identity management system (not shown), which can be authenticated using the organization's public key. This allows: a) ensuring that the device belongs to the organization; b) specifying the security level that the device can be protected for; and c) providing the latest version of the TEE software on the device. It should be noted that the reasons for using an organizational identity system are: a) enabling cross-organizational federated systems using extended organizational identity systems; and b) enabling servers to identify the devices they serve, thereby enabling peer-to-peer data connections and reusing existing infrastructure instead of starting from scratch.

[0104] In one embodiment, the interface is used as an actuator. That is, the interface blocks outgoing data until the TEE verifies the credentials of the data destination. If the destination is not approved, the data will not leave the system. Furthermore, the interface receives the security level of incoming data and propagates that level to the SoC. It should be understood that the system includes the SoC, external DDR memory, storage devices, etc.

[0105] Now for reference Figure 8The diagram illustrates an example block diagram of a System-on-Chip (SoC) 800 according to one embodiment, including interfaces 820A-D providing a security moat 830 around SoC logic 810. In one embodiment, the actuator at the interface processes incoming data first, so such an interface can receive and securely retrieve the incoming security level. No malware can affect this security process because the CPU, as part of the SoC, has not yet seen the data, and the data is not in accessible memory (e.g., DDR). Interfaces 820, such as, but not limited to, interfaces 820A, 820B, 820C, and 820D, process input data first and output data last. Therefore, interface 820 can securely attach an output security level to the output data. Malware might attempt to obtain data from SoC 800 by operating within SoC logic 810. However, it is readily understood by those skilled in the art that malware cannot affect the operation of interface 820.

[0106] Figure 9 This is an example communication diagram 900 illustrating a Trusted Execution Environment (TEE) 920 receiving a security token from a qualified server 930 to prove its identity and security capabilities according to one embodiment. Each device has a hard-coded identity, such as a globally unique identifier (GUID) burned by an organization, original equipment manufacturer (OEM), or chip manufacturer. The GUID may also be generated by the TEE 920 and written to on-chip non-volatile memory, which can only be accessed by the TEE 920. In one embodiment, the initial password for the device is provided by personnel of the organization. On the device, the TEE 920 receives the initial password as part of the device's initial configuration. The TEE 920 also receives the organization's public key and the Internet Protocol (IP) address (or name) of the identity server 930. Once the TEE 920 is configured, it can connect to the organization's network and request a token to prove its identity and security capabilities.

[0107] Device interface 910 should signal to TEE 920 that the device is connected to the network. Alternatively, the TEE may request network interface 910 to attempt to connect to the sensed network. TEE 920 should establish a secure connection to the organization's identity server 930, typically through standard methods known in the art, and provide its credentials, namely its GUID and password. Identity server 930 provides the device with a token proving its identity, software version, and security capabilities, as well as any other information deemed necessary. The token is encrypted using the organization's private key and has an expiration date and time. In one embodiment, TEE 920 changes its password with identity server 930 before ending the session. Tokens can be valid for a short period, requiring the device to request a new token with a new expiration time when it needs to provide a token to another device. This reduces the replayability of the token. To further reduce replayability, each party can send a nonce to the other, and the receiver must provide the sender with a token containing that nonce. In general, various existing methods can be used to reduce the replayability of security tokens according to the disclosed embodiments.

[0108] Using tokens offers several advantages, as described in this article. First, it communicates the server's security capabilities to the client. Standard certificates only provide assurance that the server matches its claimed identity, while publicly available tokens also provide information about such security features. Second, it assures the server of the client's identity and security capabilities, as existing solutions do not identify the client to the server. Third, when connecting to a peer, neither party can sign messages with the organization's private key, so each device requests a short-lived token from the identity server 930 to provide to the other. Typically, tokens serve as a means of mutual authentication. Any other method, including the security level allowed for the device to receive, is also acceptable. Note that the token can also store the identity of the user assigned to the device. If the user using the device is not the user assigned to that device, the identity server 930 can refuse to provide data according to a policy, even if the device is authorized and the user is also authorized. In one embodiment, a poison pill message can be sent to the device to compromise the encryption key, making the data on the device unopenable. Since the TEE in the system controls all encryption and security information, it should also be adapted to receive poison pill messages.

[0109] Now for reference Figure 10 The diagram illustrates an example flow 1000 of a network interface implemented according to one embodiment. The interface may request credentials from the other end when a connection is established or when secure data is about to be sent to the other end. It has been determined that a disadvantage of requesting credentials when establishing a connection is that it is unnecessary most of the time (e.g., in a general browsing session) because data across the interface is not hierarchically structured in any way.

[0110] Therefore, the disclosed embodiments include techniques for requesting credentials when a connection is established, which offer at least two advantages. First, it saves time when data begins to move between devices. Second, because the server TEE may not be able to communicate with the TEE on the client to receive credentials and send confidential materials. Consider a client opening a connection with a server and requesting a hierarchical document. If the server does not yet have the client's credentials, it needs to contact the client TEE. However, the client TEE's port is different from the OS socket's port, so if the client is behind a NAT, the server TEE cannot reach the client TEE. Therefore, in one embodiment, the protocol requires that when the client opens a connection with the server (e.g., a SYN request), the network interface notifies the client TEE, and the client TEE should attempt to open a connection with the server TEE. If the protocol succeeds, i.e., the other party identifies itself as an organizational device, the other party is added to a dynamic whitelist (e.g., see [link to relevant documentation]). Figure 10 In (1050), this list identifies the destinations that can receive hierarchical levels, and which levels. Since the pre-designated port is dedicated to TEE-to-TEE communication, the server's network interface determines that an incoming connection request is destined for a TEE. In the client-server case, the client TEE and the server TEE are communicating confidential information. In one embodiment, packets destined for this port are always routed by the interface to the TEE and never to the OS. Therefore, the device-to-device TEE protocol is as follows (see, for example, Figure 12 and 24 ):

[0111] 1. The client's network interface, such as interface 910, recognizes SYN requests (or any other protocol initiation messages) sent to the IP address;

[0112] 2. The network interface transmits the information to the sender, TEE 920;

[0113] 3. The source TEE attempts to open a secure connection to the destination machine's TEE port;

[0114] 4. If the TEE port is not enabled:

[0115] a. No ACK received;

[0116] b. The destination does not work according to the agreement (e.g., it does not provide the required token);

[0117] It is assumed that the destination is untrustworthy regarding confidential data;

[0118] 5. If the TEE port is enabled (i.e. the machine supports the protocol) and a connection is established, the source TEE requests a security certificate from the target TEE;

[0119] 6. Security proof can be a token from the organization's server 930 or a digitally signed certificate. If the proof is a token, data can move bidirectionally. If the proof is a certificate, confidential data cannot be uploaded. The certificate option is used to download security programs from the vendor's site, which will be described in more detail here. This protocol is similar to TSL, but between TEEs.

[0120] 7. The client TEE initiates an agreement regarding the signing protocol and key, as well as data encryption and the key (out of range). This effectively opens a tunnel between the client TEE and the target TEE. For the recipient to understand the data, it must pass through the recipient TEE.

[0121] 8. Both TEEs are configured to send all intended security data to the same IP address and TEE port based on the other machine's IP address and port. The original data packet is embedded in the new data packet;

[0122] 9. Each party also lists the security levels that can be sent to the other party based on the capability tokens received.

[0123] return Figure 10 When output packet 1010 arrives at the interface, if the data is not classified (1020), it is sent to destination 1030. If the data is classified (1020), the interface checks if the destination is authorized to receive security level 1040. If the target device is not trusted at this level, the packet is discarded, and an error message may be sent to OS 1070. If the target device is trusted, the interface encapsulates, signs, and encrypts the packet in a new packet sent to the same destination IP, and sends it to the TEE port 1060 of the destination machine. By default, destinations not in the table are not trusted at any level (except for non-classified levels). Destinations in the table may be allowed to receive certain levels but not others. At the receiving end, the interface identifies the TEE port and forwards the packet to the TEE. The TEE removes the encryption, checks the signature, removes the encapsulation, and forwards it to the operating system. Forwarding to the TEE involves triggering a TEE interrupt and sending the packet to a dedicated on-chip buffer (not shown), protected by the data security level, which only the TEE can handle, or writing it to external memory (not shown), which only the TEE can handle the data security level.

[0124] Figure 11An exemplary and non-limiting format 1100 of a packet containing an encapsulated security level 1130 is shown according to one embodiment. The first 128 bits of the new payload 1120 are the security level GUID 1130 of the payload in the encapsulated packet. This is followed by the encapsulated packet 1140. The original data packet is followed by a signature 1150 of security level 1130 and the encapsulated packet 1140. The complete payload 1120 is then encrypted. Based on the principles discussed herein, the fact that the new payload is signed and encrypted ensures that the security level cannot be changed without being detectable. Similar to Virtual Private Networks (VPNs), the packet size of operating system packets must be limited so that the encapsulated data packet does not exceed the maximum packet size.

[0125] Now for reference Figure 12 This illustrates an example modified network interface block diagram 1200 for outgoing packets according to one embodiment. It should be noted that... Figure 10 The focus is on outgoing grouping, while Figure 12 The focus is on detecting SYN packets and updating the allow table. Packet 1210 is read from memory (not shown) and, along with its (hardware-provided) security level, enters the modified network interface 1200. SYN check 1230 confirms whether the packet is a SYN packet. If so, the destination IP is forwarded to TEE 1220 to verify the destination's trustworthiness. TEE 1220 performs an authentication protocol with the destination and writes the decision to the destination table 1240 of interface 1200. It checks whether packets with future hierarchical classifications are allowed to be sent. If they are allowed, interface 1200 encapsulates them in packets (1250) sent to the destination TEE. If not allowed, the packet is discarded. Once encapsulated, the packet is forwarded to the "legacy" interface 1260 for transmission.

[0126] Figure 13An exemplary and non-limiting modified network interface block diagram 1300 for an incoming packet is shown according to one embodiment. The packet is thus received by the modified network interface. First, the port number of the TEE 1320 is checked. If the TEE is the destination, the packet is written to memory 1350 or an on-chip buffer (not shown) with a TEE security level, and an interrupt is generated for the TEE 1310. If the packet is not for the TEE, a non-confidential level 1330 is added to it, and the packet continues to be processed using the "legacy" network interface 1340. For packets for the TEE, the TEE opens the 1310 package, extracts the security level, and forwards the packaged packet and security level to the "legacy" network interface 1340. Data may reach the "legacy" network interface 1340 via a dedicated connection or via direct memory access (DMA). There are several methods to open incoming packets; the first is to open all levels of packets using the TEE on the SoC, i.e., packets for the TEE port. The second method is to use an encryption engine (see...) Figure 10 This allows the interface to open hierarchical packets. If the GUID is known, the packet is written to memory along with the corresponding active GUID. If the GUID is unknown, the packet is forwarded to the TEE. Those skilled in the art should readily understand that there are other ways to divide the work between the SoC's TEE and the interface, which can be utilized according to the disclosed embodiments.

[0127] In one example implementation where an organization rents virtual machines from a virtual machine (VM) provider, the rented machines can connect to the organization's machines via a Virtual Private Network (VPN). On the rented VMs, the security level must be mapped in some way to the organization renting the VMs (e.g., via an organization prefix in the GUID) so that data cannot be forwarded to machines from different organizations. In another scenario, opening connections to external Software-as-a-Service (SaaS) machines that may serve multiple organizations is a combination of regular machine-to-machine connections and virtual machine servers (hosting machines from multiple organizations).

[0128] In one embodiment, for leased machines in the cloud and SaaS machines that simultaneously serve multiple organizations, these machines are able to: (1) identify the organization that initiated the connection; and (2) distinguish data from different organizations. To identify an organization's server, the organization's name can be added to the channel establishment protocol and sent along with the identity and capability token. This allows the SaaS machine to determine which public key to use to open the token. The security matrix prevents data and code from one organization from interacting with data and code from another organization. For SaaS and cloud services, multiple connections from the same IP (the organization's public IP) can exist. Therefore, the interface also checks for any other similar indications of the FIN (close connection) handshake or other protocols. Technicians should understand that FIN may indicate that the sender is closing the connection, i.e., it will not send any more packets. Each TEE keeps a reference count of the number of connections opened between two IP addresses, and when the count becomes 0, the TEE also closes their connection. To avoid attempting to open connections with insecure servers, client TEEs can have a list of IP addresses of common unfriendly sites (e.g., news sites, shopping sites, social networks). Since no TEE-to-TEE connections will be established, they will not be added to the Trusted Destination Table 1240 and will not receive any security data. This ensures that no TEE-to-TEE connections are established between the client TEE and those untrusted sites.

[0129] The principles of data protection disclosed herein can be further applied to code protection, as code pages can also be associated with corresponding security levels according to the disclosed embodiments discussed herein. Using code security levels, unauthorized code access to privileged data can be prevented. Furthermore, using code security levels can prevent side-channel attacks, i.e., disallowing data input unless requested by authorized code. A first method to achieve this security is in the memory controller to prevent unauthorized code from accessing data. A second method is in the cache hierarchy (and / or CPU pipeline, design decisions), which can prevent unauthorized code from accessing data introduced by authorized code. To handle the interaction between code and data at different security levels, a code-data security matrix is ​​used. The code-data security matrix should have values ​​indicating incompatibility, read authorization, write authorization, and read / write authorization. To handle the interaction between code and code at different security levels, a code-code security matrix is ​​used. The code-code matrix should have values ​​indicating incompatibility, call / jump authorization, read authorization, write authorization, and read / write authorization.

[0130] Now for reference Figure 14This illustrates an example block diagram 1400 of a check performed for code-data compatibility according to one embodiment. The key to preventing data from entering the SoC from memory 1460 is the memory controller 1430. This also aligns with the moat approach discussed herein, which places defenses on the interface. The memory controller 1430 stores a level for each memory page and is the only module capable of reading that level. Therefore, each data / code fetch instruction from CPU 1410 forwards not only the address but also the level of the requested data / instruction to the controller. The memory controller 1430 should have a copy of the code-data and code-code security level matrix 1450, which maps which code level can access which data level and which code level can invoke which code level. If the fetch level is incompatible with the fetched data / code level, the data / code is not fetched.

[0131] The following can be observed: 1. To avoid increasing latency, data can be acquired during security level checks, but only published to the SoC if permitted. For this purpose, data is retained if a cache miss exists in the page-level cache 1440. 2. The exposed mechanism prevents unauthorized code from requesting privileged data via speculative execution, as the memory controller 1430 does not know whether the request is genuine or speculative. 3. A jump to another address is a request to read instructions from a different location. An access error occurs if the level of the call / jump instruction is incompatible with the level of the jump / call target. This is possible because the matrix provides values ​​and is unaware of the semantics of its rows and columns, whether they are data or code. 4. Compatibility checks are performed on write requests, just as they are on read requests. 5. For smaller matrices, the security level matrix can be divided into three matrices: (a) a data-to-data security matrix; (b) a code-to-data security matrix; and (c) a code-to-code security matrix. Each matrix outputs the security level of the data result, or "-1" indicating incompatibility.

[0132] In one embodiment, if the requested data is already in cache 1420, the corresponding data security level is also available. A code-to-code security matrix is ​​added to the cache 1450 retrieval mechanism; if the code level is incompatible, the cache will generate an access error. If code-data compatibility is checked in the pipeline, adding a code-data matrix is ​​not necessary; this will refer to... Figure 15 Further description. In one embodiment, it is not necessary to explicitly display jump access violations; the instruction cache has a code-to-code safety matrix to check for jumps, function calls, and violations. The state of the line prior to the execution phase is further shown.

[0133] According to the embodiment, the instructions and operands are prepared, and therefore their security levels are also prepared. Since the instructions and operands have been fetched, the compatibility of the instructions and each operand has been verified, and the resulting security level is appended to the operands.

[0134] From Figure 15 The operation shown further clarifies this operation. Figure 15 An exemplary and non-limiting diagram 1500 illustrates a secure execution flow according to one embodiment, where results are invalidated in cases of data-code incompatibility. When instruction logic 1550 prepares the results, the operand security level is checked against the security level generated by the mixed operands, and the compatibility of the mixed result with the instructions is checked. If an incompatibility is generated at any level of the level check, it flows to the last result (code-data compatibility), where it is output to the instruction logic (any mixture of level and "incompatible" results in "incompatibility"). During program execution, operands may have the same security level (e.g., when processing documents), while code (e.g., a handler) may have the same security level. If the levels change, for example, due to a jump to a service, these levels change slowly. Therefore, one possible optimization is to cache the security level and matrix results in the level pipeline. If the level input equals the cached level, the cached result is the result, and there is no need to use the matrix, which may be further away from the pipeline. Since the pipeline may be running multiple threads, the thread's level cache is stored and restored during context switching. In specific cases of Just-In-Time (JIT) compilers and self-modifying code, the (i,i) element of the code matrix is ​​enabled for reading / writing. This allows the code to read more code. It also allows code to be written at the same level. According to one embodiment, JIT code or modified code can also have different levels.

[0135] Direct Memory Access (DMA) controllers and other accelerators can typically generate their own memory transactions; however, they are programmed by the CPU. Beforehand, the accelerator receives the data level of the incoming data. The configuration register should also receive the instruction level for writing to the register. Each accelerator can remove the instruction level from registers that don't need to know it, and retain it for registers that do need to know it, such as the address register. Instruction safety levels can be used to allow only certain code to use the accelerator. When an accelerator requests a memory read, it should also send the instruction level of the instruction configuring the memory range.

[0136] Those skilled in the art will now understand that the disclosures made herein enable new applications. By providing one or more security levels for OS data such as file systems, process control blocks, and process memory mappings, non-OS code can be prevented from reading and modifying data content. By adding security levels to OS code, specific OS code can be allowed to handle specific OS data. Data pages are associated with data security levels. When the CPU attempts to execute an instruction with an incompatible data security level, it generates a hardware exception. In one embodiment, to protect code regions from being written to a security matrix, code pages have their own security levels that other levels cannot write to. A memory page is marked with a level when the first word is written to it, and from then on, the page is protected accordingly. To allow the first write, the operating system must use a special instruction to "free" the page, as further discussed herein, shredding the hierarchical data is already necessary. A free, unallocated memory page is either classified as "non-hierarchical" or assigned its own level. In both cases, any level can write to the free page. If the entire page is not written by that code, a security vulnerability may exist. If the code is read from storage, it is read in block-size increments, such as multiple memory pages. Even if the last page has some optimizations, the memory block has been "freed" early, so it has no hierarchical content. If the block is not freed, the code hierarchy will be incompatible with the content hierarchy and therefore will not be written according to the disclosed embodiment.

[0137] Return-to-Op (ROP) attacks are techniques in which unauthorized code performs a task jumps to a section of authorized code that is also performing the task. Once the task is complete, a return instruction in the authorized code relinquishes control to the unauthorized code. By carefully piecing together such jumps, unauthorized code can potentially cause harm.

[0138] Now for reference Figure 16 This is an exemplary and non-limiting block diagram 1600 illustrating calls aggregated through an entry function according to one embodiment. It should be noted that, in one embodiment, if the licensed code is OS code, applications cannot be prevented from calling that OS code. This is because these applications may need to call system calls, OS functions, and OS services. Figure 16As shown, a technique is employed where calls from application 1610 are routed to the necessary paths to prevent the calling application 1610 from using any other paths. This forces the calling application 1610 to call the legitimate entry point of the service, rather than points within the service. Therefore, an entry function 1620 is created that can be called by application 1610. The entry function 1620 is then authorized to call the corresponding OS worker function 1630. The entry functions 1620 are located in the same one or more memory pages, and thus all are accompanied by a security level that allows calls by application 1610 and also allows calls to OS worker functions 1630. In one embodiment, application 1610 cannot directly call worker functions 1630 enforced by a code-to-code security matrix according to the principles disclosed herein.

[0139] Figure 17 Example communication diagrams 1700A and 1700B according to an embodiment are shown, comparing communication flows with and without a convergence (1700B). In the communication flow with a convergence (1770A), user function 1710 cannot call worker function 1720, and more specifically, an address within worker function 1720. Instead, it is necessary to route the call from user function 1710 to entry function 1730 to access worker function 1720.

[0140] In one embodiment, secure enclaves can be used based on the principles described herein. Secure enclaves are functions that store confidential data accessible only to them, serving specific applications or general services. Code-to-code security level restrictions prevent unauthorized calls to secure enclave functions. By pooling entry functions, unauthorized functions can be prevented from jumping to enclave code instead of through the designed entry point. In one embodiment, a code-to-data security matrix is ​​used, ensuring that only enclave code can access enclave data. It should be understood that the advantage of using this scheme for enclaves is that memory is unrestricted. As many enclaves as needed can be set up at any location in memory, offering a significant advantage over solutions with limited enclave memory usage, resulting in more efficient and flexible memory use. Enclave code can be of any size, and similarly, enclave data can be of any size. Enclave code and data can be swapped in and out of memory (virtual memory).

[0141] In one embodiment, to prevent hardware (HW) exceptions that might occur when writing memory pages as enclave data, which could be caused upon data return, and because no other code can access the enclave data, a declassification feature is used. Each enclave returning data invokes the decryption function it can only invoke, returns the data, and returns the address. The declassifier's code-data security matrix accepts the enclave security level and converts it to a predefined (at the time of declassification) security level, an unclassified level (which will be converted to the level of the page it is written to), or the stream security level of the calling function. The latter has the advantage over unclassified because it attaches the correct security level based on the call, where writing an unclassified level on a new (unclassified) page can be problematic. This requires hardware support to forward calls to the enclave / declassifier with the security context.

[0142] Virtual machines (VMs) provide separation of execution environments where there is no shared code or data. By properly hierarchically classifying code and data and setting corresponding code matrices, code on one machine cannot call code on another machine, nor can it read data from another machine. By using multiple levels for each VM, vulnerability to attacks originating from within the VM is significantly reduced.

[0143] Now for reference Figure 18 According to one embodiment, an example block diagram 1800 of vehicle hardware protection using hardware identification of sensor data and drive element commands is presented. The vehicle receives data from sensors, such as sensors S1 1820 and S2 1830, and sends commands, such as braking, steering, and acceleration, to drive elements (DEs), such as DE1 1840 and DE2 1850. Those skilled in the art will understand that there is a risk that malicious data may replace sensor inputs (e.g., inputs provided by sensors S1 1820 or S2 1830) and be sent via a data link connected to CPU 1810. Similarly, when control commands are sent to drive elements, such as DE1 1840 or DE2 1850, commands sent by CPU 1810 may be substituted. Based on the principles disclosed herein, system 1800 has sensors, such as sensors S1 1820 and S2 1830, and is also equipped with a hardware identifier (HW ID) that identifies data as originating from the sensors. A similar approach can be used for control commands that also provide a hardware ID as the command source. Therefore, the sensor processing code verifies that the sensor data has the correct security label (using the code-data matrix described in more detail here) and the command generator generates a command package with the correct security level. The sensor ID and command ID are generated by the hardware.

[0144] Therefore, in addition to other advantages regarding worms, the content disclosed herein also has other advantages. Worms connect via direct connection (e.g., USB flash drive or wired network) or wireless connection (e.g., The worm moves from one machine to another. This means the worm enters the system through an interface. If the interface checks the security level, and if the worm does not have an authorized level, it will be blocked and not allowed to enter. If the interface is on a gateway that controls access to the internal network, then the worm will not be able to enter the network. Of course, each machine should also be self-protected. Another obvious advantage is the use of the disclosed invention, for example, in operational technology (OT). Operational technology refers to industrial and infrastructure computing, such as, but not limited to, robots controlling factories, shipping ports, power plants, water companies, air traffic control, railway control, etc. Any malware that enters a factory or critical infrastructure can cause huge economic losses, and in some cases even death. Security levels allow the shutdown of factory computer infrastructure by not allowing insecure, unauthorized code and data into the local network and individual machines. This is done by only allowing authorized levels on the machines. Malicious levels will require providing the factory with proof of the code and data vendor, as well as the vendor's correct security level. To achieve this, it is necessary to further penetrate the vendor's site and provide the required proof and level there. Those skilled in the art should understand that there is a potential assumption that certificate encryption and digital signatures are “strong” and “unbreakable.”

[0145] As a non-limiting example, when downloading a program from a reputable software vendor, a signing program is provided for client verification using, for example, the software vendor's public key. If the downloaded program passes an integrity check, it can be assumed to be genuine and free of malware. Typically, the provided code format includes code segments and data segments. What's missing in the packaged format for accessing the code and data segments using the proposed protection scheme is the security level and security matrix for each segment. Code levels can be non-hierarchical, meaning they can be called or jumped to by any code; restricted code cannot be called; and only non-hierarchical data can be processed. Code levels can be specified, restricting which code levels can call the code; enabling code to call (some) restricted levels; and enabling code to process (some) restricted data. In one embodiment, in the case of entry / worker functions and security enclaves, there exists a mapping (security matrix) of which code segments can read / write / call which data / code segments. Therefore, for the code packaged format, readable logical names are added to each code / data section, the security level of each code / data section, and three security matrices.

[0146] Accordingly, in one embodiment, the downloaded content first passes through a TEE so that the TEE can classify the memory pages where the content is placed. Therefore, in such an embodiment, it must be ensured that the downloaded program first passes through the TEE. When the client opens a connection, it notifies the TEE and attempts to open a connection to the TEE port in the destination server. Two scenarios can be considered. In the first scenario, the destination is the download webpage of the company that publishes / sells / stores the program. In the second scenario, the destination server is an IT repository for approved applications.

[0147] According to various disclosed embodiments, the platform will open a connection to the TEE (Trusted Equipment) of the publisher's website. That is, according to one embodiment, each device participating in the protection mechanism discussed herein uses a TEE. The content sent from there to the TEE is generally downloadable, possibly encapsulated in another format, with the following additional information: 1) the security level of each code segment and each data segment; and 2) a code-code, code-data, data-data matrix indication (for program levels): a) whether one code level can call another code level; b) whether one code level can process a data level, and the resulting data level; and c) whether two data levels can be mixed, and if so, the level of the result. In one embodiment, the levels are unique GUIDs, so they do not conflict with the levels of another program. The same (partial) GUIDs can be used for all downloads, or they can be generated in other ways (e.g., by the software vendor). According to one embodiment, receiving (downloading) the TEE verifies: 1) that the code can access non-confidential code and data or download level code and data; 2) that the downloaded data can be mixed with non-classified data or download level data. That is, in such an embodiment, the downloaded program cannot claim access rights to a GUID that it does not own.

[0148] According to various embodiments, the receiving TEE creates a mapping from (source, GUID) to an internal GUID. This serves three purposes. First, by attaching the source to the GUID, two sources cannot have the same GUID (the probability is very small but greater than 0). Second, each machine represents the same code and data differently, so it is impossible to know the corresponding level on another machine or guess the level on a machine. Third, the source machine can still send updates to various modules without sending the complete package. The format of the downloaded software defines specific segment types of code and data. Those skilled in the art will appropriately understand that additional segment types (code and / or data) can be added to the format because, according to various disclosed embodiments, code / data with different levels cannot be in the same segment. The TEE adds levels and matrices (conventional rules) to its repository. When a page is written to memory, the memory block is mapped to the corresponding security level. When a block is read, the memory block is marked with its respective security level, and the TEE must add the security level and its rules to the security matrix. In one embodiment, to save mapping space, the TEE can map a 128-bit GUID to an 8 / 16 / 24-bit number. This is essentially a "private" unique ID with a security level within the machine.

[0149] The download process described in this article involves the protection of the code and data of individual programs. For example, an organization might want to allow only specific PDF viewer programs to be used on confidential documents. After software is downloaded to the information technology (IT) repository, other nodes in the organization can access the repository to download IT-approved software. Therefore, the organization's IT can manage for each program which data levels it can handle, which program levels it can invoke, and which program levels can invoke it. Using the application and partial names, IT can add permissions to programs: which data levels it can handle; which program levels it can invoke; and which program levels can invoke it. The TEE translates the logical names into program GUIDs. Therefore, IT does not know or assign GUIDs; they are generated by the TEE on the repository server. Consider a scenario where IT introduces a new tool. The new tool comes with a GUID different from all other IT GUIDs. The tool is downloaded by a user, and the TEE on the user's machine discovers a conflict between the machine's GUID and the IT GUID. Before installing the new tool, the receiving TEE must change the non-IT GUID. Therefore, this may include: a) stopping the program or application that has the GUID if it is running; b) changing the mapping (publisher, GUID) -> machine GUID to the new machine GUID; c) changing the mapping of storage blocks from the old machine GUID to the new machine GUID; d) installing new IT tools.

[0150] In this embodiment, the security level of enterprise data is common to all machines. GUIDs are used for private data in code and applications / programs. In one embodiment, a program downloaded from the repository, i.e., a program signed with the enterprise private key, can claim access rights to a level it does not possess. One issue that could arise is the ability of an attacker to know the GUID of certain secure code sections, download malware with the same GUID, and gain access to secure data within the secure code. However, according to various disclosed embodiments, this is not possible due to several precautions: 1) Non-IT GUIDs are different on each machine, so malware would need to know the GUID on a specific machine; 2) GUIDs are sent to a TEE, from where they can only be accessed by the TEE or the hardware element that needs to know them, so they are not exposed to software running on the CPU; and 3) Only code downloaded from the IT repository can claim access rights to a level it does not possess, meaning malware would need to infiltrate the IT repository and know the IT GUID.

[0151] Figure 19 An example block diagram 1900 is shown for reducing overhead when using GUID 1910 according to one embodiment. The downloaded GUID 1910 is 128 bits. As described above, the receiving machine can map the 128-bit GUID to 16-32 bits 1920 to limit the overhead of mapping storage blocks to security levels. A 16-bit ID can represent 64K levels. A 12-bit ID can represent 4K levels. There may never be more than 4K active levels on the client machine, i.e., the code and data levels of programs in memory (programs that have been completely swapped out of main memory are not included). Therefore, to limit the overhead of security matrices and control lines and registers required to track levels, when a program starts, its level can be mapped from "Storage" mapping 1920 to "Active" mapping 1930. The program level overhead reduction process according to one embodiment is as follows:

[0152] 1. The storage controller should maintain a copy of the mapping from storage tiers to active tiers. When it reads a storage tier that it does not have a mapping for, it should send that storage tier to the TEE.

[0153] 2. The TEE has a mapping from GUID energy levels to storage levels and an association with levels belonging to the same program. Therefore, the TEE should publish the activity level for all storage levels of the program and send the mapping and the required encryption key to the storage controller.

[0154] 3. Once the storage controller has a new mapping, the storage block should be written to memory along with the active level, and the memory controller should maintain the reference count of the level in memory.

[0155] 4. When the reference count reaches "0" or increments from "0", the memory controller should notify the TEE. Therefore, the TEE should maintain a binary flag for each activity level indicating whether its reference count is "0" or greater than "0". Depending on the level, the TEE should maintain a flag indicating whether the program's reference count is "0" or greater than "0".

[0156] 5. As the program's reference count increases from 0, the TEE will read the program's security matrix and add it to the activity matrix for all SoC locations.

[0157] 6. Locations (CPU cache, CPU pipeline, memory controller, etc.) should store new rules in their secure cache or secure memory.

[0158] 7. When the reference count of all levels of a program reaches 0, the TEE notifies the storage controller to delete their mappings, and these levels can be reused.

[0159] 8. When the reference count of a program reaches 0, the TEE should remove its security matrix rule from the SoC.

[0160] 9. If a newly started program does not have enough idle activity levels, the TEE will send an interrupt to the OS, which means that the program should be swapped out.

[0161] 10. When the operating system uses its swap-out heuristic, it should acknowledge the TEE.

[0162] 11. The TEE should monitor the program's reference count until it can reclaim the program's priority level. The TEE will continue to request swapping out until there are enough free active priority levels available for the new program. It then sends the new program's mapping to the storage controller.

[0163] Those skilled in the art will understand that processes can create other processes and can create threads. When threads and processes are created, their initial security context may be the security context of the stream that created them. It has been determined that threads, as well as processes and subroutines, face the challenge of (re)creating their respective security contexts when created or switched. When they are switched, it may also be necessary to recreate security register levels, arithmetic flags, and security context levels. Thread creation is typically accomplished by the operating system via system calls. In x86 architectures, system calls can be identified via the sysenter command, or in... In this case, interrupt 80 is invoked. Upon recognizing the system call, the CPU can save the stream security level in a special register accessible only to the CPU. Another method involves special instructions specifically designed for thread creation, detailed below. Thread switching is handled by the operating system, and only the operating system knows which thread is being restored. Therefore, the challenge for the CPU is knowing the thread context to be restored. Thus, according to one embodiment, for thread creation and context switching, the OS scheduler should invoke dedicated CPU instructions, implemented and owned by the CPU (not an external vendor, such as the OS vendor), and run within a CPU-owned security enclave.

[0164] A special case of a thread is an interrupt. When an interrupt is first loaded, it begins with a non-confidential security level, just like any program at startup. If the interrupt is interrupted, or switched out for any reason, it is handled according to the disclosed embodiment, just like any other thread that is switched out and then returned.

[0165] Now refer to the example Figure 20 This illustrates a hash table 2000 of thread contexts according to an embodiment. CPU contexts (PC, registers and their security levels, arithmetic flags, security context) are managed by hardware. The operating system has specific instructions for creating, deleting, saving, and restoring contexts, using the thread ID as a parameter.

[0166] When a thread is created, such as thread 1 2010, the operating system issues a "create thread" instruction with the thread ID. The CPU retrieves the context structure from hash table 2000, where the hash key is the thread ID. For example, 2010 is initialized to a default value, excluding the thread ID and security context. To switch into or out of the context, the operating system issues the relevant instruction with the thread ID (e.g., thread 1 2010) as a parameter. The CPU hashes the ID to calculate the address of the thread's data structure and performs the switch-in / switching. Similarly, this is also performed to delete the context. The code execution used by the operating system for context switching and scheduling is protected by code security level writes.

[0167] It's important to note that in store / restore contexts, the security level of the store / restore registers may also be required. Up to this point, the data level affects the level of the page to which the data value is written. This is not the case with store / restore. The security level must be read and stored along with the data value, and then written to the security level field corresponding to the register to which the data is restored. Store / restore is the only instance where the CPU can read and write the security level field of the data register. This functionality is enabled and protected by the security level of the store / restore code. The data pages of the store / restore code have a constant security level that is unaffected by registers (managed by the security matrix). The security level of the store / restore code should be referred to as the context level.

[0168] In one embodiment, to prevent attackers from spoofing the context level and altering the security levels of data registers and the security context, the context level is owned by the CPU, not the OS, and is loaded prior to the OS boot process (as part of the hardware boot process, as discussed further herein) with signature verification. The address range of the enclave code and the entry points for the context functions are provided to the OS in registers that are read-only for all levels except the context level. The context level should have a fixed level ID that is not allowed to be used by other levels. Enclave data pages can be requested by the enclave from the OS and are sliced ​​in and out based on virtual memory heuristics. In one embodiment, to prevent malware from switching slices, the context level can only read pages with a context level ID. Enclave data pages can be requested by the enclave from the OS and are sliced ​​in and out based on virtual memory heuristics.

[0169] Figure 21 This is an example data structure 2100 for a thread context (call stack) using a Last-In-First-Out (LIFO) list according to one embodiment. For a thread, store and restore instructions are defined during swap-in and swap-out. The same approach can be used for store / restore functions during function / subroutine calls. This moves the return address, register data, and security data (register security level, security flags, and security context) to a CPU-owned security enclave and removes the return address and register data from the user stack. This is how the security context is stored / restored during a subroutine call (…). Figure 3 (340) is required.

[0170] By including a program counter, control flow hijacking due to stack overflow (overwriting the return address) can be prevented. By writing register data and corresponding security levels, it prevents the security level of all registers from being set to the maximum level, which could happen if they were all written to regular memory pages (i.e., the user stack) as per existing technology. In one embodiment, the storage and recovery of context is done using a CPU context enclave. Memory pages of data share the same context security level. Only code with the context level can read from and write to memory using that context level. When context-level code requests a new memory page, it receives the context level on the first write to the page. When a context-level page is freed, it is shredded and reassigned to an unclassified level. These threads remain in hash table 2000, with the thread ID as the key. Using a Last-In-First-Out (LIFO) command, each thread structure stores the thread ID and pointers to the first context 2110-1 and the last context 2110-n, where "n" is an integer equal to or greater than "1". In one embodiment, the context is a fixed structure in an array, so the pointers are indices.

[0171] In one embodiment, the context array has a "free" array, which is a linked list of free, unused structures within the context array. This is an exemplary and non-limiting example of a free array 2200 according to one embodiment. Figure 22 As shown, the free array 2200 corresponds to the context array that lists the free, unused structures in the context array. Figure 22 (Not shown in the diagram). The free list is also arranged as a LIFO structure 2220. The last inserted element points to the previous element (which points to the previous element), up to the first inserted element, which has a NULL reverse pointer. In this example, the context 9 of list 2240 is the last input 2230, 2230 points to 6 in list 2240, 6 points to 4 in LIFO 2220, and 4 points to 10 in LIFO 2220, which is the first context 2210. When the context array is full, the code can request new memory pages. Cases where the function does not return to the caller but to multiple call levels can be handled according to principles known in the art.

[0172] Now for reference Figure 23 The diagram illustrates an example block diagram of a system 2300 for secure computing using hardware security hierarchies according to one embodiment. The system includes one or more processing elements (PEs) 2310, such as 2310-1 to 2310-i, where "i" is an integer "1" or greater. PEs 2310 can be, but are not limited to, processors, controllers, accelerators, compute data paths, combinational logic, direct memory access (DMA) controllers, and any combination thereof.

[0173] At least one PE 2310 is protected according to the principles described herein, namely, utilizing a security matrix to identify security levels and allowing the determination of data-data, code-code, or code-data interactions, as well as the determination of security outcomes arising from such interactions disclosed herein. System 2300 also includes one or more storage controllers (SCs) 2320, such as 2320-1 to 2320-j, where 'j' is an integer '1' or greater. SC 2320 may operate as disclosed herein, for example, but not as a limitation, regarding… Figure 6 and 7 Operate in the manner described.

[0174] PEs 2310 and SCs 2320 are connected via an interconnect 2330, which can be a bus, such as, but not limited to, a host bus, system bus, input / output bus, industry standard bus (ISA) and extended ISA (EISA), peripheral component interconnect (PCI), small computer system interface (SCSI), universal system bus (USB), or local area network (LAN), wide area network (WAN), virtual private network (VPN), storage area network (SAN), and other wired or wireless buses, and any combination thereof. Depending on the requirements, the interconnect 2330 may allow data and code to flow between PEs 2310, between SCs 2320, and between PEs 2310 and SCs 2320.

[0175] In exemplary embodiments, without departing from the scope of this disclosure, some systems may have a combination in which one or more (but not all) of the plurality of PEs 2310 are not protected by a hardware security level. Similarly, without departing from the scope of the invention, some systems may have a combination in which one or more (but not all) of the plurality of SCs 2320 are not protected by a hardware security level. That is, at least one PE 2320 and at least one SC 2320 in system 2300 will be protected using a hardware security level in accordance with the principles disclosed herein. Those skilled in the art will understand that system 2300 may also include external memory, such as DDR, without departing from the scope of this disclosure.

[0176] Therefore, according to various disclosed embodiments, all pages and all blocks in the memory have security levels. In one embodiment, the initial value of the security level is set to a non-level value, such as "0". Three matrices define the interactions between security levels: a) data-data; b) code-data; and c) code-code. In one embodiment, a value of "-1" indicates incompatibility and no interaction; for data-data, the element (x, y) represents the resulting level when mixing level "x" and class "y"; for code-data, the element (x, y) indicates whether code 'x' can read / write data 'y', note that in one embodiment, read and write operations may have separate matrices; for code-code, the element (x, y) indicates whether code level 'x' can read / write / call code level 'y'; last but not least, incompatibility causes instructions to fail to execute and generates hardware exceptions. The security level of the operation result is determined by the security level of the operands, the security context, and the security level of the instruction.

[0177] Furthermore, the memory page hierarchy is managed by the memory controller. When reading data / code from memory: the controller receives the address and security level of the read data instruction. Since the memory controller does not distinguish whether a memory page contains code or data, all read and write operations can be referenced as data. The controller verifies whether the code level of the read instruction allows access to the page's data level. The controller then sets the data and its security level on the interconnect. When writing code / data to memory: the controller receives the data, its security level, and the security level of the write data instruction. The controller verifies whether the instruction allows the page's security level. The controller then updates the page's security level based on its current level, the write data level, and the security matrix. To process read or write operations more quickly, the mapping can be cached by the memory controller.

[0178] According to one embodiment, a "shred page" command is added to the Instruction Set Architecture (ISA). It is issued by the operating system when a page is freed and executed by the memory controller. This command overwrites secure data. Cache entries from pages should be shredded or invalidated. In one embodiment, when data / code moves across the interconnect (e.g., Interconnect 2330), it always moves with its security level. The security level extends the cache tag. The security level moves up and down the cache hierarchy with the data / code, up into the CPU, and up into the interconnect. Any snooping / coherence mechanism that reads data from the cache must also read the security level. Each data register in the CPU register file is extended to hold the security level of the data stored in the register.

[0179] According to one embodiment, each execution has a flow safety level. The flow safety level begins with a non-hierarchical level or the flow safety level of the spawning thread. When an arithmetic computation is complete, the safety level of the result is added to the arithmetic flag as the new safety flag. The flow safety level is updated each time there is a conditional branch or jump to a computation address. The update is based on the current flow safety level, the arithmetic safety flag, and the safety level of the address. When jumping to a subroutine, the flow safety level is safely stored by the CPU. It is restored upon return. When a thread / process is switched out, its flow safety level is safely stored. It is restored when it is switched in. The flow safety level tracks data in on-chip buffers, memory, and queues. Buffers / memory can be divided into multiple sub-parts to allow storage of data from different levels, such as cache lines and modes.

[0180] When the PE 2310 is used as an accelerator, the security level of the accelerator output can be determined by the security level of the input and the configuration, which can be implemented through registers. If the accelerator only accepts new input after the current data has been processed, the security level can wait for the output. If the accelerator accepts new data after the current data has been processed at least one level, the output level must be transmitted along with the data. If the accelerator reads / writes to memory, the accelerator also receives the configuration command level to provide the level to the memory controller.

[0181] In one embodiment, all storage blocks are mapped to a security level. Each storage block is encrypted using a key determined by its security level. The level key mapping is written to the storage controller by the TEE. Only the controller can read the mapping. While the level key can be the same across all enterprise devices, in one embodiment, the level key is unique on each device. When a storage block is released (e.g., a file is deleted), the operating system should instruct the storage controller to release those blocks. The storage controller should set the level to unsecured. Shredding depends on the implementation method.

[0182] In one embodiment, the levels in storage range from 16 to 32-bit GUIDs. When reading from storage, these levels may be converted to 10 / 12 / 16-bit GUIDs to reduce execution overhead. If the storage controller cannot find a reduced GUID for the GUID to be read, it sends the unmapped GUID to the TEE. The TEE assigns reduced GUIDs to all GUIDs of the program and sends them to the storage controller along with the encryption key. If the program does not have enough reduced GUIDs, the TEE sends a GUID resource error to the operating system. Upon receiving a GUID resource error, the operating system should store the hibernating program in virtual memory to free up its reduced GUIDs. After completion, it will release their memory pages. The memory controller should maintain a reference count for each reduced GUID. When the reference count reaches 0, it sends the reduced GUID to the TEE.

[0183] Furthermore, according to one embodiment, each device possesses an enterprise identity. A device can request an enterprise token to prove its identity via a TEE (Trusted Enterprise Provider), indicating that the device is a member of an enterprise and possesses security capabilities. When inter-device communication is to be performed and a device opens a connection with another device, the network interface forwards the opened connection to the TEE. The TEE opens a secure connection to the same IP address and its TEE port. If the connection is open, the two TEEs exchange identity tokens to determine whether they are allies (members or allies of the same enterprise) or adversaries (without tokens, without certificates). Therefore, classified or unclassified data can be uploaded to or downloaded from a friend who provides a token; secure data can be downloaded from a friend who provides a certificate but not uploaded; and non-confidential data can only be uploaded / downloaded to / from an adversary.

[0184] Depending on the connection status (enemy, friend, one-way, security capability), the TEE configures its network interface based on the data types that can be sent to the other end of the connection. When secure packets are sent to an enemy / one-way connection, they are blocked by the interface. When secure packets are sent to a friend connection, they are forwarded to the TEE, which encapsulates the packet in a secure packet with a security level (encrypted and signed) and forwards it to the receiving machine's TEE port. When the network interface receives the packet from the TEE port, it forwards the packet to the TEE. When the TEE receives the secure packet, it unencapsulates it and writes the original packet (and security level) to the operating system buffer. Alternatively, the TEE can return the data and security level to the interface, which then writes the data.

[0185] In another embodiment, when the CPU requests a memory fetch, the hardware appends the instruction's security level to the address. If the memory content is in the cache, the cache verifies whether the code level has the authority to process the data at the address, or to jump to the code pointed to by the address. If the memory content is not in the cache, the request is forwarded to the memory controller, which performs the same verification. If the instruction is not allowed to process the data or jump to the code, a hardware exception is generated. Before writing to memory, the memory controller verifies that the instruction and data are compatible with the security level of the memory page. According to one embodiment, aggregation is a method that can be used whereby code can only jump from a specific code level (aggregate). All other code attempting to reach the code must go through the aggregation, which guarantees a jump to a legitimate entry point.

[0186] In one embodiment, a secure enclave is formed by providing code with a unique security level. Only code intended to invoke the enclave is compatible with the enclave's code. Only enclave code can read and write (i.e., be compatible with) enclave data. A secure enclave returning data to an application must have decryption capabilities to change the data's security level from the enclave security level to the output level. This is accomplished using a code-data security matrix according to various disclosed embodiments.

[0187] In addition, the security levels of applications, programs, and their code and data can be downloaded. This is done by encapsulating the downloaded format (e.g., PE format in the case of Windows) into a format that assigns a unique GUID to each code or data portion and provides data-data, code-data, and code-code matrices for interaction rules between levels. In one embodiment, the encapsulation is sent to the TEE of the receiving device. Rules downloaded from the publisher can only include the security level and non-confidential level of the downloaded program. After downloading, the TEE of the downloading machine generates a mapping to the internal GUID for each (vendor, GUID) tuple. Only programs downloaded from the enterprise IT repository can contain cross-program interaction rules. Programs downloaded from the IT repository already contain a matrix with internal GUIDs that will not be changed. If any IT GUID is already in use on the downloading machine (a very low probability), the downloading machine should change its assigned GUID that conflicts with the GUID downloaded from the IT repository.

[0188] In one embodiment, the ISA can add instructions to create / delete / switch out / switch in threads / processes. When switching threads / processes or jumping to a subroutine / function, the CPU context enclave should safely store registers, register security levels, arithmetic security flags, security context, and return address. When switching within a thread / process or returning from a function / subroutine, the CPU enclave restores the registers, register security levels, arithmetic security levels, security context, and jumps to the return address. The operating system process / thread scheduler and process / thread creator should be the only code allowed to call the context enclave. The CPU should call the enclave on JSR and RET instructions. The enclave should maintain a separate context stack / queue for each thread / process.

[0189] Now for reference Figure 24 This diagram illustrates an example communication diagram 2400 of a system operating according to an embodiment described herein. The communication involves a source interface 2410, a source TEE 2420, a destination interface 2430, a destination TEE 2440, and an authentication server 2450. Communication begins with a SYN request sent from the source interface 2410 to both the source TEE 2420 and the destination interface 2430. The source TEE 2420 sends another SYN request to the destination interface 2430. The SYN request is now sent from the destination interface 2430 to the destination TEE 2440, and a SYN response is then sent to the source TEE 2420. The source TEE 2420 responds to the destination TEE 2440 with an authentication request. The destination TEE 2440 sends an authentication token request to the authentication server 2450, which responds appropriately with the authentication token sent to the destination TEE 2440. The authentication token is then forwarded from the destination TEE 2440 to the source TEE 2430. Subsequently, non-confidential and confidential data can be sent between the source and destination. That is, non-confidential data from the source interface 2410 is routed to the destination interface 2430. In contrast, confidential data is sent to the source TEE 2420, and then signed, encrypted, and encapsulated before being sent to the destination TEE 2440, after which the data and its associated security level are returned to the destination interface 2430.

[0190] Now for reference Figure 25The diagram illustrates an example block diagram 2500 of offloading to an offloading engine 2520 according to one embodiment. The offloading engine 2520 may be an SoC that performs specific services to a main SoC 2510; such an offloading engine includes, but is not limited to, a modem, a graphics SoC, an AI SoC, etc. In one embodiment, such an offloading engine 2520 may: a) communicate only with the main SoC 2510, which forms a closed ecosystem and has its own memory; b) communicate with multiple SoCs in the system; or c) communicate with external devices (e.g., modems) via a network. In one embodiment, as the offloading engine 2520's fan-in / out increases (i.e., it communicates with multiple sources and destinations), and if a security system is required to continue protecting data, the offloading engine 2520 also implements the infrastructure and protocols disclosed herein. That is, the main CPU SoC 2510 communicates not only via data communication 2540 but also via security level 2530. A network SoC and a modem are required to implement protocols for TEE, dynamic whitelists, and identification of SYN and FIN messages.

[0191] In one embodiment, the offload engine 2520 has its own DDR memory and communicates with a single data source at a time (i.e., receiving data, processing data, and returning results). It does not require the implementation of a security infrastructure, and the data source can categorize the data it sends and reapply it upon receiving a result. In another embodiment, the offload engine 2520, communicating concurrently with multiple data sources, whether within the system (i.e., without networking) or over a network with the source and destination, implements a security infrastructure to be considered secure. For all offload engines 2520, it is assumed that the software used is loaded and verified during startup, and the memory location of the code is write-protected. This means that there is no dynamic loading of code and no code changes when the offload engine 2520 is started. SW updates may still occur, but the offload engine 2520 needs to be restarted to use the updated code. If the offload engine is located on the SoC, the requirements are the same as for off-chip offload engines.

[0192] Therefore, the disclosed embodiments allow for enhanced system protection of data, code-modified data, and code, as they flow within the system or are addressed at entry and / or exit points of the system interface. Thus, the solution proposed herein overcomes the need to place data, code-modified data, or code in specific locations to be protected at a desired level. Instead, a more efficient and robust security system is provided by offering security levels that track what is protected and update as interactions occur between elements with different security levels or their protections.

[0193] It should also be understood that, according to various disclosed embodiments, all code and data are assigned corresponding security levels. Interaction rules between security levels define permitted content and the resulting security level of this interaction. Therefore, any violation of these rules can be detected in real time, and the offending code can be further identified. In various embodiments, when confidential data is routed across a protected interface, if the destination is not identified as friendly, it is considered hostile, and such data is blocked from crossing its boundary by the interface. In the case where the destination is identified as friendly, a security level accompanies its respective data or code across the interface. Therefore, interfaces, including but not limited to network interfaces, retain the security level of data or code crossing them.

[0194] Therefore, according to one embodiment, a system for secure computing includes: an interconnect of the system; at least one processing element (PE) communicatively connected to the interconnect, the processing element being adapted to process a matrix defining the interaction between security levels of data and code processed by the processing element; and a storage controller (SC) communicatively connected to the interconnect, adapted to process data regarding read and write operations based at least on the security level associated with the data. In one embodiment, the PE is one of: an accelerator, a processor, a controller, combinational logic, a data path, and a direct memory access (DMA) controller.

[0195] In another embodiment, the security system includes: a plurality of first storage units adapted to contain security levels, wherein each piece of data in the system is assigned a security level to which it remains associated; a plurality of second storage units adapted to contain security levels, wherein each piece of code in the system is assigned a security level to which it remains associated; wherein when an attempt is made to interact between first data and second data of each piece of data in the system, the security levels of the first data and the second data are checked to determine whether the interaction is permitted, and if permitted, a first result security level is generated based on the security levels associated with the first data and the second data; wherein when an attempt is made to interact between first code and second code of each piece of data in the system, the security levels of the first data and the second data are checked to determine whether the interaction is permitted, and if permitted, a second result security level is generated based on the security levels associated with the first code and the second code; wherein when an attempt is made to interact between third code and third data of each code with each piece of data in the system, the security levels of the code and the data are checked to determine whether the interaction is permitted, and if permitted, a third result security level is generated based on the security levels associated with the third code and the second data; and wherein when it is determined that interaction is not permitted based on the corresponding security level, the attempted interaction is blocked.

[0196] In another embodiment, the memory controller is adapted to operate in conjunction with memory pages, each memory page being associated with a security level. Accordingly, when a read instruction arrives at the memory controller, the memory controller verifies that the security level of the instruction is sufficient to read the data or code being read from memory. Furthermore, if the security level of the instruction does not allow reading data or code, the data / code is not read, and an error is returned. Additionally, when code and / or data are read from memory, they are read onto the interconnect along with their respective security levels. Furthermore, when code or data is written to memory, the memory controller verifies that the security level of the data can be combined with the security level of the page and determines the resulting level. Furthermore, when code or data is written to memory, the memory controller verifies that the security level of the code attempting to be written can handle (i.e., write to) the security level of the page. Furthermore, if the security levels of the data and the page cannot be combined, an error is generated, and no data is written. Furthermore, if the security level of the instruction attempting to write cannot be written to a page with the security level of the target page, an error is generated, and no data is written.

[0197] According to one embodiment, when code is transmitted via, for example, the interconnect of a SoC, the code moves along with its corresponding security level. According to another embodiment, when data is transmitted via, for example, the interconnect of a SoC, the data moves along with its corresponding security level.

[0198] In another embodiment, the processing element is adapted to operate such that when code and / or data arrive at the buffer / cache, they are stored along with their respective security levels. Therefore, when the processing element reads an instruction from the buffer / cache, the instruction is read along with its security level. Similarly, when the processing element reads data from the cache, the data is read along with its security level. Furthermore, during instruction execution, the processing element verifies that the data security levels of operands can be merged into the same instruction and result level. Additionally, during instruction execution, if there is only one operand, the processing element verifies that the security level of the instruction can handle the result security level or data level of the merged data. Furthermore, if the security levels of operands cannot be merged into the same instruction, an exception is generated, and the instruction is aborted. Furthermore, if the security level of the instruction does not allow the processing of data or the merging of data security levels, an exception is generated, and the instruction is aborted. Furthermore, when the result of an instruction is written to a register, it is written along with its respective security level. Furthermore, when the result of an instruction is written to the buffer / cache, it is written along with its respective security level. Furthermore, if the security level of the written data cannot be merged with the security level of the cache line, an exception is generated, and the write is aborted. Furthermore, at each context change or subroutine jump initiated by a processing element, the Trusted Execution Environment (TEE) stores all context registers and their security levels in secure memory. Therefore, when the context is reloaded or when returning from a subroutine jump, the TEE reloads the context and security levels.

[0199] In another embodiment, the network interface is adapted to operate such that when a machine opens a connection to another target machine, the network interface of the initiating machine requests mutual authentication from the network interface of the target machine. Subsequently, when both machines satisfy the condition that the other machine belongs to the same organization, a request for authentication of the security level of data and / or code is made to determine that the other machine is authorized to store and / or process data. Therefore, when the initiating machine attempts to send data to the target machine, the network interface verifies the security level at which the target machine is authorized to process / store the data. If the target machine is authorized, the data and its respective security level are sent; otherwise, the network interface generates an error and prevents the data from leaving the initiating machine. Furthermore, when the initiating machine attempts to read data from the target machine, the network interface on the target machine verifies whether the initiating machine is authorized to receive the data. If authorized, the data and its respective security level are sent. Otherwise, the network interface generates an error and prevents the data from leaving the initiating machine. Additionally, when code and / or data enter the machine, the network interface verifies whether the machine is authorized to accept the code and / or data. If authorized, the code and / or data are allowed to enter the machine. Otherwise, the network interface generates an error, and the code and / or data are blocked. In one embodiment, security actions on the network interface can also be forwarded to a secure TEE.

[0200] In yet another embodiment, the storage controller is adapted to operate such that when code and / or data arrive at the storage device, the code and / or data arrive along with their respective security levels. Furthermore, when code and / or data are written to a block on the storage device, they are encrypted with a key mapped to the security level of the content being written, and the security level of the content is mapped to the block. Furthermore, when code and / or data are read from a block on the storage device, they are decrypted using a key mapped to the security level of the storage block content. Additionally, when data and / or code are read from the storage device, the data and / or code are accompanied by their respective security levels.

[0201] In another embodiment, when the software is packaged, each part of the code or data is associated with a security level. Furthermore, when the software arrives at the machine, a secure TEE in the receiving machine opens the package and associates each part of the code or data with the corresponding security level attached to it.

[0202] It should be noted that various disclosed embodiments including methods or processes can be implemented by processing circuitry and memory containing instructions that configure the processing circuitry to perform the process or method when executed by the processing circuitry. Similarly, hardware components configured to execute code can be implemented as a combination of processing circuitry and memory containing instructions including code.

[0203] The various embodiments disclosed herein can be implemented as hardware, firmware, software, or any combination thereof. Furthermore, the software is preferably implemented as an application tangibly embodied in a program storage unit or computer-readable medium, which comprises components, or combinations of devices and / or devices. The application can be uploaded to and executed by a machine including any suitable architecture. Preferably, the machine is implemented on a computer platform having hardware such as one or more central processing units (“CPUs”), memory, and input / output interfaces. The computer platform may also include an operating system and microinstruction code. The various processes and functions described herein may be part of the microinstruction code or part of an application, or any combination thereof, which can be executed by the CPU, whether or not such a computer or processor is explicitly shown. Furthermore, various other peripheral units may be connected to the computer platform, such as additional data storage units and printing units. Additionally, a non-transitory computer-readable medium is any computer-readable medium other than a transient propagation signal.

[0204] All examples and conditional language cited herein are intended for educational purposes to aid the reader in understanding the principles of the disclosed embodiments and the concepts contributed by the inventors to further advance the art, and should be construed as not being limited to these specifically cited examples and conditions. Furthermore, all statements herein describing the principles, aspects, and embodiments of the disclosed embodiments and their specific examples are intended to cover their structural and functional equivalents. Moreover, such equivalents are intended to include both currently known equivalents and those developed in the future, i.e., any element developed that performs the same function regardless of its structure.

[0205] It should be understood that any reference to elements in this document using names such as "first," "second," etc., generally does not restrict the number or order of these elements. Rather, these names are generally used herein as a convenient way to distinguish two or more elements or instances of elements. Therefore, references to the first and second elements do not imply that only two elements can be used there or that the first element must somehow precede the second element. Furthermore, unless otherwise stated, a group of elements includes one or more elements.

[0206] As used herein, the phrase “at least one” followed by a list of items means that any one of the listed items can be used alone, or any combination of two or more of the listed items can be used. For example, if a system is described as including “at least one of A, B, and C”, then the system can include A alone; B alone; C alone; 2 A's; 2 B's; 2 C's; 3 A's; combinations of A and B; combinations of B and C; combinations of A and C; combinations of A, B, and C; combinations of 2 A's and C; combinations of A, 3 B's, and 2 C's; and so on.

Claims

1. A system for secure computing, comprising: A processor, the processor including circuitry; and The memory is arranged into multiple memory blocks; Each of the memory blocks stores content therein; The content referred to herein is data or code; The code includes instructions for execution by the processor; Each memory block is associated with a security level among multiple security levels, which is assigned to the security level of the content stored in the memory block; The associated security level of each memory block moves together with the associated contents of the memory block in the system. The processor applies at least one matrix; Wherein, the at least one matrix defines the interaction between the security levels of the contents in the plurality of memory blocks when the contents in the plurality of memory blocks are processed by the processor; and The security levels include data levels, which are security levels for data, and code levels, which are security levels for processor instructions, and wherein the at least one matrix defines: i) memory blocks, wherein data levels associated with the memory blocks can be mixed in operation, and the result of each mixture is determined; ii) whether code in a memory block associated with a code level can process a memory block associated with a particular data level, and when the processing occurs, the resulting level of the memory page produced by the processing is determined; and iii) whether a memory block associated with one code level can call a memory block associated with another code level.

2. The system according to claim 1, further comprising: An interconnect communicatively connected to the processor, wherein the interconnect transmits content accompanied by its respective security level.

3. The system according to claim 1, wherein, The at least one matrix defines, for each memory block's content, the permitted operations for that content based on the associated security level of the memory block.

4. The system according to claim 1, further comprising: A memory controller communicatively connected to the processor applies a security level associated with data for read and write operations on memory blocks where the content is data; and the memory controller also applies a security level associated with code for code execution on memory blocks where the content is code.

5. The system of claim 1, wherein the processor is any of the following: an accelerator, a central processing unit (CPU), a controller, combinational logic, a computational data path, and a direct memory access (DMA) controller.

6. The system according to claim 1, wherein, The interaction is an interaction between a first part of the content and a second part of the content, each of the first part and the second part of the content having its own security level, and the interaction is determined by the at least one matrix.

7. The system according to claim 4, wherein, The memory controller is also configured to, when a read data instruction is received, determine whether a data read operation is permitted to be performed based on the following items: the security level of the code containing the read data instruction, the security level of the data to be read from the memory, the security level of the memory block from which the data is read, and the interaction defined in the at least one matrix.

8. The system according to claim 7, wherein, The memory controller is also configured to read the data in the memory block and the security level of the data when it is determined that the read operation is permitted to be performed.

9. The system according to claim 6, wherein, The processor is also configured to determine incompatibility between the respective security levels of the first portion of the content being processed by the processor and the second portion of the content.

10. The system according to claim 9, wherein, The processor is also adapted to generate an exception notification when the incompatibility between security levels is determined.

11. The system according to claim 9, wherein, The processor is also adapted to prevent the execution of an action when the incompatibility between security levels is determined.

12. The system according to claim 4, wherein, The memory controller is further configured to, upon receiving a write data instruction, determine whether a write operation on the received data is permitted based on the following: the security level of the code containing the write data instruction, the security level of the data to be written to the memory, the security level of the memory block to which the data is written, and the interaction defined in the at least one matrix.

13. The system according to claim 12, wherein, The memory controller is also configured to write the received data and the security level of the received data into the memory block when it is determined that the write operation is allowed to be performed.

14. The system according to claim 13, wherein, The system is also configured to generate an exception notification when it is determined that the write operation is not allowed to be performed.

15. The system according to claim 13, wherein, The system is also configured to discard the write instruction when it is determined that the write operation is not allowed to be performed.

16. The system according to claim 8, wherein, The system is also configured to generate an exception notification when it is determined that the read operation is not allowed to be performed.

17. The system according to claim 8, wherein, The system is also configured to discard a read instruction when it is determined that the read operation is not allowed to be performed.

Citation Information

Patent Citations

  • DE21850A

  • Secure privilege level execution and access protection

    CN105431858A

  • System and method for supporting secure objects using a memory access control monitor

    US20200218799A1