Data integrity checking apparatus and method for granular protection data

By storing granular protection data in vulnerable memory regions and using memory encryption and lightweight data integrity checks, the vulnerability of granular protection information is addressed, achieving higher security and finer-grained physical address space control, while reducing the performance and circuit cost of integrity checks.

CN115461728BActive Publication Date: 2026-11-20ARM LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202180031684.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-04-14
Filing Date
2021-04-09
Publication Date
2026-11-20
Estimated Expiration
2041-04-09

AI Technical Summary

Technical Problem

In existing technologies, granular protection information is vulnerable to attacks in systems with multiple physical address spaces, leading to security loss. Furthermore, conventional integrity checking techniques impose a significant burden on performance and cost.

Method used

A data integrity check method for particle protection information is adopted. By storing particle protection data in vulnerable memory areas and using memory encryption and lightweight data integrity check techniques, the integrity of particle protection information is ensured. This includes the design of particle protection entry loading circuit, filtering circuit, and integrity check circuit.

Benefits of technology

It improves system security and flexibility, reduces the performance and circuit area cost of integrity checks, and enables finer-grained control over the physical address space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115461728B_ABST
    Figure CN115461728B_ABST
Patent Text Reader

Abstract

An address translation circuit 16 translates a target virtual address (VA) specified by a memory access request to a target physical address (PA) associated with a selected PAS from among a plurality of physical address spaces (PASs). A granule protection data block is loaded from memory, the granule protection data block including at least one granule protection entry (GPE), each GPE corresponding to a respective PA granule and specifying granule protection information (GPI) indicating which of the PASs is an allowed PAS. A filter circuit 20 determines whether the memory access request should be allowed to access the target PA based on whether the selected PAS is indicated by the GPI in the target granule protection entry (GPE) as an allowed PAS. An integrity check circuit 23 performs a data integrity check on the granule protection data block loaded from memory and signals a fault when the data integrity check fails.
Need to check novelty before this filing date? Find Prior Art

Description

Background Technology

[0001] This technology relates to the field of data processing.

[0002] The data processing system may have address translation circuitry to translate the virtual address of a memory access request into the physical address corresponding to the location to be accessed in the memory system.

[0003] At least some examples provide an apparatus comprising: an address translation circuit for translating a target virtual address specified by a memory access request into a target physical address associated with a selected physical address space chosen from a plurality of physical address spaces; a granular protection entry loading circuit for loading a granular protection data block from memory, the granular protection data block including at least one granular protection entry, each granular protection entry corresponding to a corresponding physical address granule and specifying granular protection information indicating which of the plurality of physical address spaces is a permitted physical address space from which access to the physical address granule is allowed; a filtering circuit for determining whether access to the target physical address should be allowed by the memory access request based on whether the selected physical address space is indicated as a permitted physical address space in the target granular protection entry corresponding to the target physical address granule including the target physical address; and an integrity check circuit for performing a data integrity check on the granular protection data block loaded from memory and signaling a fault if the data integrity check fails.

[0004] At least some examples provide a data processing method comprising: translating a target virtual address specified by a memory access request into a target physical address associated with a selected physical address space chosen from a plurality of physical address spaces; loading a granular protection data block from memory, the granular protection data block including at least one granular protection entry, each granular protection entry corresponding to a corresponding physical address granule and specifying granular protection information indicating which of the plurality of physical address spaces is a permitted physical address space from which access to the physical address granule is allowed; performing a data integrity check on the granular protection data block loaded from memory, and signaling a fault notification if the data integrity check fails; and determining whether the memory access request should be allowed to access the target physical address based on whether the selected physical address space is indicated as a permitted physical address space by the granular protection information in the target granular protection entry corresponding to the target physical address granule including the target physical address.

[0005] At least some examples provide a computer program including instructions that, when executed on a host data processing device, control the host data processing device to provide an instruction execution environment for executing target code; the computer program includes: address translation program logic for translating a target virtual address specified by a memory access request into a target emulated physical address associated with a selected emulated physical address space chosen from a plurality of emulated physical address spaces; and granular protection entry loading program logic for loading a granular protection data block from memory, the granular protection data block including at least one granular protection entry, each granular protection entry corresponding to a corresponding emulated physical address granularity. The system includes: a particle protection information indicating which of a plurality of simulated physical address spaces is a permitted simulated physical address space from which access to the simulated physical address particle is allowed; filtering logic for determining whether a memory access request should be allowed to access the target simulated physical address based on whether the selected simulated physical address space is indicated as a permitted simulated physical address space in the target particle protection entry corresponding to the target simulated physical address particle including the target simulated physical address by the particle protection information; and an integrity check circuit for performing a data integrity check on the particle-protected data block loaded from memory and signaling a fault if the data integrity check fails.

[0006] At least some examples provide a computer-readable storage medium that stores the aforementioned computer program. This computer-readable storage medium can be a non-transitory storage medium or a transient storage medium. Attached Figure Description

[0007] Further aspects, features, and advantages of this technology will become apparent from the following description, which is taken in conjunction with the accompanying drawings, in which: Figure 1 An example of a data processing device is shown; Figure 2 Multiple domains in which the processing circuitry can operate are shown; Figure 3 An example of a processing system that supports particle protection lookup is shown; Figure 4 This schematically illustrates multiple physical address spaces as aliases on the system physical address space that identify locations within the memory system; Figure 5 An example is shown of partitioning the effective hardware physical address space so that different architecture physical address spaces have access to the corresponding portions of the system physical address space; Figure 6 This is a flowchart illustrating a method for determining the current operating domain of a processing circuit; Figure 7 An example of the page table entry format used to translate virtual addresses into physical addresses is shown; Figure 8 This is a flowchart illustrating a method for selecting the physical address space to be accessed based on a given memory access request; Figure 9 and Figure 10 Two examples of particle protection data blocks that include multiple particle protection entries are shown; Figure 11 This is a flowchart illustrating how memory access requests are filtered based on particle protection information and data integrity checks targeting that particle protection information. Figure 12 The multiple stages of address translation and particle protection information filtering are illustrated; Figure 13 An example of a data processing system is shown; and Figure 14 An example of a simulator that can be used is shown. Detailed Implementation

[0008] The data processing system can support the use of virtual memory, providing address translation circuitry to translate the virtual address specified by a memory access request into a physical address associated with the location in the memory system to be accessed. The mapping between virtual and physical addresses can be defined in one or more page table structures. Page table entries within the page table structure can also define access permission information that controls whether a given software procedure executing on the processing circuitry is allowed to access a specific virtual address.

[0009] In some processing systems, address translation circuitry maps all virtual addresses to a single physical address space, which the memory system uses to identify locations in memory to be accessed. In such systems, control over whether a particular address is accessible to a specific software process is based solely on the page table structure used to provide the virtual-to-physical address translation mapping. However, this page table structure is typically defined by the operating system and / or hypervisor. If the operating system or hypervisor is compromised, this can introduce security vulnerabilities, allowing attackers to access sensitive information.

[0010] Therefore, for systems that require certain processes to be executed securely in isolation from other processes, such systems can support operations in multiple domains and multiple different physical address spaces. For at least some components of the memory system, even if physical addresses in corresponding physical address spaces actually correspond to the same location in memory, memory access requests whose virtual addresses are translated into physical addresses in different physical address spaces are treated as completely separate addresses accessing memory. By isolating accesses from different operational domains of the processing circuitry into corresponding different physical address spaces as perceived by some memory system components, this provides stronger security guarantees independent of page table permission information set by the operating system or hypervisor.

[0011] In systems where the virtual address of a memory access request can be mapped to a physical address in one of two or more different physical address spaces, granular protection information can be used to restrict which physical addresses can be accessed within a specific physical address space. This is useful for ensuring that certain physical memory locations implemented in on-chip or off-chip hardware can be restricted to access within a specific physical address space or a specific subset of physical address spaces when needed.

[0012] Granular protection information can be loaded from a table structure stored in memory, which provides multiple granular protection entries, each corresponding to a specific physical address granule. The granular protection information specifies, for the corresponding physical address granule, which physical address space is allowed to access the corresponding physical address granule. A granular protection entry for a given granule may specify that none of the physical address spaces are allowed, a single physical address space is allowed, or two or more physical address spaces are allowed. Filtering circuitry can use the granular protection information to check whether to allow the memory access request to proceed based on the target granular protection entry corresponding to the target physical address to be accessed. This lookup can be an additional lookup stage performed besides the check for any access permissions performed by address translation circuitry based on the page table structure.

[0013] Because granular protection information controls which physical address spaces can access a given set of physical addresses, corrupting or tampering with this information can lead to the complete loss of the security guarantees provided by separating the corresponding physical address spaces (e.g., if granular protection information is corrupted to indicate that physical addresses that should be reserved for access from one physical address space should instead be accessible from another, this could lead to the leakage of sensitive information). In typical systems involving the separation of multiple physical address spaces, the information controlling the partitioning between physical address spaces is already stored in relatively secure hardware storage protected against tampering by unauthorized attackers. For example, partitioning data could be stored in a set of on-chip registers not exposed to external access. As in such systems, the physical storage used for partitioning information can be designed to provide sufficient security guarantees; surprisingly, data integrity checks are required for this information.

[0014] However, the inventors recognized a growing need for a relatively large number of different software processes operating on the same system, each of which may wish to have a secure "sandbox" separate from access by other processes. The relationships between such software processes are becoming increasingly complex, making it impractical to define access permissions using registers or other on-chip memory alone for such models. To provide finer-grained control over access permissions, it may be desirable to define more complex tables of granular protection information at the granularity of individual physical address space particles, with each physical address particle defining the information. Physical address space particles (for the corresponding entries for which granular protection information is defined) can have a specific size, which may be the same as or different from the size of the page used by the page table structure for address translation circuitry. In some cases, the particle size can be larger than the page defining the address translation mapping for the address translation circuitry. Alternatively, granular protection information can be defined at the same page-level granularity as the address translation information within the page table structure. Defining granular protection information at the page-level granularity can be convenient because it allows for finer-grained control over which areas of the memory storage hardware are accessible from a specific physical address space and therefore from specific domains of operation of the processing circuitry. However, other particle sizes may also be used.

[0015] Using this model, defining granular protection information in a less vulnerable area of ​​the hardware storage device may no longer be practical, given the potential for a greater number of physical address spaces, a greater number of different access permission types, and / or more different physical address regions for which different access permissions need to be defined, because the hardware circuit area / power cost may be too high. Therefore, granular protection information can be alternatively stored in conventional memory that exposes some of it to external access, making it possible (intentionally or unintentionally by an attacker) to modify the granular protection information, potentially jeopardizing the security of processes that rely on it.

[0016] Using the method described below, the device has an integrity check circuit for performing a data integrity check on a granular protection data block loaded from memory by a granular protection entry loading circuit. If the data integrity check passes, the granular protection data block can be used to filter memory access requests by a filtering circuit. If the data integrity check fails, the integrity check circuit signals a fault. This allows for the detection of possible tampering or corruption of granular protection information while it is stored in a vulnerable portion of the memory, enabling the use of more complex forms of granular protection information, the size of which makes storing the entire information in a hardware-protected storage device impractical. Therefore, security can be improved, and the flexibility of use cases supported by granular protection information is increased.

[0017] The timing of data integrity checks can be variable. In some cases, granular protection data blocks can be loaded for each memory access. In this case, each non-GPT-related memory access (e.g., a regular memory access issued by processing circuitry, or a page table roaming memory access generated by address translation circuitry) can trigger a data integrity check on the corresponding granular protection data at the target address used to check whether access to the non-GPT-related memory access is permitted. However, if the filtering circuitry has access to a granular protection data cache used for caching granular protection data (this cache could be a separate cache dedicated to granular protection data, or it could be shared with the address translation data cache), performance can be faster. In this case, memory access requests that hit the granular protection data cache do not require loading the granular protection data from memory, and therefore do not require data integrity checks (it can be assumed that the cache is error-resistant, and therefore no additional integrity checks are needed), but requests that miss the cache can have data integrity checks performed when the requested granular protection data is returned from memory.

[0018] Known data integrity protection techniques are used to protect regular data stored in vulnerable memory (such as off-chip memory), but they have drawbacks in terms of processing performance, power consumption, and storage capacity, resulting in relatively high costs. While encryption of data stored in vulnerable areas of memory may be sufficient to ensure confidentiality, it does not prevent the possibility of data being (intentionally or unintentionally) corrupted while stored in vulnerable areas of memory, resulting in data being read back with a different value than the stored value. In systems requiring tamper protection, integrity metadata (e.g., hashes or authentication codes) can be derived from the stored data at write time and then compared with the corresponding metadata recalculated from the stored data at read time to determine if the data has been altered. However, maintaining such metadata for a reasonably sized protected address area may require a relatively large metadata structure that is too large to be stored in hardware-protected memory. Therefore, some of this metadata itself may need to be stored in vulnerable memory, requiring other integrity metadata to be derived and stored for later checks to determine if the metadata has been tampered with. This additional integrity metadata itself may require protection, and so on, allowing a tree structure to be maintained to track metadata at corresponding levels. This ultimately allows for the use of a root of trust small enough to be stored in tamper-resistant hardware-protected memory to verify all metadata (and the underlying protected data). Maintaining this metadata (e.g., a Merkle tree) can be costly in terms of both increasing required storage capacity and incurring performance costs, as each read / write of actual data to the memory region to be protected by the metadata tree requires several additional read / write operations solely for maintaining or checking multiple pieces of integrity metadata in the tree. In some implementations, only a relatively small portion of the data space requires integrity protection, making the performance cost of such integrity protection techniques seem reasonable, since most memory accesses to addresses outside the integrity-protected region will not require it.

[0019] However, if data integrity checks are applied to the granular protection information used for filtering whether memory access is permitted based on whether the selected physical address space is an allowed physical address space, this could mean a much larger number of memory accesses could be delayed due to the performance of data integrity checks (if the granular protection data is not yet available and therefore must be loaded from memory). This is because the need for data integrity checks would no longer be limited to accesses that read / write data in a relatively small portion of the physical address space (even if the granular protection data itself is stored in a relatively small integrity-protected portion of the physical address space, access to any portion of that physical address space could result in an access to that granular protection data). Therefore, this is another reason why it is counterintuitive for a technician to expect to store granular protection data in a vulnerable / tampered area of ​​memory or to expect that granular protection data blocks loaded from memory need to be data integrity checked before being used to filter memory access requests—one would think that the cost of implementing integrity protection would be too high for the amount of data potentially needed on each memory access.

[0020] However, the inventors recognized several points associated with particle protection data that could be used to achieve a lighter form of integrity checking for particle protection data compared to conventional integrity checking techniques.

[0021] The size of the granular protection information for a given granule can be smaller than the size of the data block requested from memory in a given transaction. Therefore, when a target granular protection entry needs to be loaded to serve a specific memory access request, the granular protection entry loading circuit can actually load a block of granular protection data containing multiple granular protection entries, each corresponding to a different physical address granule. Even if other granular protection entries are not currently needed, they may be required to handle other memory access requests in the near future, so caching these other granular protection entries can be useful. Since the integrity check circuit has the entire block of multiple available granular protection entries, it can perform data integrity checks on the block of granular protection entries as a whole.

[0022] Furthermore, when particle protection information is stored in a vulnerable area of ​​the memory, memory encryption circuitry can be provided. A protected area of ​​the memory can be defined as a region of the memory that would be vulnerable if not encrypted, and is designated for storing secure data protected from attack (not all data is sensitive, therefore the protected area does not necessarily need to encompass the entire address range of the vulnerable memory storage device). When data is written to a protected area of ​​the memory, the memory encryption circuitry encrypts the data specified in the write access request and provides the encrypted data to be stored in the protected area of ​​the memory. When data is read from a protected area of ​​the memory, the memory encryption circuitry decrypts the encrypted data read from the protected area and provides the decrypted data as a response to the corresponding read access request. Therefore, if particle protection data is stored in a protected area encrypted using memory encryption circuitry, when the particle protection entry loading circuit loads a particle protection data block from the protected area of ​​the memory, the memory encryption circuitry can decrypt the particle protection data block read from the protected area of ​​the memory before providing it to the filtering circuitry or integrity check circuitry.

[0023] Therefore, in systems where particle protection information is exposed to memory regions that may be vulnerable to tampering or corruption (e.g., off-chip memory), memory encryption can be used when the particle protection information is stored in that vulnerable memory region. If the encryption / decryption functions used to map between plaintext and ciphertext are designed with a "diffusion" property, where changing one bit in one of the plaintext / ciphertext alters a much larger number of bits in the other, they are likely to be more secure.

[0024] The memory encryption circuit can perform encryption / decryption based on certain cryptographic primitives that operate on a data block of a given size. The size of the data block operated on by the cryptographic primitives can be larger than the size of a single granular protection entry, allowing granular protection data blocks with multiple granular protection entries to be encrypted into a common data block by the memory encryption circuit.

[0025] Therefore, when a granular protected data block is stored in an encrypted protected memory area, the integrity of one granular protected entry within the same block is correlated with the integrity of another granular protected entry within the same block. This is because even changing just a single bit while the ciphertext is stored in memory can corrupt more than one granular protected entry in the block. Thus, if a target granular protected entry is loaded because it is not yet accessible to the filtering circuitry, and a data integrity check fails for one of the multiple granular protected entries in the granular protected data block (excluding the target granular protected entry), the integrity check circuitry can signal a fault even if the data integrity check for the target granular protected entry passes.

[0026] Therefore, by performing checks on blocks of multiple entries and signaling faults if any of the granular protection entries in the block fail the integrity check (even if the target granular protection entry required for filtering the current memory access request itself passes the check), this allows for the use of lighter-weight data integrity checks (which have a lower probability of detecting tampering in individual granular protection entries), since the probability of a data integrity check failing to detect corruption (false negative) in any granular protection entry within the block is likely to be extremely low, even if the probability of individual granular protection entries being false negatives is relatively high.

[0027] For example, a certain number of bits (e.g., N bits) of the particle protection entry can be used to encode particle protection information. Not all of these N bits... N The possible codes may need to indicate valid options for granular protection information. For example, the number of valid options required may not be an exact power of 2, so there may be some spare codes left. Moreover, the designers of the instruction set architecture may choose to leave some codes as spares to provide room for future architectural expansions if additional options need to be added later.

[0028] Therefore, N bits with multiple codes can be used to encode granular protection information. The first subset of these N bits represents valid codes indicating valid options for the granular protection information. The second subset of these N bits represents invalid codes that do not indicate any valid options for the granular protection information. In one example, a data integrity check may include checking for each granular protection entry in a granular protection data block whether that granular protection entry has one of the codes from the first subset or one of the codes from the second subset. If any granular protection entry in the granular protection data block has one of the codes from the second subset, a fault is signaled (even if the granular protection entry with the invalid code is not the target granular protection entry required for filtering the current memory access request).

[0029] It may seem surprising that simply checking whether the encoding of the particle protection information is valid would be sufficient to serve as a data integrity check. One would argue that this check would be inadequate because it cannot detect tampering that changes the particle protection information from a valid encoding to a different valid encoding.

[0030] However, as mentioned above, due to the use of encryption, if any granular protection entry in the loaded block has an invalid code, this can signal the risk that all other granular protection entries in the same cryptographic primitive block may also have been altered, due to the diffusion nature of the cryptographic function. Therefore, for an attacker capable of tampering with an encrypted block containing stored granular protection entries in a manner that prevents data integrity checks from detecting the alteration, this would require modifying the ciphertext version of the stored data such that each granular protection entry happens to be modified to one of the valid codes in the first subset, and no granular protection entry is modified to one of the invalid codes in the second subset.

[0031] In many cases, the combination of the number of granular protection entries in a data block and the number of codes in the second subset's encoding is sufficient to make the probability that tampering results in one of the codes in the second subset being invalid among all granular protection entries acceptablely small. If this is not the case, the architecture designer can ensure this by either (i) increasing the number of granular protection entries in the data block, or (ii) providing one or more additional bits of redundant granular protection information to increase the number of invalid codes in the second subset. Therefore, another possible reason for invalid codes with granular protection information is simply to increase tamper protection. While the second option of adding redundant granular protection information bits that do not need to encode valid information may seem wasteful, it may still require fewer additional bits than those needed for storing authentication codes or other metadata fragments used for comparison with stored data, and avoids the performance overhead of multiple additional reads / writes for integrity metadata maintenance as described above.

[0032] Therefore, using this method, data integrity checks can be a simple check of whether an encoding is valid, requiring no additional read / write operations on stored metadata or any authentication code computation to derive the authentication code from the stored data. Data integrity checks can be implemented using a relatively simple (low-power and low-latency) set of logic gates to check whether the encoding of each granular protection entry is one of the valid encodings in a first subset. This significantly reduces the performance and circuit area costs of implementing integrity checks. If this data integrity check method is used, the software managing granular protection entries can ensure that when a granular protection entry is set for a granular object of interest, other granular protection entries in the same granular protection data block are set to valid encodings (even if the address granular objects corresponding to these granular protection entries are not currently in use).

[0033] It should be understood that, from an architectural perspective, the choice of which memory region should store granular protection information is made by the system designer implementing the particular processing system, and therefore not by the architectural feature defined by the instruction set architecture used to define the interaction between program code and processing hardware. Therefore, it is not necessary to store granular protection data in any particular location or provide memory encryption circuitry in any given processor system implementing an instruction set architecture. Hardware system designers (or the party operating the hardware system, such as server operators) can choose, for a specific implementation, whether to store granular protection information in an area of ​​on-chip memory that is protected from tampering by its hardware design (and therefore does not require encryption), or in an area of ​​memory that is potentially vulnerable to attack because it is outside a trust boundary (e.g., off-chip memory on different integrated circuits, making the memory interface between integrated circuits accessible to attackers), in which case memory encryption can be used.

[0034] Regardless of the approach, the architecture of the granular protection entry loading circuit, filtering circuit, and integrity check circuit can be defined such that the circuit performs a data integrity check (by verifying the validity of the encoding, as described above) when loading the granular protection block from memory before using the granular protection information for filtered memory access. If the system designer has chosen to implement the granular protection information in hardware-protected memory that is not easily tampered with, the data integrity check may already be redundant, but it is in any case relatively lightweight, and therefore has no significant performance impact. However, if the system designer does choose to store the granular protection information in vulnerable memory, it is likely that the system designer will also provide memory encryption circuitry, and therefore, in this case, a data integrity check to verify the validity of the encoding of the granular protection information can help prevent the risk of an attacker altering the encrypted granular protection information while it is stored in vulnerable memory.

[0035] While data integrity checks that examine the valid encoding of granular protection information are particularly lightweight and efficient, in other examples, it may be preferable to implement a data integrity check that includes determining whether at least one integrity signature value associated with a granular protection data block matches at least one signature check value derived from the granular protection data block. For systems that only need to protect a relatively small physical address space with granular protection data, current integrity protection techniques may be feasible and offer a stronger probability of tamper detection than the valid encoding checks described above. Moreover, although currently expensive in terms of performance for protecting larger physical address spaces, this is expected to become more feasible in the future as integrity protection techniques themselves become more advanced, larger storage capacity for integrity metadata in hardware protection memory becomes feasible, and memory access becomes faster. Therefore, in other specific implementations, data integrity checks may be based on integrity signature values ​​stored associated with granular protection data blocks, which can be checked when reading the granular protection data block to see if they match a signature check value that includes a newly computed signature derived from the read granular protection data block using the same signature calculation function used to derive the integrity signature value when writing the granular protection data block. For example, a signature can be a hash or message authentication code calculated based on a secret key from a granular protected data block, and optionally a fresh value such as a counter or other value that changes whenever a block is written (this can prevent replay attacks based on the latest value that replaces the granular protected data block and an older value that was correct but is no longer correct).

[0036] In response to a memory access request, when no valid granular protection entry has been defined for the target physical address granularity, or when the filtering circuit determines, based on the target granular protection entry, that the memory access request is not permitted to access the target physical address, the filtering circuit may signal a fault associated with a different fault type or a different fault syndrome information than the fault signaled by the integrity check circuit when the data integrity check fails. Therefore, whether by a different fault type (e.g., a different fault identifier) ​​or by logging information in the syndrome register to indicate the cause of the fault, the exception handler handling the fault may be able to identify from the fault type or syndrome information which caused the fault: (i) data integrity for the granular protection information is lost, which, if the granular protection information is not yet corrupted, does not necessarily mean that the memory access request should have been rejected, or (ii) the memory access request was rejected because the granular protection information is invalid or because the granular protection information indicates that the selected physical address space sought by the memory access request is not a permitted physical address. This allows the handler to take different response actions.

[0037] The filtering circuitry may include requester-side filtering circuitry to determine, based on granular protection information in the target granular protection entry, whether to allow the memory access request to be passed to the cache or to the interconnect used to communicate with the completer device serving the memory access request. Compared to performing filtering of memory access requests based on granular protection information on the completer side (after the memory access request has already passed through the interconnect to the completer device, such as a memory controller or a peripheral controller serving the memory access request), performing granular protection lookup on the requester side of the interconnect offers the advantage of allowing finer-grained control over which physical addresses can be accessed from a given physical address space, compared to what would have been done on the completer side. This is because the completer side typically has relatively limited access to the entire memory system. For example, a memory controller for a given memory cell may only access locations within that memory cell and may not access other regions of the address space. Providing finer-grained control may rely on a more complex granular protection information table that can be stored in the memory system, and accessing such a table from the requester side may be more practical, offering greater flexibility in issuing memory access requests to a wider subset of the memory system. Furthermore, performing particle protection lookups on the requester side helps enable the ability to dynamically update particle protection information at runtime, which might be impractical for completer-side filtering circuitry that can be restricted to accessing a relatively small amount of statically defined data defined at boot time. Another advantage of requester-side filtering circuitry is that it allows interconnects to assign different addresses within the same particle to different completer ports communicating with different completer devices (e.g., different DRAM (Dynamic Random Access Memory) cells). This can be effective for performance, but if the entire particle needs to be booted to the same completer cell, performing particle protection lookups on the completer side to verify whether memory access is permitted might be impractical. Therefore, performing particle protection lookups on the requester side, rather than the completer side, to distinguish whether a specific physical address can be accessed from the specific physical address space selected for a given memory access request may have many advantages.

[0038] Similarly, integrity check circuitry may include requester-side integrity check circuitry for performing data integrity checks on granular protected data blocks loaded from memory after receiving them from the interconnect. Where a memory protection engine, including memory encryption circuitry, is provided for applying encryption to data stored in protected areas of memory, the memory encryption circuitry is typically implemented within the memory system at the interface to the vulnerable memory storage device hardware. This is typically located on the completer side of the interconnect, rather than the requester side. In systems that provide the memory protection engine with the ability to apply integrity verification to general data stored in protected areas of memory (e.g., based on authentication codes or other integrity metadata), this is also typically managed by the memory protection engine on the completer side. In contrast, in some embodiments, the integrity check circuitry described above may be located on the requester side, for example, as part of a memory management unit or system memory management unit that includes filtering circuitry. In particular, in specific implementations of data integrity checks based on whether the particle protection information has one of the valid codes in a first subset or one of the invalid codes in a second subset, implementation on the requester side may be more efficient. This is because it might be a custom-type verification specific to the particle protection information, rather than a more general form of integrity verification applicable to other data. Therefore, by incorporating the integrity check logic into the requester-side system components, which also include filtering circuitry (and possibly address translation), system design is simplified, as the system components utilizing the particle protection information also include circuitry to ensure the integrity of that information before use. This avoids the need for system designers to consider data integrity verification when designing the completer-side components of the memory system.

[0039] Memory access requests can be issued by a requester circuit (e.g., a processing circuit) capable of operating in any of two or more operating domains.

[0040] The selected physical address space associated with memory access can be chosen in different ways. In some examples, the selected physical address space can be chosen (by address translation circuitry or by filtering circuitry) based at least on the current operating domain of the requester circuitry from which the memory access request was issued. The selection of the selected physical address space can also depend on physical address space selection information specified in at least one page table entry used to translate the target virtual address into a target physical address.

[0041] Address translation circuitry can restrict which physical address spaces are accessible based on the current domain. When a specific physical address space is accessible by the current domain, it means that the address translation circuitry can translate the virtual address specified for a memory access originating from the current domain into a physical address within that specific physical address space. This does not necessarily mean that the memory access will be allowed, because even if a specific memory access can translate its virtual address into a physical address within that specific physical address space, filtering circuitry can perform further checks based on granular protection information to determine whether access to that physical address within that specific physical address space is actually permitted. However, by restricting which subset of the physical address space the current domain can access, this can provide stronger security guarantees.

[0042] For example, processing circuitry can support processing within a root domain, which is responsible for managing switching between other domains in which the processing circuitry can operate. The root domain may have an associated root physical address space. By providing a dedicated root domain for controlling switching, this helps maintain security by limiting the extent to which code executing in one domain can trigger a switch to another. For example, the root domain can perform various security checks when a domain switch is requested. Therefore, processing circuitry can support processing that executes in one of at least three domains: the root domain and at least two other domains.

[0043] When a data integrity check fails against a granular protected data block, the integrity check circuitry can signal that the fault will be handled by the program code executing in the root domain. Therefore, any issues with data integrity loss can be managed by the root domain, which is responsible for separating the physical address space and the domain, and can be considered to have the highest level of security.

[0044] In some examples, the processing circuitry can support two additional domains besides the root domain. For example, these additional domains could include a secure domain associated with a secure physical address space and a less secure domain associated with a less secure physical address space. The less secure physical address space can be accessed from each of the less secure domain, the secure domain, and the root domain. The secure physical address space can be accessed from the secure domain and the root domain, but may not be accessible from the less secure domain. The root physical address space can be accessible from the root domain, but may be inaccessible from both the less secure and secure domains. Therefore, compared to using page tables as the sole security control mechanism, this allows code executing in the secure domain to have stronger security guarantees protecting its code or data from access by code operating in the less secure domain. For example, code requiring stronger security could execute in a secure domain managed by a trusted operating system, different from the insecure operating system operating in the less secure domain. An example of a system supporting such secure and less secure domains could be based on Arm, supported by the University of Cambridge, UK. ® TrustZone provided by Limited® The system handles architectural features and operations. In the traditional TrustZone... ® In practice, the monitoring code used to manage the switching between secure and less secure domains uses the same secure physical address space as the secure domain. In contrast, providing a root domain for managing switching between other domains and allocating a dedicated root physical address space for the root domain helps improve security and simplify system development.

[0045] However, in other examples, "other domains" can include additional domains, such as at least three other domains besides the root domain. These domains can include the secure and less secure domains discussed above, but can also include at least one additional domain associated with a different physical address space. A less secure physical address space can also be accessed from the other domains, which in turn can be accessed from the other domains and the root domain, but not from the less secure domains. Therefore, similar to secure domains, additional domains can be considered more secure than less secure domains, and allow for further partitioning of code into corresponding domains associated with different physical address spaces to restrict their interaction.

[0046] In some examples, the domains can have a hierarchical structure such that when the system ascends from a less secure domain through a secure domain and other domains to the root domain, they are associated with an increased level of privilege, where the other domains are considered more privileged than the secure domain and therefore have access to the secure physical address space.

[0047] However, the growing need to provide secure computing environments for software providers limits the need to trust other software providers associated with other software running on the same hardware platform. For example, there are numerous applications in areas such as mobile payments and banking, the implementation of anti-fraud or piracy mechanisms in computer games, security enhancements for operating system platforms, secure virtual machine hosting in cloud systems, and confidential computing, where the party providing the software code may be unwilling to trust the party providing the operating system or hypervisor (previously considered a trusted component). In systems supporting secure and less secure domains with corresponding physical address spaces, such as those based on the aforementioned TrustZone... ®In architectural systems, as the occupancy of secure components operating in secure domains increases, the set of software typically operating in a secure domain has grown to include multiple software fragments available from a varying number of software providers, including parties such as original equipment manufacturers (OEMs) assembling processing devices (such as mobile phones) from components including silicon integrated circuit chips supplied by a specific silicon provider, operating system vendors (OSVs) providing the operating systems running on the devices, and cloud platform operators (or cloud hosts) maintaining server farms that provide server space for hosting virtual machines on the cloud. Therefore, implementing domains in a strict order of increasing privileges can be problematic, as application providers offering application-level code that they wish to have provided a secure computing environment may not want to trust parties that traditionally provide software executing in secure domains (such as OSVs, OEMs, or cloud hosts). However, similarly, parties providing code operating in secure domains are unlikely to want to trust application providers offering code operating in higher-privileged domains that are granted access to data associated with lower-privileged domains. Therefore, it can be recognized that a strict hierarchy of domains with progressively increasing privileges may be inappropriate.

[0048] Therefore, in the more detailed examples below, the additional domain can be considered orthogonal to the security domain. While both the additional domain and the security domain can access the less secure physical address space, the physical address space associated with the additional domain cannot be accessed from the security domain, and the secure physical address space associated with the security domain cannot be accessed from the additional domain. The root domain can still access the physical address spaces associated with both the security domain and the additional domain.

[0049] Therefore, using this model, other domains (examples of which are the domains described in the following examples) and the security domain have no dependencies on each other and therefore do not need to trust each other. The security domain and other domains only need to trust the root domain, which is inherently trusted in managing entries into other domains.

[0050] While the following examples describe a single instance of an additional domain (domain domain), it should be understood that the principle of additional domains orthogonal to the security domain can be extended to provide multiple additional domains such that each of the security domain and at least two additional domains can access the less secure physical address space, cannot access the root physical address space, and cannot access the physical address spaces associated with each other.

[0051] The less secure physical address space is accessible from all domains supported by the processing circuitry. This is useful because it facilitates the sharing of data or program code between software executing in different domains. If a specific data or code item needs to be accessible in a different domain, it can be assigned to the less secure physical address space, thus allowing it to be accessed from any domain.

[0052] The memory system may include a Physical Alias ​​Point (PoPA), which is a point that maps (de-aliases) aliased physical addresses from different physical address spaces corresponding to the same memory system resource to a single physical address that uniquely identifies that memory system resource. The memory system may include at least one pre-PoPA memory system component provided upstream of the PoPA that treats the aliased physical addresses as corresponding to different memory system resources.

[0053] For example, at least one pre-PoPA memory system component may include a cache or translation back buffer that caches data, program code, or address translation information for alias physical addresses in separate entries, such that if requests to access the same memory system resource are made from different physical address spaces, these accesses will result in the allocation of separate cache or TLB entries. Furthermore, the pre-PoPA memory system component may include consistency control circuitry, such as consistency interconnects, snooping filters, or other mechanisms for maintaining consistency between cached information at various masters. The consistency control circuitry can assign separate consistency states to individual alias physical addresses in different physical address spaces. Therefore, to maintain consistency, alias physical addresses are treated as separate addresses, even if they actually correspond to the same underlying memory system resource. Although, superficially, tracking consistency separately for alias physical addresses may seem to cause a consistency penalty, this is not actually a problem because if processes operating in different domains do intend to share access to a particular memory system resource, they can access that resource using a less secure physical address space (or access that resource using one of the other physical address spaces using the restrictive sharing features described below). Another example of a pre-PoPA memory system component could be a memory protection engine, which is provided to protect data stored in off-chip memory from confidentiality loss and / or tampering. For example, such a memory protection engine could use different encryption keys to individually encrypt data associated with a specific memory system resource based on from which physical address space the resource is accessed, effectively treating aliased physical addresses as corresponding to different memory system resources (e.g., an encryption scheme that makes encryption address-dependent could be used, and the physical address space identifier could be considered as part of the address used for this purpose).

[0054] Regardless of the form of the pre-PoPA memory system components, it is useful for such PoPA memory system components to treat alias physical addresses as corresponding to different memory system resources, because this provides a hardware-enforced separation between accesses issued to different physical address spaces, so that information associated with one domain cannot leak to another domain through features such as cache timing side channels or side channels involving consistency changes triggered by consistency control circuitry.

[0055] In some implementations, different digital physical address values ​​for different physical address spaces can be used to represent aliased physical addresses in different physical address spaces. This approach may require a mapping table to determine at the PoPA which of the different physical address values ​​corresponds to the same memory system resource. However, the overhead of maintaining such a mapping table may be considered unnecessary, and therefore, in some implementations, it may be simpler if the aliased physical address includes the physical address represented by the same digital physical address value in each different physical address space. If this approach is adopted, at the physical alias point, it is sufficient to simply discard the physical address space identifier that identifies which physical address space is being accessed using memory access, and then provide the remaining physical address bits downstream as the de-aliased physical address.

[0056] Therefore, in addition to the pre-PoPA memory system component, the memory system may also include a PoPA memory system component configured to de-alias the plurality of aliased physical addresses to obtain de-aliased physical addresses to be provided to at least one downstream memory system component. The PoPA memory system component may be a device that accesses a mapping table to find the de-aliased address corresponding to the aliased address in a specific address space, as described above. However, the PoPA component may also simply be the location in the memory system where the physical address label associated with a given memory access is discarded, such that the physical address provided downstream uniquely identifies the corresponding memory system resource, regardless of which physical address space it is provided from. Alternatively, in some cases, the PoPA memory system component may still provide physical address space labels to at least one downstream memory system component (e.g., to implement completer-side filtering, as discussed further below), but the PoPA may mark a point within the memory system beyond which the downstream memory system component no longer treats the aliased physical address as a different memory system resource, but instead considers each of the aliased physical addresses to map to the same memory system resource. For example, if a downstream memory controller or hardware memory storage device of PoPA receives a physical address tag and physical address for a given memory access request, then if that physical address corresponds to the same physical address as a previously seen transaction, then any danger checks or performance improvements performed on transactions accessing the same physical address (such as merging accesses to the same address) can be applied, even if the transactions specify different physical address space tags. In contrast, for upstream memory system components of PoPA, if transactions accessing the same physical address specify the same physical address in different physical address spaces, then such danger checks or performance improvement steps performed on these transactions may not be invoked.

[0057] The above-described techniques can be implemented in a hardware device having hardware circuitry logic for implementing the aforementioned functions. Therefore, the processing circuitry and address translation circuitry can include hardware circuitry logic. However, in other examples, a computer program for controlling a host data processing device to provide an instruction execution environment for executing target code can be configured with processing program logic and address translation program logic, which perform functions equivalent to the aforementioned processing circuitry and address translation circuitry in software form. This is useful, for example, to enable target code written for a specific instruction set architecture to execute on a host computer that may not support that instruction set architecture. Therefore, simulation software can be used to emulate the functionality expected by an instruction set architecture not provided by the host computer, providing the target code with an instruction execution environment equivalent to that expected when executing the target code on a hardware device that actually supports that instruction set architecture. Therefore, address translation program logic, granular protection entry loading program logic, filtering program logic, and integrity check logic can be provided to simulate the functionality of the previously described address translation circuitry, granular protection entry loading circuitry, filtering circuitry, and integrity check circuitry. In methods that provide architecture emulation, the corresponding physical address spaces are simulated physical address spaces because they do not actually correspond to the physical address spaces recognized by the host computer's hardware components, but rather are addresses that will be mapped into the host's virtual address space. Providing such emulation is useful for a variety of purposes, such as enabling legacy code written for one instruction set architecture to execute on different platforms that support different instruction set architectures, or assisting software development for new versions of instruction set architectures when hardware devices supporting those new versions are not yet available (this allows software development for the new architecture to begin in parallel with the development of hardware devices supporting the new architecture).

[0058] Figure 1 An example of a data processing system 2 having at least one requester device 4 and at least one completer device 6 is schematically illustrated. Interconnection 8 provides communication between the requester device 4 and the completer device 6. The requester device is capable of issuing a memory access request for memory access to a specific addressable memory system location. The completer device 6 is the device responsible for servicing memory access requests directed to it. Although... Figure 1 Not shown, but some devices may be able to act as both requester and completer devices. Requester device 4 may include, for example, processing elements such as a central processing unit (CPU) or a graphics processing unit (GPU), or other host devices such as a bus master, network interface controller, display controller, etc. Completer devices may include memory controllers responsible for controlling access to corresponding memory storage units, peripheral controllers for controlling access to peripheral devices, etc. Figure 1An exemplary configuration of one of the requester devices 4 is shown in more detail, but it should be understood that other requester devices 4 may have similar configurations. Alternatively, other requester devices may have the same... Figure 1 The left side shows different configurations of the requester device 4.

[0059] The requester device 4 has processing circuitry 10 that performs data processing in response to instructions, referencing data stored in register 12. Register 12 may include general-purpose registers for storing operands and the results of processed instructions, and control registers for storing control data to configure how the processing circuitry performs processing. For example, the control data may include a current domain indicator 14 for selecting which operation domain is the current domain, and a current exception level indicator 15 for indicating which exception level is the current exception level that the processing circuitry 10 is operating at.

[0060] Processing circuitry 10 may issue a memory access request specifying a virtual address (VA) identifying the addressable location to be accessed and a domain identifier (domain ID or "security state") identifying the current domain. Address translation circuitry 16 (e.g., a memory management unit (MMU)) translates the virtual address into a physical address (PA) through one or more stages of address translation based on page table data defined in a page table structure stored in the memory system. Translation lookup buffer (TLB) 18 acts as a lookup cache to cache some information in the page table information, thus enabling faster access than if the page table information had to be retrieved from memory every time an address translation is needed. In this example, in addition to generating the physical address, address translation circuitry 16 selects one of several physical address spaces associated with the physical address and outputs a Physical Address Space (PAS) identifier identifying the selected physical address space. The selection of PAS will be discussed in more detail below.

[0061] PAS filter 20 acts as a requester-side filter circuit to check whether access to the physical address within the specified physical address space identified by the PAS identifier is permitted based on the translated physical address and the PAS identifier. This lookup is based on the particle protection information stored in the particle protection table structure stored within the memory system. Particle protection entry loading circuitry (also known as particle protection table loading or GPT loading circuitry) 21 loads a data block containing particle protection information from memory. The integrity of the loaded block of particle protection information is checked by integrity check circuitry 23, as discussed further below. Similar to the caching of page table data in TLB 18, particle protection information can be cached within particle protection information cache 22. Although particle protection information cache 22 is in Figure 1In the example shown, it is a separate structure from TLB 18, but in other examples, these types of lookup caches can be combined into a single lookup cache structure so that a single lookup of an entry in the combined structure provides both page table information and granular protection information. Granular protection information defines information that restricts access to the physical address space of a given physical address, and based on this lookup, PAS filter 20 determines whether to allow memory access requests to continue being issued to one or more caches 24 and / or interconnects 8. If the specified PAS access to the specified physical address is not permitted for the memory access request, PAS filter 20 blocks the transaction and may signal a fault.

[0062] Although Figure 1 An example of a system including multiple requester devices 4 is shown, but for Figure 1 The feature shown by a requester device on the left-hand side can also be included in systems where only one requester device exists (such as a single-core processor).

[0063] Although Figure 1 An example is shown where address translation circuit 16 performs the selection of a PAS for a given request. However, in other examples, address translation circuit 16 may output information for determining which PAS to select, along with the PA, to PAS filter 20, and PAS filter 20 may select the PAS and check whether access to the PA is permitted within the selected PAS.

[0064] The provision of PAS filter 20 helps support systems that can operate in multiple operational domains, each associated with its own isolated physical address space. This means that, for at least a portion of the memory system (e.g., for some cache or coherence implementation such as a snooping filter), even if addresses within these address spaces actually relate to the same physical location in the memory system, each individual physical address space is treated as a completely separate set of addresses that identify the individual memory system location. This can be useful for security purposes.

[0065] Figure 2 Examples of different operating states and domains in which the processing circuit 10 can operate are shown, as well as examples of the types of software that can be executed in different exception levels and domains (of course, it should be understood that the specific software installed on the system is selected by the parties managing the system and is therefore not a fundamental feature of the hardware architecture).

[0066] The processing circuitry 10 can operate at multiple different exception levels 80 (in this example, four exception levels labeled EL0, EL1, EL2, and EL3), where EL3 refers to the exception level with the highest privilege level, and EL0 refers to the exception level with the lowest privilege level. It should be understood that other architectures may choose the reverse numbering so that the exception level with the highest number can be considered to have the lowest privilege. In this example, the lowest privilege exception level EL0 is used for application-level code, the next highest privilege exception level EL1 is used for operating system-level code, the next highest privilege exception level EL2 is used for hypervisor-level code managing the switching between multiple virtualized operating systems, and the highest privilege exception level EL3 is used for monitoring code managing the switching between corresponding domains and the allocation of physical addresses to the physical address space, as described later.

[0067] When an exception occurs while the processing software is at a specific exception level, for some types of exceptions, an exception of a higher (higher privilege) level is generated, where the specific exception level to generate the exception is selected based on the attributes of the specific exception that occurred. However, in some cases, it is possible for other types of exceptions to be generated at the same exception level as the exception level associated with the code that was processed when the exception occurred. When an exception occurs, information characterizing the state of the processor at the time the exception occurred can be saved, including, for example, the current exception level at the time the exception occurred. Therefore, once an exception handler has been processed to handle the exception, processing can return to the previous processing, and the saved information can be used to identify the exception level to which the processing should return.

[0068] In addition to different exception levels, the processing circuitry supports multiple operating domains, including the root domain 82, the safe (S) domain 84, the less safe domain 86, and the domain 88. For ease of reference, the less safe domain will be described hereinafter as the “unsafe” (NS) domain, but it should be understood that this is not intended to imply any particular level of safety (or lack thereof). Rather, “unsafe” simply indicates that the unsafe domain is intended for code that is not as safe as code operating in a safe domain. The root domain 82 is selected when the processing circuitry 10 is at the highest exception level EL3. When the processing circuitry is at one of the other exception levels EL0 through EL2, the current domain is selected based on the current domain indicator 14, which indicates which of the other domains 84, 86, and 88 is active. For each of the other domains 84, 86, and 88, the processing circuitry can be at any exception level of EL0, EL1, or EL2.

[0069] At boot time, multiple fragments of boot code (e.g., BL1, BL2, OEM boot) may be executed, for example, within a higher privilege exception level EL3 or EL2. Boot code BL1 and BL2 may be associated with, for example, a root domain, and the OEM boot code may operate within a security domain. However, once the system is booted, during runtime, processing circuitry 10 can be considered to operate at one time in one of domains 82, 84, 86, and 88. Each of domains 82 through 88 is associated with its own associated physical address space (PAS), which achieves the isolation of data from different domains within at least a portion of the memory system. This will be described in more detail below.

[0070] Non-security domain 86 can be used for regular application-level processing and for operating system and hypervisor activities to manage such applications. Thus, within non-security domain 86, there can be application code 30 operating at EL0, operating system (OS) code 32 operating at EL1, and hypervisor code 34 operating at EL2.

[0071] Security domain 84 enables the isolation of certain on-chip security, media, or system services into a separate physical address space from the physical address space used for non-secure processing. Non-secure domain code cannot access resources associated with security domain 84, while secure domain code can access both secure and non-secure resources; in this sense, secure and non-secure domains are not equivalent. An example of a system supporting this partitioning of security domain 84 and non-secure domain 86 is based on Arm... ® TrustZone provided by Limited ® The system architecture includes a trusted application 36 at EL0, a trusted operating system 38 at EL1, and optionally a secure partition manager 40 at EL2. If secure partitioning is supported, the secure partition manager uses stage 2 page tables to support isolation between different trusted operating systems 38 running in the secure domain 84, in a manner similar to how the hypervisor 34 manages isolation between virtual machines or guest operating systems 32 running in the non-secure domain 86.

[0072] Extending this system to support security domain 84 has become common in recent years because it enables a single hardware processor to support isolated secure processing, thus avoiding the need to execute that processing on a separate hardware processor. However, with the increasing prevalence of security domains, many real-world systems with such security domains now support relatively complex hybrid service environments offered by a wide variety of different software vendors within the security domain. For example, code operating in security domain 84 may include different pieces of software provided by, among other things: silicon wafer providers that manufacture integrated circuits; original equipment manufacturers (OEMs) that assemble the integrated circuits provided by the silicon wafer providers into electronic devices such as mobile phones; operating system vendors (OSVs) that provide the operating system 32 for such devices; and / or cloud platform providers that manage cloud servers that support services for multiple different clients via the cloud.

[0073] However, there is a growing desire to provide secure computing environments for parties providing user-level code (which may typically be expected to execute as application 30 within a non-secure domain 86), environments that can be trusted not to leak information to other parties operating the code on the same physical platform. It may be desirable for such secure computing environments to be dynamically allocated at runtime and to be certified and provable, allowing users to verify adequate security guarantees on the physical platform before trusting the device to process potentially sensitive code or data. Users of such software may not want to trust a party providing a rich operating system 32 or hypervisor 34 that may typically operate in a non-secure domain 86 (or even if these providers are trusted, users may want to protect themselves from attackers who could compromise the operating system 32 or hypervisor 34). Furthermore, while a secure domain 84 can be used for such user-provided applications requiring secure processing, this can actually create problems for both users providing code that requires a secure computing environment and providers of existing code operating within a secure domain 84. For providers of existing code operating within security domain 84, adding arbitrary user-supplied code within the security domain would increase the attack surface of their code, which is likely undesirable. Therefore, it is strongly recommended that users not be allowed to add code to security domain 84. On the other hand, users providing code that requires a secure computing environment may be reluctant to trust that all providers of different fragments of code operating within security domain 84 have access to their data or code. If authentication or certification of code operating within a specific domain is required as a prerequisite for user-supplied code to perform its processing, it may be difficult to audit and authenticate all different fragments of code operating within security domain 84 provided by different software providers. This could limit opportunities for third parties to provide more secure services.

[0074] Therefore, as Figure 2As shown, an additional domain 88 (referred to as a domain domain) is provided, which can be used by code introduced by such users to provide a secure computing environment orthogonal to any secure computing environment associated with components operating in security domain 24. Within a domain domain, the software executed may include multiple domains, each of which can be isolated from other domains by a Domain Management Module (RMM) 46 operating at exception level EL2. The RMM 46 can control the isolation between corresponding domains 42, 44 executing domain domain 88, for example, by defining access permissions and address mappings in a page table structure, in a manner similar to how the hypervisor 34 manages the isolation between different components operating in non-security domain 86. In this example, the domains include an application-level domain 42 executing at EL0 and a packaged application / operating system domain 44 executing across exception levels EL0 and EL1. It should be understood that it is not necessary to support both EL0 and EL0 / EL1 type domains simultaneously, and multiple domains of the same type can be created by the RMM 46.

[0075] Similar to security domain 84, domain 88 has its own physical address space allocated to it. However, while domain 88 and security domain 84 can each access the non-secure PAS associated with non-secure domain 86, they cannot access each other's physical address spaces. In this sense, the domain is orthogonal to security domain 84. This means that the code executing in domain 88 and security domain 84 is independent of each other. The code in the domain only needs to trust the switching code between the hardware RMM 46 and the management domain operating in root domain 82, which makes proof and authentication more feasible. Proof enables a given piece of software to request verification that the code installed on the device matches certain expected characteristics. This can be achieved by checking whether the hash of the program code installed on the device matches an expected value signed by a trusted party using a cryptographic protocol. RMM 46 and monitoring code 29 can be verified, for example, by checking whether the hash of the software matches the expected value signed by a trusted party, such as a silicon supplier that manufactures the integrated circuits including processing system 2 or an architecture supplier that designs processor architectures that support domain-based memory access control. This allows the user-provided codes 42 and 44 to verify whether the integrity of the domain-based architecture can be trusted before performing any security or sensitive functions.

[0076] Thus, it can be seen that the code associated with domains 42 and 44 (which was previously executed in non-secure domain 86, as shown by the dashed lines indicating gaps in the non-secure domain where these processes were previously executed) can now be moved to the domain domain, where they can have stronger security guarantees because their data and code will not be accessed by other code operating in non-secure domain 86. However, the fact that domain domain 88 and secure domain 84 are orthogonal and therefore cannot see each other's physical address spaces means that the provider of the code in the domain domain does not need to trust the provider of the code in the secure domain, and vice versa. The code in the domain domain can simply trust the trusted firmware that provides the monitoring code 29 for root domain 82 and the RMM 46 provided by the silicon provider or the provider of the instruction set architecture supported by the processor (which may already be inherently needed to be trusted when the code executes on its device), so that a secure computing environment can be provided to users without further trust relationships with other operating system vendors, OEMs, or cloud hosts.

[0077] This can be used in a range of applications and use cases, including, for example, mobile wallets and payment applications, game anti-cheating and anti-piracy mechanisms, operating system platform security enhancements, secure virtual machine hosting, confidential computing, and gateway processing for networked or IoT devices. It should be understood that users can find many other applications with useful support for this domain.

[0078] To support security assurances provided to the domain, the processing system may support a proof reporting function, in which firmware images and configurations (e.g., monitoring code images and configurations or RMM code images and configurations) are measured at boot time or runtime, and domain content and configurations are measured at runtime, so that the domain owner can trace back the relevant proof reports to known implementations and certifications, thereby making a trust decision on whether to operate on the system.

[0079] like Figure 2As shown, a separate root domain 82 is provided for managing domain switching, and this root domain has its own isolated root physical address space. Even for systems with only non-secure domains 86 and secure domains 84 but no domain 88, the creation of the root domain and the isolation of its resources from the secure domains allows for a more robust implementation, but it can also be used in implementations that do not support domain 88. Root domain 82 can be implemented using monitoring software 29 provided (or certified) by the silicon provider or architect, and can be used to provide secure boot functionality, trusted boot measurement, on-chip system configuration, debug control, and management of firmware updates for firmware components provided by other parties (such as OEMs). Root domain code can be developed, certified, and deployed by the silicon provider or architect without relying on the final device. In contrast, secure domain 84 can be managed by the OEM to implement certain platform and security services. The management of non-secure domain 86 can be controlled by operating system 32 to provide operating system services, while domain 88 allows for the development of new forms of trusted execution environments that can be dedicated to user or third-party applications while being isolated from the existing security software environment in secure domain 84.

[0080] Figure 3 Another example of a processing system 2 used to support these technologies is schematically shown. (Using the same reference numerals, it is shown alongside...) Figure 1 The same components. Figure 3 The address translation circuit 16 is shown in more detail, comprising a Stage 1 memory management unit 50 and a Stage 2 memory management unit 52. The Stage 1 MMU 50 is responsible for translating virtual addresses into physical addresses (when triggered by EL2 or EL3 code) or into intermediate addresses (when triggered by EL0 or EL1 code in a certain operating state, requiring further Stage 2 translation by the Stage 2 MMU 52). The Stage 2 MMU translates intermediate addresses into physical addresses. The Stage 1 MMU can be based on a page table controlled by the operating system for translations initiated from EL0 or EL1, a page table controlled by the hypervisor for translations from EL2, or a page table controlled by the monitoring code 29 for translations from EL3. Conversely, the Stage 2 MMU 52 can be based on a page table structure defined by the hypervisor 34, RMM 46, or security partition manager 14, depending on which domain is used. Dividing these translations into two phases in this way allows the operating system to manage address translation for itself and applications (assuming they are the only operating system running on the system), while RMM 46, Hypervisor 34, or SPM40 can manage isolation between different operating systems running in the same domain.

[0081] like Figure 3As shown, the address translation process using address translation circuit 16 returns a security attribute 54, which, combined with the current exception level 15 and the current domain 14 (or security state), allows access to a specific physical address space (identified by the PAS identifier or "PAS TAG") in response to a given memory access request. The physical address and PAS identifier can be looked up in the particle protection table 56, which provides the previously described particle protection information. In this example, PAS filter 20 is shown as a particle-based memory protection unit (GMPU) that verifies whether the physical address of the selected PAS access request is allowed; if so, the transaction is allowed to proceed to any cache 24 or interconnect 8 that is part of the system architecture of the memory system.

[0082] The GMPU 20 allows memory to be allocated to separate address spaces while providing strong hardware-based isolation guarantees and offering spatial and temporal flexibility as well as efficient sharing schemes in terms of how physical memory is allocated to these address spaces. As previously described, execution units in the system are logically partitioned into virtual execution states (domains or "worlds"), with one execution state (root world) located at the highest exception level (EL3), which is called the "root world" and manages the allocation of physical memory to these worlds.

[0083] A single system physical address space is virtualized into multiple "logical" or "architectural" physical address spaces (PASs), each of which is an orthogonal address space with independent consistency properties. The system physical address is mapped to a single "logical" physical address space by extending the system physical address with a PAS label.

[0084] Allowing a subset of the logical-physical address space to be accessed in a given world. This is implemented by hardware filter 20, which can be attached to the output of memory management unit 16.

[0085] The world uses fields in the translation table descriptor of the page table used for address translation to define the security attributes (PAS tags) for that access. Hardware filter 20 has access rights to a table (granular protection table 56 or GPT) that defines granular protection information (GPI) for each page in the system's physical address space, which indicates the associated PAS tag and (optionally) other granular protection attributes.

[0086] Hardware filter 20 checks the world ID and security attributes against the particle's GPI and determines whether access can be granted, thereby forming a particle-shaped memory protection unit (GMPU).

[0087] For example, GPT 56 can reside in on-chip SRAM or off-chip DRAM. If stored off-chip, GPT 56 can be protected for integrity by an on-chip memory protection engine that uses encryption, integrity, and freshness mechanisms to maintain the security of GPT 56.

[0088] Positioning GMPU 20 on the requester side of the system (e.g., on the MMU output) instead of the completer side allows for page-level access permission allocation, while allowing interconnect 8 to continue hashing / stripping the page across multiple DRAM ports.

[0089] Transactions remain tagged with the PAS tag because they propagate throughout the system architecture 24,8 until they reach a location defined as a physical alias point 60. This allows filters to be positioned on the master side without compromising security guarantees compared to slave-side filtering. Because the transaction propagates throughout the system, the PAS tag can be used as a security-in-depth mechanism for address isolation: for example, a cache can add a PAS tag to an address label in the cache, preventing accesses to the same PA with an incorrect PAS tag from hitting the cache and thus improving resistance to side-channel attacks. The PAS tag can also be used as a context selector for a protection engine attached to the memory controller, which encrypts data before writing it to external DRAM.

[0090] A Physical Alias ​​Point (PoPA) is the location in the system where the PAS tag is stripped and the address is translated from a logical physical address back to a system physical address. The PoPA can be located on the system's completer side below the cache, where physical DRAM is accessed using the cryptographic context resolved via the PASTAG. Alternatively, it can be located above the cache to simplify system implementation at the cost of reduced security.

[0091] At any point in time, the world can request a page transition from one PAS to another. This request is made to monitoring code 29 at EL3, which checks the current state of the GPI. EL3 may allow only specific groups of transitions to occur (e.g., from a non-secure PAS to a secure PAS, but not from a domain PAS to a secure PAS). To provide a clean transition, the system supports a new instruction – “Data Cleanup and Invalidate to Physical Alias ​​Point” – which EL3 can submit before transitioning a page to a new PAS. This ensures that any residual state associated with the previous PAS is flushed from any cache upstream of PoPA 60 (closer to the requester side than PoPA 60).

[0092] Another feature achievable by attaching the GMPU 20 to the host side is efficient memory sharing between worlds. It might be desirable to grant shared access to a physical particle to a subset of N worlds, while preventing other worlds from accessing that physical particle. This can be achieved by adding "restricted sharing" semantics to the particle's protection information, while forcing it to use a specific PAS tag. As an example, the GPI could indicate that a physical particle can only be accessed by "Domain World" 88 and "Secure World" 84, while being tagged with the PAS tag of "Secure PAS" 84.

[0093] An example of the aforementioned characteristics is the ability to rapidly change the visibility properties of specific physical particles. Consider the case where each world is allocated a dedicated PAS that is only accessible to that world. For a specific particle, that world can request to make it visible to the insecure world at any point in time by changing its GPI from "exclusive" to "restricted sharing with the insecure world," without altering the PAS association. This increases the particle's visibility without requiring costly cache maintenance or data copying operations.

[0094] Figure 4 The concept of aliases on physical memory provided to the hardware by the corresponding physical address space is illustrated. As previously described, each of the domains 82, 84, 86, and 88 has its own corresponding physical address space 61.

[0095] At the point when the address translation circuit 16 generates the physical address, the physical address has a value within a certain range 62 supported by the system, which is the same regardless of which physical address space is selected. However, in addition to generating the physical address, the address translation circuit 16 can also select a specific physical address space (PAS) based on the current domain 14 and / or information in the page table entries used to derive the physical address. Alternatively, instead of the address translation circuit 16 performing the PAS selection, an address translation circuit (e.g., MMU) can output the physical address and information derived from the page table entries (PTE) for selecting the PAS, which the PAS filter or GMPU 20 can then use to select the PAS.

[0096] The selection of PAS for a given memory access request can be restricted according to the rules defined in the table below, based on the current domain that the processing circuit 10 is operating on when issuing the memory access request: For those domains where multiple physical address spaces are available, information from page table entries used to provide access to physical addresses is used to select among the available PAS options.

[0097] Thus, at the point in time when the PAS filter 20 outputs the memory access request to system architectures 24, 8 (assuming it passes any filtering checks), the memory access request is associated with the physical address (PA) and the selected physical address space (PAS).

[0098] From the perspective of memory system components (such as caches, interconnects, snooping filters, etc.) operating prior to the Physical Alias ​​Point (PoPA) 60, the corresponding physical address space 61 is viewed as a completely separate address range corresponding to different system locations within memory. This means that, from the perspective of the pre-PoPA memory system components, the address range identified by a memory access request is actually four times the size of the range 62 that can be output in address translation, because the PAS identifier is actually treated as an additional address bit next to the physical address itself, so that the same physical address PAx can be mapped to multiple alias physical addresses 63 in different physical address spaces 61 depending on which PAS is selected. These alias physical addresses 63 all actually correspond to the same memory system location implemented in the physical hardware, but the pre-PoPA memory system components treat the alias address 63 as a separate address. Thus, if any pre-PoPA cache or snooping filter exists to allocate entries for such addresses, the alias address 63 will be mapped to a different entry with separate cache hit / miss decisions and separate consistency management. This reduces the likelihood or effectiveness of an attacker using a cache or consistency side channel as a mechanism to probe operations in other domains.

[0099] The system may include more than one PoPA 60 (e.g., as discussed below). Figure 14 (As shown in the diagram). At each PoPA 60, the aliased physical address is shrunk to a single de-aliased address 65 in the system physical address space 64. The de-aliased address 65 is provided downstream of any subsequent PoPA component such that the system physical address space 64, which actually identifies the memory system location, is once again the same size as the range of physical addresses that can be output in the address translation performed on the requester side. For example, at PoPA 60, the PAS identifier can be stripped from these addresses, and for downstream components, these addresses can simply be identified using the physical address values ​​without specifying the PAS. Alternatively, for some cases where some completer-side filtering is expected for memory access requests, the PAS identifier may still be provided downstream of PoPA 60, but may not be interpreted as part of the address, such that the same physical address appearing in different physical address spaces 60 will be interpreted downstream of the PoPA as involving the same memory system location, but the supplied PAS identifier can still be used to perform any completer-side security checks.

[0100] Figure 5This illustrates how the granular protection table 56 can be used to divide the system physical address space 64 into blocks of access allocations within a specific architecture physical address space 61. The granular protection table (GPT) 56 defines which portions of the system physical address space 65 are allowed to be accessed from each architecture physical address space 61. For example, the GPT 56 may include multiple entries, each corresponding to a physical address granule of a certain size (e.g., 4K pages), and may be defined as the PAS allocated to that granule, which can be selected from non-secure domains, secure domains, domains, and root domains. By design, if a particular granule or group of granules is allocated to a PAS associated with one of these domains, it can only be accessed within the PAS associated with that domain and not within PASs of other domains. However, it should be noted that while granules allocated to secure PASs (for example) cannot be accessed from within the root PAS, the root domain 82 can access the physical address granule by specifying PAS selection information in its page table to ensure that the virtual address associated with a page in that region of physically addressed memory is translated into a physical address in the secure PAS (not the root PAS). Thus, the sharing of data across domains can be controlled at the point in time when a PAS is selected for a given memory access request (to the extent permitted by the accessibility / inaccessibility rules defined in the previously described table).

[0101] However, in some specific implementations, in addition to allowing access to physical address particles within the allocated PAS defined by the GPT, the GPT can also use other GPT attributes to mark certain regions of the address space as shared with another address space (e.g., an address space associated with a domain of lower or orthogonal privileges (which typically does not allow it to select an allocated PAS for access requests to that domain)). This facilitates temporary sharing of data without requiring changes to the allocated PAS of a given particle. For example, in Figure 5 In the GPT, region 70 of the domain PAS is defined as being allocated to the domain domain and therefore is normally inaccessible from the non-secure domain 86 because the non-secure domain 86 cannot select the domain PAS for its access requests. Since the non-secure domain 26 cannot access the domain PAS, non-secure code typically cannot see the data in region 70. However, if a domain temporarily wishes to share some data in its allocated region of memory with the non-secure domain, it can request the monitoring code 29 operating in the root domain 82 to update GPT 56 to indicate that region 70 will be shared with the non-secure domain 86, and this allows region 70 to also be accessed from the non-secure domain 86. Figure 5The non-secure PAS access shown on the left-hand side does not require changing which domain is the domain allocated to region 70. If a domain has designated a region of its address space to be shared with a non-secure domain, then although a memory access request originating from the non-secure domain targeting that region may initially specify a non-secure PAS, PAS filter 20 can remap the PAS identifier of the request to instead specify a domain PAS, so that downstream memory system components treat the request as always originating from the domain domain. This sharing can improve performance because the operations used to allocate different domains to specific memory regions can be more performance-intensive, involving a greater degree of cache / TLB invalidation and / or data zeroing in memory or data copying between memory regions (which can be undesirable if the sharing is expected to be only temporary).

[0102] Figure 6 This is a flowchart illustrating how the current operating domain is determined, which can be performed by processing circuitry 10 or by address translation circuitry 16 or PAS filter 20. At step 100, it is determined whether the current exception level 15 is EL3. If so, at step 102, the current domain is determined to be the root domain 82. If the current exception level is not EL3, at step 104, the current domain is determined to be one of the non-secure domain 86, secure domain 84, and neighborhood domain 88, as indicated by at least two domain indicator bits 14 in the processor's EL3 control register (since the root domain is indicated by the current exception level as EL3, it may not be necessary to have an encoding of the domain indicator bits 14 corresponding to the root domain; therefore, at least one encoding of the domain indicator bits can be reserved for other purposes). The EL3 control register can be written to when operating at EL3 and cannot be written to from other exception levels EL2-EL0.

[0103] Figure 7An example of a page table entry (PTE) format is shown that can be used for page table entries in a page table structure. These page table entries are used by address translation circuitry 16 to map virtual addresses to physical addresses, virtual addresses to intermediate addresses, or intermediate addresses to physical addresses (depending on whether the translation is performed in an operational state where a stage 2 translation is fully required, and whether the translation is a stage 1 translation or a stage 2 translation if a stage 2 translation is required). In general, a given page table structure can be defined as a multi-level table structure implemented as a page table tree, where the first level of the page table is identified based on a base address stored in the processor's translation table base address register, and an index for selecting a specific level 1 page table entry within the page table is derived from a subset of bits of the input address to which a translation lookup is performed (the input address can be a virtual address for stage 1 translation or an intermediate address for stage 2 translation). A level 1 page table entry can be a "table descriptor" 110 that provides a pointer 112 to the next level page table, from which further page table entries can be selected based on a further subset of bits of the input address. Finally, after one or more lookups at consecutive levels of the page table, block or page descriptors PTE 114, 116, and 118 can be identified, which provide an output address 120 corresponding to the input address. The output address can be an intermediate address (for a stage 1 transition performed while the operation is still in the state of performing a further stage 2 transition) or a physical address (for a stage 2 transition or a stage 1 transition when stage 2 is not required).

[0104] To support the different physical address spaces mentioned above, in addition to the next-level page table pointer 112 or output address 120 and any attributes 122 used to control access to the corresponding block of memory, the page table entry format also specifies some additional states for physical address space selection.

[0105] For page table descriptor 110, the PTE used by any domain other than the non-secure domain 86 includes a non-secure table indicator 124, which indicates whether the next-level page table will be accessed from the non-secure physical address space or from the physical address space of the current domain. This facilitates more efficient management of page tables. Typically, the page table structure used by the root domain, domain domain, or secure domain 24 may only need to define special page table entries for a portion of the virtual address space, and for other portions, the same page table entries used by the non-secure domain 26 can be used. Therefore, by providing the non-secure table indicator 124, this allows higher levels of the page table structure to provide dedicated domain / secure table descriptors, while at certain points in the page table tree, the root domain or secure domain can switch to using page table entries from the non-secure domain for portions of the address space that do not require higher security. Other page table descriptors in other parts of the page table tree can still be obtained from the associated physical address space associated with the root domain, domain domain, or secure domain.

[0106] On the other hand, block / page descriptors 114, 116, and 118 may include physical address space selection information 126 depending on which domain they are associated with. The insecure block / page descriptor 118 used in the insecure domain 86 does not include any PAS selection information because the insecure domain can only access insecure PASs. However, for other domains, block / page descriptors 114 and 116 include PAS selection information 126, which is used to select which PAS to translate the input address to. For the root domain 22, EL3 page table entries may have PAS selection information 126, which includes at least two bits to indicate the selected PAS to which the corresponding physical address will be translated when the PAS associated with any of the four domains 82, 84, 86, and 88 is associated. In contrast, for both the domain and security domains, the corresponding block / page descriptor 116 only needs to include one bit of PAS selection information 126, which selects between the domain PAS and non-security PAS for the domain domain, and between the security PAS and non-security PAS for the security domain. To improve circuit implementation efficiency and avoid increasing the size of page table entries, the block / page descriptor 116 can encode the PAS selection information 126 at the same location within the PTE for both the domain and security domains, regardless of whether the current domain is the domain or the security domain, so that the PAS selection bit 126 can be shared.

[0107] thereby, Figure 8 This is a flowchart illustrating a method for selecting the PAS based on the current domain and information 124, 126 from the block / page PTE for generating a physical address for a given memory access request. PAS selection can be performed by address translation circuit 16, or by a combination of address translation circuit 16 and PAS filter 20 if the address translation circuit forwards PAS selection information 126 to PAS filter 20.

[0108] exist Figure 8At step 130, processing circuit 10 issues a memory access request specifying a given virtual address (VA) as the target VA. At step 132, address translation circuit 16 searches its TLB 18 for any page table entries (or cached information derived from such page table entries). If any required page table information is unavailable, address translation circuit 16 initiates a page table roaming to memory to obtain the required PTE (potentially requiring a series of memory accesses to progressively traverse the corresponding levels of the page table structure, and / or potentially requiring multiple stages of address translation to obtain a mapping from VA to intermediate address (IPA) and then from IPA to PA). It should be noted that any memory access request issued by address translation circuit 16 during the page table roaming operation may itself undergo address translation and PAS filtering, so the request received at step 130 may be a memory access request issued to request a page table entry from memory. Once the relevant page table information has been identified, the virtual address is translated into a physical address (possibly via IPA in two stages). At step 134, address translation circuit 16 or PAS filter 20 uses Figure 6 The method shown determines which domain is the current domain.

[0109] If the current domain is a non-secure domain, then at step 136, the output PAS selected for the memory access request is a non-secure PAS.

[0110] If the current domain is a secure domain, then at step 138, an output PAS is selected based on PAS selection information 126, which provides the physical address and is included in the block / page descriptor PTE, wherein the output PAS will be selected as a secure PAS or a non-secure PAS.

[0111] If the current domain is a domain domain, then at step 140, an output PAS is selected based on PAS selection information 126 included in the block / page descriptor PTE from its derived physical address, and in this case, the output PAS is selected as a domain PAS or a non-secure PAS.

[0112] If the current domain is determined to be the root domain at step 134, then at step 142, the output PAS is selected based on the PAS selection information 126 from which the physical address is derived in the root block / page descriptor PTE 114. In this case, the output PAS is selected as any physical address space in the physical address space associated with the root domain, the domain, the security domain, and the non-security domain.

[0113] Figure 9An example of a particle protection data block 150 providing particle protection entries 152 corresponding to multiple physical address space particles is shown. In this example, the 64-bit particle protection data block 150 includes 16 particle protection entries (GPEs) 152, each particle protection entry providing 4 bits of particle protection information (GPI).

[0114] Within the 4-bit coding space provided for each GPE (offering 16 possible codes), a certain number of codes can be defined as valid codes to indicate valid options for particle protection information. For example, 7 of the 16 available codes can be assigned to encode the following valid items for particle protection information: • Access to the root PAS is allowed, while access to other PASs is prohibited; • Allow access to the secure PAS and deny access to other PASs; • Access to the domain PAS is permitted, while access to other PASs is prohibited; • Access to non-secure PASs is permitted, while access to other PASs is prohibited; • If the current exception level is EL3, access to any PAS is allowed, and if the current exception level is EL0, EL1, or EL2, access to any PAS is prohibited. • Allows access to any PAS; • Access to all PAS is prohibited (this encoding can also be used if GPE is invalid).

[0115] It should be understood that which particular 4-bit GPI encoding to use for each of these options is an arbitrary design choice by the instruction set architecture designer—any mapping from the corresponding encoding to the 4-bit value of the GPI field can be used.

[0116] It should also be understood that these are merely some options for possible valid fragments of granular protection information, and other options may be supported, or some of these options may be omitted for certain architecture-specific implementations. For example, if the “restricted sharing” semantics are implemented as described above, additional encoding can be assigned to indicate sharing—for example, the encoding could indicate permission to access the domain PAS and the non-secure PAS (indicating that the domain had previously requested permission from the root domain to share the granule with the non-secure PAS when the granule would typically be assigned to the domain PAS).

[0117] Generally, there may be some alternative invalid codes that are not used to indicate valid options for GPI. These alternative invalid codes may arise from any of the following: because the number of valid options is not an exact power of 2, or because the architect has left room for future expansion, or as an intentional design choice to increase the probability that data integrity loss can be detected based on analysis similar to the quantitative analysis provided below.

[0118] In the example above, 9 out of 16 available codes are invalid. This can be used to provide data integrity checks as described below.

[0119] For each GPE in the loaded block, a data integrity check determines whether the GPE has a valid GPI code or an invalid GPI code. If any GPE in the block has an invalid GPI code (even if it is not the GPE required to process the current memory access request), a data integrity failure is signaled. If all GPEs in the block have valid GPI codes, the data is assumed to be valid and trustworthy.

[0120] When a data block 150 providing multiple granular protection entries is loaded from a potentially vulnerable area of ​​memory, it can then be assumed that the granular protection data block has been encrypted before being written to that area of ​​memory. Encryption primitives for encryption / decryption can operate on a data block having a size corresponding to the granular protection data block 150. If an attacker causes a single bit flip state in the encrypted data in memory (DRAM) (e.g., by performing a Rowhammer-style attack), the diffusion nature of cryptographic functions typically used for memory encryption can mean that changing a single bit in the ciphertext stored in memory results in the decryption function outputting randomized plaintext when the modified encrypted data is later read back from memory. Therefore, it can be assumed that the decrypted data formed after the attacker has tampered with the ciphertext is a random bit string.

[0121] Therefore, considering that the decryption output can be effectively considered random if the attacker tampers with the ciphertext data stored in memory, the probability that all the plaintext GPEs obtained after the attacker's modification will eventually have valid GPI encoding is as follows (evaluated for a 64-bit GPT block containing 16 4-bit GPEs): Therefore, for the example above with 9 invalid codes, the probability that an attacker could circumvent the data integrity check by tampering with even a single bit of the data stored in memory is only 1 / 555074.

[0122] The probability will vary based on the number of invalid codes and GPEs in a data block loaded from memory in a transaction (and encrypted as a common operation on the entire block).

[0123] More generally, for each GPE with N bits of GPI, 2 N If X of the GPI codes are invalid, and each block has Y GPEs, the probability that random output will not produce any faults will be . Therefore, architects can choose N, X, and Y as needed to provide an acceptable level of risk. For example, if 1 / 555074 is considered too high a risk in the example above, this can be adjusted by providing an additional redundant bit per GPE to increase the number of invalid codes X, or by grouping a larger number Y GPEs together in each granular protected data block. For example, if instead of processing 16 GPEs, encryption and data integrity checks are applied to the entire 64-byte cache line including 128 4-bit GPEs, this would increase the probability of no failure from ((16-X) / 16)^16 to ((16-X) / 16)^128, so even if X is 2, and only 2 / 16 values ​​are invalid, the probability of no failure would be reduced to one in twenty-six million.

[0124] Clearly, the exact number of invalid codes and the number of GPEs in each data block is a design choice, but this demonstrates a principle: simply checking whether the encoding of each GPE in the loaded block is invalid is likely sufficient to implement data integrity. Therefore, as Figure 1 As shown, the PAS filter 20 may have a granular protection entry loading circuit (GPT loading circuit) 21 (which loads a granular protection data block 150 from memory when the GPE required for checking memory access to the target PA is not yet available in the granular protection information cache 22) and an integrity check circuit 23 for performing data integrity checks on the loaded granular protection data block 150. For example, the integrity check circuit 23 may include a set of Boolean logic gates for checking whether the value of each GPE in the loaded block is an invalid code, and triggering a signaling notification of a fault if any GPE in the GPE has an invalid code. This avoids the cost of calculating authentication codes and maintaining an integrity tree of metadata for integrity verification, which greatly improves performance.

[0125] In an example of an integrity scheme based on checking valid / invalid codes, the software managing the GPT table (executing in the root domain) might need to ensure that every GPE within a block has a valid code, not just the GPE corresponding to the currently used physical address granularity. This requirement might not be implemented by any circuitry in the hardware (it's possible that there's no need to check whether the GPE code is valid when writing GPT data to memory, since the root domain code is a trusted code operating at EL3 and proven using the proof mechanism described above, which can be trusted to set the GPT data appropriately).

[0126] Figure 10Alternative techniques for data integrity verification are illustrated. In this example, block 150 of GPE 152 is associated with signature 154, which is calculated when the block is written to memory by applying a hash function or other authentication code generation function to the content 152 of GPT data block 150. In this example, signature 154 is stored in memory alongside the GPE (so that the signature is loaded from memory when the block is read), but signature 154 could also be stored in a different storage location than the associated block of GPE 152. When the block of GPE is read from memory, after decrypting GPE 152 (and the signature (if it is stored as part of the same block)), a signature check value is calculated based on the read value of GPE 152 and compared with the previously stored integrity signature 154. If a mismatch is detected between the previously stored signature 154 and the signature check value, a fault is signaled to indicate a loss of data integrity. If signature 154 matches the signature check value, GPT data block 150 can be cached by filtering circuitry 20 or used for filtering memory access. Using this approach, if signature 154 is not stored in memory within a trust boundary (a boundary beyond which data can be considered vulnerable), additional integrity metadata may need to be stored to enable signature verification, preventing attackers from replacing GPE 152 and signature 154 with different GPE values ​​and different matching signatures. For example, a signature tree could be used to combine signature 154 for different GPT blocks 150, where each tree node protects the signatures within that node at a lower level until the signatures can eventually be traced back to the root of the tree, which could correspond to a signature stored within the trust boundary. In this case, there could be greater performance overhead when verifying the integrity of GPT block 150, as it might require performing a verification string traversing the tree to check that each intermediary signature in the intermediary signatures is valid before the integrity of the GPT block can be confirmed.

[0127] Figure 11 This is a flowchart illustrating the filtering of memory access requests by filter circuit 20. At step 170, a memory access request is received from address translation circuit 16 (assuming any permission checks performed by the address translation circuit have passed), a target PA is specified, and it is associated with a selected PAS. As described above, the selected PAS can be indicated by an explicit identifier provided by the address translation circuit, or by PAS selection information 126 read from page tables forwarded by address translation circuit 16. These page tables, along with an indication of the current domain of processing circuit 10, can be used to determine the selected PAS at filter circuit 20.

[0128] At step 172, the filter circuit 20 searches the particle protection information cache 22 to determine if the GPE required for the target PA is already accessible. If not, at step 174, the particle protection entry loading circuit 21 issues a load request to request a particle protection data block from memory that includes the target GPE, which corresponds to a PA particle including the target PA. If the GPT is a single-level linear index table, the address of the particle protection data block can be determined based on the GPT base address and the offset derived from the target PA. If the GPT is a multi-level structure similar to the page table structure used by the address translation circuit 16, the GPT base address and the target PA can be used to derive the address of a first-level GPT entry, which acts as a table descriptor providing a pointer to a higher-level particle protection table, and the particle protection data block can eventually be located in memory by traversing one or more higher-level particle protection tables. Any memory access request issued during GPT roaming does not itself require PAS checking because the filter circuit 20 (GMPU) can be trusted to issue the correct GPT memory access (in contrast to page table roaming accesses issued by the address translation circuit 16, which undergo PAS checking and may therefore result in a GPT lookup similar to a regular memory access request issued by the processing circuit).

[0129] If any block of particle protection information is stored in a protected area of ​​memory that is encrypted by the memory, then when reading this information from the memory, before providing decrypted data to the filter circuit 20, it is further described below. Figure 13 The memory protection engine 330 (memory encryption circuit) shown is used for decryption.

[0130] In a specific implementation of a cache that does not support granular protection entries, step 172 can be omitted, and the method can proceed directly from step 170 to step 174 (in which case each memory access request may require loading granular protection information).

[0131] At step 176, for any received granular protection data block obtained from the memory system as part of a GPT lookup, integrity check circuit 23 performs a data integrity check to determine whether the received granular protection data block is at risk of being tampered with. As described above, in some specific implementations, this check may simply include checking whether each GPE in the obtained granular protection data block has a valid code, and if any GPE in the granular protection data block has an invalid code, the check can be considered a failure. Alternatively, the data integrity check may check whether the integrity signature check value derived from the obtained block matches a previously stored integrity signature associated with the block, and if there is a mismatch between the check value and the previously stored integrity signature, the data integrity check can be considered a failure.

[0132] At step 178, it is determined whether the data integrity check passed or failed. If the data integrity check fails, at step 180, the integrity check circuit 23 triggers a signaling notification of a particle protection fault, associated with information indicating the type or syndrome of the fault caused by the integrity check violation. The signaling fault has a type that is handled by the exception handler code executed at EL3, causing the root domain code to handle the fault. For example, the root domain code may trigger a system reset or other actions to prevent the system from continuing to operate in the presence of a potential attack. The root domain code may also cause the fault to be reported to, for example, the system operator or the provider of the software being executed. The exact actions taken regarding the signaling notification of a fault may vary depending on the specific implementation requirements.

[0133] On the other hand, if the data integrity check passes, at step 182, the obtained granular protection data block can be cached in the granular protection information cache 22, and at step 184, the GPE corresponding to the target PA can be extracted from the obtained granular protection data block and used to check whether the memory access request received at step 170 is allowed to continue. If the target PA is hit in the granular protection information cache 22 at step 172, steps 174 to 182 can be omitted, and instead, the method proceeds directly to step 184 using the target GPE obtained from the granular protection information cache 22.

[0134] Regardless of whether the target GPE has been cached or obtained from memory and passed the data integrity check, at step 184, the filter circuit 184 identifies, based on the GPI in the target GPE, whether the target GPE is invalid or indicates that the selected PAS associated with the memory access request is not a permitted PAS for the corresponding physical address particle. If the target GPE is valid and indicates that the selected PAS is a permitted PAS, then at step 186, the filter circuit 20 allows the memory access request to proceed and passes the memory access request, along with the indications of the PA and PAS associated with the memory access request, to the cache 24 or interconnect 8. If the target GPE is invalid or indicates that the selected PAS is not a permitted PAS, then at step 188, the filter circuit 20 triggers a signaling notification of a particle protection fault, which is associated with fault type or syndrome information indicating that the fault is caused by an access violation in which the memory access request does not meet the requirements indicated in the target GPE. Similarly, a fault signaling particle protection is handled by the program code operating in the root domain at EL3, but it is distinguished from a fault signaled at step 180 due to a data integrity violation by fault type or syndrome information, so that the root domain code can take different actions in response to the fault.

[0135] Figure 12 The operation of the address translation circuit 16 and the PAS filter is summarized. The PAS filter 20 can be viewed as an additional stage 3 check performed after the stage 1 (and optionally stage 2) address translation performed by the address translation circuit. It should also be noted that the EL3 translation is based on page table entries that provide two bits of address-based selection information (in...). Figure 12 In the example, they are labeled NS and NSE, while the selection information "NS" is used to select PAS in other states. Figure 12 The safety status indicated by the input for particle protection check refers to the domain ID of the current domain of the identification processing element 4.

[0136] Figure 13 A more detailed example of a data processing system that can implement some of the techniques described above is shown. The same elements as in the previous examples are shown using the same reference numerals. Figure 13 In the example, processing element 4 is shown in more detail, including, in addition to processing circuitry 10, address translation circuitry 16, TLB 18, and PAS filter 20, cache 24 comprising a level 1 instruction cache, a level 1 data cache, a level 2 cache, and optionally a shared level 3 cache 24 shared among processing elements. Interrupt controller 300 can control the handling of interrupts by each processing element.

[0137] like Figure 13 As shown, the processing element 4, capable of executing program instructions to trigger memory access, is not the only type of requesting device that can be equipped with a requester-side PAS filter 20. In other examples, the system MMU 310 (which is provided to provide address translation functionality for requesting devices 312, 314 that do not support their own address translation capabilities, such as on-chip devices 312 (a network interface controller or display controller) or off-chip devices 314 (that can communicate with the system via a bus) can be equipped with a PAS filter 20 to perform the same requester-side check of GPT entries as the PAS filter 20 in the processing element 4. Other requesting devices may include a debug access port 316 and a control processor 318, which may again have a PAS filter 20 associated with them to check whether memory access to a specific physical address space issued by requesting devices 316, 318 is permitted given a PAS allocation defined in GPT 56. Although not in Figure 13The instructions explicitly state that, however, any PAS filter 20 associated with these devices may also be configured with the aforementioned GPT loading circuit 21 and integrity check circuit 23. If any of these devices issues a physically addressed memory access request (which may occur if the MMU is disabled for this environment), the selected PAS for these devices can be assumed to be the PAS associated with the current domain (i.e., the non-secure PAS if the current domain is insecure; the secure PAS if the current domain is secure; the domain PAS if the current domain is a domain; or the root PAS if the current domain is the root).

[0138] Interconnect 8 in Figure 13 The diagram, shown in more detail as a consistency interconnect 8, and the routing structure 320, also includes a snoop filter 322 for managing consistency between caches 24 in the respective processing elements, and one or more system caches 324 that can perform caching of shared data shared between requesting devices. The snoop filter 322 and system caches 324 may be upstream of the PoPA 60 and therefore their entries can be labeled using a PAS identifier selected by the MMUs 16, 310 for a particular master device. By default, it can be assumed that requesting devices 316, 318 not associated with the MMU always issue requests for specific domains, such as non-secure domains (or root domains, if they are trusted).

[0139] Figure 13 A memory protection engine (MPE) 330, as another example of a pre-PoPA component, is shown. This pre-PoPA component treats aliased physical addresses in the corresponding PAS as referencing different address locations. The memory protection engine is positioned between interconnect 8 and a given memory controller 6 to control access to off-chip memory 340. MPE 330 can be responsible for encrypting data written to off-chip memory 340 to maintain confidentiality and decrypting the data upon readback (this can include GPT blocks containing GPEs, as described above). Furthermore, by generating integrity metadata when writing data to memory and using the metadata to verify whether the data has been altered when reading data back from off-chip memory, MPE can prevent tampering with data stored in off-chip memory. When encrypting data or generating hashes for memory integrity, different keys can be used depending on the physical address space being accessed, even if the access actually corresponds to an aliased physical address in off-chip memory 340. This enhances security by further separating data associated with different operating domains.

[0140] In this example, PoPA 60 is located between memory protection engine 330 and memory controller 6, such that when a request reaches memory controller 6, physical addresses are no longer considered as different physical locations mapped to memory 340, depending on the physical address space they are accessing.

[0141] Figure 13 Another example of the completer device 6 is shown, which can be a peripheral bus or non-uniform interconnect for communicating with a region of peripheral device 350 or on-chip memory 360 (e.g., implemented as static random access memory (SRAM)). Furthermore, the peripheral bus or non-uniform interconnect 6 can be used to communicate with security elements 370 (e.g., a cryptographic unit for performing cryptographic processing, a random number generator 372, or certain fuses 374 storing static hardwired information). Various power / reset / debug controllers 380 can also be accessed via the peripheral bus or non-uniform interconnect 6.

[0142] For the on-chip SRAM 360, providing a slave-side (completer-side) PAS filter 400 may be useful. This filter can perform completer-side filtering of memory accesses based on completer-side protection information that defines which physical address spaces are allowed to access a given physical address block. This completer-side information can be defined more coarsely than the GPT used by the requester-side PAS filter 20. For example, the slave-side information could simply indicate that an entire SRAM cell 361 can be dedicated to use by the neighborhood domain, another SRAM cell 362 can be dedicated to use by the root domain, and so on for other domains. Therefore, relatively coarsely defined physical address blocks can point to different SRAM cells. This completer-side protection information can be statically defined by bootloader code that loads the information into the completer-side PAS filter at boot time, which cannot be changed at runtime. Therefore, it is less flexible than the GPT used by the requester-side PAS filter 20. However, for use cases where the partitioning of physical addresses into specific regions accessible to each domain is known at boot time and will not change, and fine-grained partitioning is not required, using the slave-side PAS filter 400 instead of the requester-side PAS filter 20 may be more efficient. This is because it allows the power and performance costs of obtaining GPT entries and comparing the allocated PAS and shared attribute information with the information of the current memory access request to be eliminated on the requester side. Furthermore, if a pass-through indicator can be indicated in the top-level GPT entry in the multi-level GPT structure (or in other table descriptor entries at a level other than the final level), access to other levels of the GPT structure (which could be performed to find more fine-grained information about the allocated PAS so that the request can be accepted by the requester-side check) can be avoided for requests targeting a region of physical addresses mapped to by the completer-side PAS filter 400.

[0143] Therefore, supporting a hybrid approach that enables both the requester and completer sides to inspect protection information is useful for improving performance and power efficiency. System designers can define which approach should be used for specific regions of memory.

[0144] Figure 14A specific implementation of a simulator that can be used is illustrated. While the previously described embodiments implement the invention in terms of means and methods for operating specific processing hardware supporting the technologies involved, it is also possible to provide an instruction execution environment according to the embodiments described herein, which is implemented using a computer program. Such computer programs are generally referred to as simulators, in part because they provide a software-based implementation of a hardware architecture. Types of simulator computer programs include emulators, virtual machines, models, and binary converters, including dynamic binary converters. Typically, the simulator implementation can run on a host processor 430 that supports the simulator program 410, which optionally runs a host operating system 420. In some arrangements, multiple emulation layers may exist between the hardware and the provided instruction execution environment and / or multiple different instruction execution environments provided on the same host processor. Historically, powerful processors were required to provide simulator implementations that execute at a reasonable speed, but this approach may be reasonable in certain situations, such as when it is desirable to run code native to another processor for compatibility or reuse reasons. For example, the simulator implementation may provide additional functionality to the instruction execution environment that is not supported by the host processor hardware, or provide an instruction execution environment that is typically associated with a different hardware architecture. An overview of the simulation is given in the following literature: “Some Efficient Architecture Simulation Techniques”, Robert Bedichek, Winter 1990 USENIX Conference, pp. 53-63.

[0145] Where embodiments have been previously described with reference to specific hardware constructs or features, in simulated embodiments, equivalent functionality may be provided by suitable software constructs or features. For example, specific circuitry may be implemented as computer program logic in simulated embodiments. Similarly, memory hardware such as registers or cache memory may be implemented as software data structures in simulated embodiments. One or more of the hardware elements referenced in the previously described embodiments are present in an arrangement on host hardware (e.g., host processor 430), and where appropriate, some simulated embodiments may utilize the host hardware.

[0146] The simulator program 410 may be stored on a computer-readable storage medium (which may be a non-transitory medium) and provides a program interface (instruction execution environment) to the target code 400 (which may include applications, operating systems, and management programs), the same as the interface of the hardware architecture modeled by the simulator program 410. Therefore, the simulator program 410 can be used to execute the program instructions of the target code 400 from within the instruction execution environment, allowing the host computer 430, which does not actually possess the hardware features of device 2 discussed above, to emulate these features. This is useful, for example, for allowing testing of target code 400 being developed for a new version of the processor architecture before a hardware device that actually supports the architecture is available, since the target code can be tested by running it within a simulator executed on a host device that does not support the architecture.

[0147] The simulator code includes processing program logic 412 that simulates the behavior of the processing circuit 10. For example, it includes instruction decoding program logic that decodes the instructions of the target code 400 and maps the instructions to corresponding instruction sequences in the native instruction set supported by the host hardware 430 to perform functions equivalent to the decoded instructions. Processing program logic 412 also simulates the handling of code in different exception levels and domains as described above. Register simulation program logic 413 maintains data structures in the host processor's host address space, simulating the architecture register states defined according to the target instruction set architecture associated with the target code 400. Therefore, it is not as... Figure 1 Instead of storing such architectural state in hardware register 12 as in the example, it is stored in the memory of host processor 430, where register emulation logic 413 maps register references of instructions of target code 400 to corresponding addresses for obtaining simulated architectural state data from host memory. This architectural state may include the previously described current domain indicator 14 and current exception level indicator 15.

[0148] The simulation code includes address translation logic 414 and filtering logic 416, which respectively reference the same page table structure as described above and the functionality of the GPT 56 emulated address translation circuit 16 and PAS filter 20. Therefore, address translation logic 414 translates the virtual address specified by target code 400 into a simulated physical address within the PAS (from the target code's perspective, this refers to a physical location in memory), but in reality, these simulated physical addresses are mapped to the host processor's (virtual) address space by address space mapping logic 415. Filtering logic 416 performs a lookup of particle protection information in the same manner as the aforementioned PAS filter to determine whether memory access triggered by the target code is allowed to proceed.

[0149] GPT loader logic 418 controls the loading of GPT block 150 from memory when needed, similar to... Figure 1 The GPT loading circuit 21 is shown. However, for the simulator, the particle protection information cache 22 may not be simulated, so the simulator implementation will function similarly to a hardware device without any GPI cache 22. Therefore, each memory access request will be treated as if it missed in the cache, thus... Figure 11 In this method, step 172 will be omitted, allowing the method to proceed linearly from step 170 to step 174. If the data integrity check at step 178 passes, the method will proceed linearly from step 178 to step 184. Integrity check program logic 419 simulates integrity check circuit 23 to perform data integrity checks on blocks of granular protection data loaded by GPT loading program logic 418.

[0150] In this application, the phrase "configured as..." is used to mean that the elements of the device have a configuration capable of performing the defined operation. In this context, "configuration" means the arrangement or manner of interconnection of hardware or software. For example, the device may have dedicated hardware that provides the defined operation, or a processor or other processing device may be programmed to perform the function. "Configured as" does not mean that the elements of the device need to be changed in any way to provide the defined operation.

[0151] While exemplary embodiments of the invention have been described in detail herein with reference to the accompanying drawings, it should be understood that the invention is not limited to those precise embodiments, and various changes and modifications can be made therein by those skilled in the art without departing from the scope of the invention as defined by the appended claims.

Claims

1. A data integrity checking device, comprising: An address translation circuit is used to translate a target virtual address specified by a memory access request into a target physical address associated with a selected physical address space chosen from a plurality of physical address spaces; A particle protection entry loading circuit is used to load a particle protection data block from memory. The particle protection data block includes at least one particle protection entry. Each particle protection entry corresponds to a corresponding physical address particle and specifies particle protection information. The particle protection information indicates which of the plurality of physical address spaces is a permitted physical address space that is allowed to access the physical address particle from it. A filtering circuit is configured to determine whether the memory access request should be allowed to access the target physical address based on whether the selected physical address space is indicated as an allowed physical address space in the target particle protection entry corresponding to the target physical address particle including the target physical address. An integrity check circuit is provided, which performs a data integrity check on the granular protected data block loaded from the memory and sends a signal to notify of a fault when the data integrity check fails. A Physical Alias ​​Point (PoPA) memory system component is configured to dealias multiple aliased physical addresses corresponding to the same memory system resource from different physical address spaces, so as to map any one of the multiple aliased physical addresses to a dealiased physical address to be provided to at least one downstream memory system component. as well as At least one pre-PoPA memory system component is provided upstream of the PoPA memory system component, wherein the at least one pre-PoPA memory system component is configured to treat the aliased physical address from a different physical address space as the aliased physical address corresponding to a different memory system resource.

2. The apparatus of claim 1, wherein the particle protection data block comprises a plurality of particle protection entries corresponding to particles with different physical addresses; and The integrity check circuit is configured to perform the data integrity check on the plurality of particle protection entries in the particle protection data block.

3. The apparatus according to claim 2, wherein, In response to the memory access request: When the target particle protection entry is not yet accessible by the filtering circuit, the particle protection entry loading circuit is configured to load the particle protection data block including the target particle protection entry from memory; and When the data integrity check fails for one of the plurality of particle protection entries of the particle protection data block, other than the target particle protection entry, the integrity check circuit is configured to signal the failure even if the data integrity check passes for the target particle protection entry.

4. The apparatus according to any one of claims 1 to 3, comprising a memory encryption circuit for encrypting data stored in a protected area of ​​the memory and decrypting data read from the protected area of ​​the memory.

5. The apparatus of claim 4, wherein when the particle protection entry loading circuit loads a particle protection data block from the protected region of the memory, the memory encryption circuit is configured to decrypt the particle protection data block read from the protected region of the memory before providing the particle protection data block to the filtering circuit or the integrity check circuit.

6. The apparatus according to any one of claims 1 to 3, wherein the data integrity check includes determining whether at least one integrity signature value associated with the particle protection data block matches at least one signature check value derived from the particle protection data block.

7. The apparatus according to any one of claims 1 to 3, wherein the filtering circuit includes a requester-side filtering circuit to determine, based on the particle protection information in the target particle protection entry, whether to allow the memory access request to be passed to a cache or to an interconnect for communicating with a completer device for servicing the memory access request.

8. The apparatus of claim 7, wherein the integrity check circuit includes a requester-side integrity check circuit for performing the data integrity check on the particle protection data block loaded from memory after the particle protection data block has been received from the interconnect.

9. The apparatus of claim 1, wherein at least one of the address translation circuit and the filtering circuit is configured to select the selected physical address space based at least on the current operating domain of the requester circuit that issues the memory access request therefrom, the current operating domain comprising one of a plurality of operating domains.

10. The apparatus of claim 9, wherein the address translation circuitry is configured to translate the target virtual address into the target physical address based on at least one page table entry; and At least when the current operating domain is a subset of the plurality of domains, at least one of the address translation circuit and the filtering circuit is configured to select the selected physical address space based on the current operating domain and physical address space selection information specified in the at least one page table entry.

11. The apparatus according to any one of claims 9 and 10, wherein the plurality of domains includes a root domain for managing switching between other domains; and When the data integrity check fails, the integrity check circuit is configured to signal the failure to be handled by the program code executed in the root domain.

12. The apparatus according to any one of claims 1 to 3, wherein: In response to the memory access request, when no valid granular protection entry has been defined for the target physical address granularity, or when the filtering circuit determines, based on the target granular protection entry, that the memory access request is not allowed to access the target physical address, the filtering circuit is configured to signal a fault associated with a different fault type or a different fault syndrome information than the fault signaled by the integrity check circuit when the data integrity check fails.

13. The apparatus according to any one of claims 1 to 3, wherein the alias physical address is represented by the same physical address value in the different physical address spaces.

14. A data integrity checking device, comprising: An address translation circuit is used to translate a target virtual address specified by a memory access request into a target physical address associated with a selected physical address space chosen from a plurality of physical address spaces; A particle protection entry loading circuit is used to load a particle protection data block from memory. The particle protection data block includes at least one particle protection entry. Each particle protection entry corresponds to a corresponding physical address particle and specifies particle protection information. The particle protection information indicates which of the plurality of physical address spaces is a permitted physical address space that is allowed to access the physical address particle from it. A filtering circuit is configured to determine whether the memory access request should be allowed to access the target physical address based on whether the selected physical address space is indicated as an allowed physical address space in the target particle protection entry corresponding to the target physical address particle including the target physical address. An integrity check circuit is included, which performs a data integrity check on the granular protected data block loaded from memory and signals a fault when the data integrity check fails. The particle protection information is encoded using N bits of the particle protection entry, wherein the encoding of a first subset of the N bits is a valid encoding indicating a valid option for the particle protection information, and the encoding of a second subset of the N bits is an invalid encoding; and The data integrity check includes checking for each particle protection entry in the particle protection data block whether the particle protection information of the particle protection entry has one of the codes in the first subset or one of the codes in the second subset.

15. The apparatus of claim 14, wherein the integrity check circuit is configured to signal the fault when any particle protection entry in the particle protection data block has one of the codes of the second subset.

16. A data integrity check method, comprising: The target virtual address specified by the memory access request is translated into a target physical address associated with the selected physical address space chosen from multiple physical address spaces; A particle protection data block is loaded from memory. The particle protection data block includes at least one particle protection entry. Each particle protection entry corresponds to a corresponding physical address particle and specifies particle protection information, which indicates which of the plurality of physical address spaces is a permitted physical address space that is allowed to access the physical address particle from it. Perform a data integrity check on the granular protection data block loaded from memory, and signal a fault if the data integrity check fails; Based on whether the selected physical address space is indicated as an allowed physical address space in the target particle protection entry corresponding to the target physical address particle that includes the target physical address, it is determined whether the memory access request should be allowed to access the target physical address. Multiple aliased physical addresses from different physical address spaces corresponding to the same memory system resource are dealiased so that any one of the multiple aliased physical addresses is mapped to a dealiased physical address to be provided to at least one downstream memory system component. as well as Upstream of the alias removal process, the alias physical addresses from different physical address spaces are considered as corresponding to different memory system resources.

17. A computer program product comprising the computer program, the computer program including instructions that, when executed on a host data processing device, control the host data processing device to perform the method of claim 16.

18. A computer-readable storage medium storing a computer program, the computer program including instructions that, when executed on a host data processing device, control the host data processing device to perform the method of claim 16.

Citation Information

Patent Citations

  • Memory control device and memory control method

    JP2003242030A

  • Information processing device and computer readable medium

    US20200050783A1