Defenses against speculative side-channel analysis of computer systems
By introducing memory tagging technology into computer systems, the problem of speculative side-channel analysis attacks is solved, achieving both processor security protection and performance preservation.
Patent Information
- Application Number
- CN202611439988.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2018-12-28
- Filing Date
- 2019-12-02
- Publication Date
- 2026-11-27
AI Technical Summary
Computer systems are vulnerable to speculative side-channel analysis attacks, in which attackers exploit the processor's speculative and out-of-order execution capabilities to illegally read confidential data.
The system employs memory tagging technology, including identification and encryption tags, to provide fine-grained memory access control by inserting tag information into virtual and physical addresses. This prevents speculative memory access from exceeding valid boundaries and uses cryptographic pointers and counters to control speculative memory access.
It effectively reduces the possibility of side-channel analysis, protects the processor from attacks, and maintains the performance and security of speculative operations, preventing attackers from obtaining confidential information through side-channel analysis.
Smart Images

Figure CN123179394A_ABST
Abstract
Description
[0001] This invention patent application is a divisional application of the invention patent application with international application number PCT / US2019 / 063994, international application date of December 2, 2019, application number 201980042311.5 that entered the Chinese national phase, and entitled "Defense against speculative side-channel analysis of computer systems". Technical Field
[0002] The technology field generally involves computers, and more specifically, computer system security. Background Technology
[0003] Computer systems can be vulnerable to attackers attempting to obtain confidential, private, or secret information. For example, attacks such as Spectre and Meltdown exploit the processor's speculative and out-of-order execution capabilities to illegally read data via side-channel analysis. Attached Figure Description
[0004] The invention is illustrated by way of example and not limitation in the accompanying drawings, in which similar reference numerals indicate similar elements, wherein: Figure 1A This is a block diagram of a computing environment that reduces the likelihood of successful side-channel analysis within a processor by providing address-based security features for memory within the processor, according to at least one embodiment described herein. Figure 1B It is a block diagram of a processor according to at least one embodiment; Figure 2 This is a diagram illustrating an implementation of a memory tag, according to at least one embodiment, that can be used to protect a memory address pointer from side-channel analysis; Figure 3 This is a flowchart of a method for using memory tags in defense against side-channel analysis, according to at least one embodiment; Figure 4 This is a block diagram illustrating the use of memory tags in defense against side-channel analysis according to at least one embodiment; Figure 5 It is a block diagram illustrating the virtual memory address of an identification tag (e.g., a color tag) that can be stored in various locations within a virtual memory address according to at least one embodiment; Figure 6 It is a block diagram of a processor according to at least one embodiment; Figure 7 The illustration is based on an embodiment. Figure 6 A diagram illustrating the computing environment in which secure memory access logic is applied; Figure 8AThis is a flowchart of at least one embodiment of a method for initiating a memory allocation operation during the execution of a computer program; Figure 8B It is used to continue Figure 8A A flowchart of at least one embodiment of a method for memory allocation operations; Figure 9 This is a flowchart of at least one embodiment of a method for providing security for indirect addresses; Figure 10 This is a flowchart of at least one embodiment of a method for verifying previously secure indirect addresses; Figure 11 This illustrates an embodiment where the memory tag is encrypted using the encrypted portion of the address; Figure 12A This is a block diagram illustrating both an exemplary ordered pipeline and an exemplary out-of-order release / execution pipeline for register renaming, according to embodiments of the present invention. Figure 12B This is a block diagram illustrating both an exemplary embodiment of an ordered architecture core to be included in a processor according to an embodiment of the present invention and an exemplary out-of-order release / execution architecture core with register renaming; Figure 13 This is a block diagram illustrating an out-of-order release / execution processor core that may be included in a processor according to an embodiment of the present invention; Figure 14 This is a block diagram of a processor according to an embodiment of the present invention, which may have more than one core, may have an integrated memory controller, and may have an integrated graphics device; Figure 15 This is a block diagram of an illustrative central processing unit (CPU) complex that may be included in a processor according to an embodiment of the present invention; Figure 16 This is a block diagram of an illustrative cache hierarchy structure that may be included in a processor according to an embodiment of the present invention. Figure 17-21 This is a block diagram of an exemplary computer architecture; Figure 17 A block diagram of a system according to an embodiment of the present invention is shown; Figure 18 This is a block diagram of a first, more specific, exemplary system according to an embodiment of the present invention; Figure 19 This is a block diagram of a second, more specific, exemplary system according to an embodiment of the present invention; Figure 20 This is a block diagram of a System-on-a-Chip (SoC) according to an embodiment of the present invention; Figure 21 This is a block diagram of a System-on-a-Chip (SoC) according to an embodiment of the present invention; Figure 22 This is a block diagram illustrating the use of a software instruction converter to convert binary instructions in a source instruction set into binary instructions in a target instruction set, according to an embodiment of the present invention. Detailed Implementation
[0005] Numerous specific details are set forth in the following description. However, it should be understood that embodiments of the invention may be practiced without these specific details. In other instances, well-known circuits, structures, and techniques have not been shown in detail so as not to obscure the understanding of this description.
[0006] References to "an embodiment," "embodiment," "example embodiment," etc., in the specification indicate that the described embodiment may include a specific structure, feature, or characteristic; however, each embodiment may not necessarily include that specific structure, feature, or characteristic. Furthermore, such phrases do not necessarily refer to the same embodiment. Additionally, when a feature, structure, or characteristic is described in connection with an embodiment, it is believed that the influence of such feature, structure, or characteristic on such feature, structure, or characteristic in conjunction with other embodiments, whether explicitly described or not, is within the knowledge of those skilled in the art.
[0007] Many processors and processor cores support capabilities to enhance performance, such as cache operations, multithreading, out-of-order execution, branch prediction, and speculative execution. Attackers have found various ways to exploit these processor capabilities to illegally read data.
[0008] For example, an attacker might intentionally attempt to read data (e.g., secret data) from a memory location that should not be accessible to them (e.g., out of bounds). The read might be allowed to continue speculatively until it is determined whether the access is out of bounds. While the system's architectural correctness can be ensured by not submitting any results until a determination is made, speculative execution can cause the processor's microarchitectural state to change before a determination is made, and the attacker might be able to perform side-channel analysis to infer the value of the secret data based on the differences in the processor's microarchitectural state. Many variations of this type of speculative attack are possible. In one case, an attacker might speculatively use the secret data as part of a memory address and infer the value by using timing analysis to determine which memory locations are being loaded into the cache.
[0009] As a more concrete example, with a cache line size of 64 bits, changing any one of the least significant six bits of a memory address will not cause the address to reference a different cache line, but changing the seventh least significant bit will. Therefore, an attacker could repeatedly (e.g., to eliminate noise and / or achieve statistically significant results) clear and / or fill cache dumps to a known or predictable state, use speculative streams to make the processor speculatively access secret data, speculatively apply a bit of the secret data to the seventh least significant bit of a known memory address stored in a register (e.g., using shift and / or other bit manipulation instructions), speculatively exploit manipulated memory addresses to access their own memory space, use timing side-channel analysis to determine if a new cache line has been loaded, and infer whether the value of the secret bit is the same as or different from the value of the seventh least significant bit of a known memory address.
[0010] Embodiments of the present invention include systems, methods, and apparatuses that provide features or characteristics that may be desired for use in various computer systems for a variety of reasons, including reducing vulnerability to attacks based on speculation or side-channel analysis; reducing vulnerability to such analysis at a lower cost in terms of performance or other aspects compared to alternative methods; and / or improving security overall. Embodiments provide fine-grained memory access control mechanisms or combinations thereof that cannot be bypassed by speculation but do not prevent the use of speculation, thereby preserving the performance improvements of speculation. For example, to prevent the types of analysis described in the preceding paragraphs, embodiments provide memory tagging techniques and / or address encoding / encryption, each as described below, to limit the effectiveness of hostile efforts to infer information about secret data by attempting to speculatively use secret data as memory addresses or other content and / or access memory locations outside boundaries defined for validity, security, or other purposes.
[0011] Implementations may include any one and / or any combination of the following (each of which may be further described below): identification / integrity tagging, such that inline tag information is available to the processor or memory controller simultaneously with data access, so that the processor immediately knows whether speculative memory access is incorrect and should be stopped or blocked; encryption of memory tags, such that correct decryption of data is based on knowledge of the correct tag value (key), so that speculation using incorrect encryption tags (key identifiers) will only provide useless ciphertext to a side-channel attacker and will not reveal the secret data at a given address; cryptographic pointers, such that dispatched pointers (e.g., via malloc) available to a side-channel attacker cannot be used outside their boundaries without causing address corruption, thereby fundamentally preventing... This prevents side-channel attackers from using such pointers to perform side-channel analysis against known memory locations (typically, the processor also catches corrupted virtual addresses because they terminate in unallocated virtual memory, resulting in page faults); the combination of techniques, such as including tag information in the cryptographic pointer (the tag portion of the address is also encrypted along with the actual location address information), prevents side-channel attackers from targeting memory or independently selecting the tag information, so modifying one or the other will corrupt both, creating complete chaos from a side-channel analysis perspective; and a counter for counting speculative memory access control corruption, so that if the attacker continues to make incorrect guesses, the processor may kill processes exceeding a specified threshold, and the OS may follow up to remedy the situation.
[0012] Memory tagging technology
[0013] The disclosed embodiments include memory tagging circuitry and techniques to address existing and potential security vulnerabilities in computer systems. Memory tagging circuitry can be configured to prevent memory pointers (references) from being used speculatively beyond valid boundaries, prevent memory pointer manipulation (e.g., by adding values) that causes pointers to access incorrect (unauthorized) data objects, and increase the granularity of memory tagging to include byte-level tagging in the cache. Memory tagging circuitry can also be configured to sandbox untrusted code by tagging portions of memory (e.g., words) to indicate when the tagged portion of memory includes a protected pointer. Memory tagging circuitry provides security features while allowing the processor to continue using speculative operations and benefit from performing them.
[0014] Figure 1AThis is a block diagram of a computing environment 100 consistent with embodiments of the present disclosure, in which the likelihood of successful side-channel analysis can be reduced by providing address-based security features to the memory within the processor. According to an embodiment, computing environment 100 includes system 104, which reduces the likelihood of successful side-channel analysis while enabling the processor to perform speculative operations and benefit from performing such operations. Figure 1 illustrates an attacker 102 coupled to system 104 via one or more networks 106 or one or more physical connections 108. Attacker 102 can perform one or more side-channel analyses 110 on system 104 via network 106 and / or via physical connections 108. System 104 may include one or more of a variety of computing devices, including but not limited to: personal computers, servers, laptops, tablets, tablet phones, smartphones, motherboards with chipsets, or other computing devices. System 104 is configured to protect the processor from side-channel analysis using various address-based security features that enable the processor to operate securely while performing speculative operations. In other words, the processor and / or associated hardware are provided with concurrent access to additional (access control) information that allows the processor to safely speculate (meaning that it is available at the same time as speculative data access).
[0015] Attacker 102 can be a computer system, an individual, or a combination of computer systems and individuals, who may attempt to perform one or more side-channel analyses (e.g., Spectre) against system 104. Attacker 102 may use one or more networks 106 to perform side-channel analysis 110. Attacker 102 may also use one or more physical connections 108, such as memory insertion mechanisms, memory probes, etc., to read, modify, and / or write to one or more memory addresses within system 104. Some of the side-channel analyses 110 may include attempting to speculatively access data beyond permitted memory boundaries using pointers, attempting to manipulate pointers (e.g., adding values to pointers to make them point to unintended objects), and so on.
[0016] System 104 is configured to provide various memory-based security features to protect against side-channel analysis 110. System 104 includes a processor 112 coupled to memory 114 via one or more communication channels 116. Processor 112 may include a processor core 118, a cache 120, encryption circuitry 122, integrity verification circuitry 124, and a memory controller 170. Processor 112 also includes pointer security circuitry 126 configured to extend memory tagging capabilities, reduce or prevent pointer override attacks, reduce or prevent pointer manipulation, and implement byte-level memory security for processor 112.
[0017] Processor 112 may include any number and / or combination of currently available and / or future-developed single-core or multi-core processing units. In embodiments, processor 112 may represent or include general-purpose processors such as Core® i3, i5, i7, 2 Duo and Quad, Xeon®, Itanium®, Atom®, or Quark® microprocessors, all of which are available from Intel® (Intel Corporation, Santa Clara, California). Alternatively, processor 112 may represent or include one or more processors from another manufacturer or supplier, such as Advanced Micro Devices (AMD®), ARM Holdings®, MIPS®, etc. Processor 112 may represent or include special-purpose processors such as, for example, network or communications processors, compression engines, graphics processors, coprocessors, embedded processors, etc. Processor 112 may be implemented as a single semiconductor die or package or as a combination of stacked or otherwise interconnected semiconductor dies and / or packages. The processor 112 may be part of one or more substrates, and / or may be implemented on one or more substrates using any of several process technologies (such as, for example, BiCMOS, CMOS, or NMOS).
[0018] According to an embodiment, memory 114 represents one or more of various types of memory that can be used in system 104. Memory 114 can be volatile memory, non-volatile memory, or a combination of volatile and non-volatile memory. Volatile memory can include various types of random access memory (RAM). Non-volatile memory can include NAND memory, 3D crosspoint (3DXP), phase-change memory (PCM), hard disk drive, etc.
[0019] According to an embodiment, processor 112 can use memory controller 170 to move data back and forth between processor 112 and memory 114. For example, when operating one or more software programs or when executing various instructions, processor core 118 can generate new data 128. Processor core 118 can use the virtual address (or linear address) 130 of the new data 128 to write the new data 128 to cache 120 or to memory 114. The new data 128 can be stored in cache 120 as cached data 132, or it can be added to existing cached data 132. Cached data 132 can have a physical address 134. Processor 112 may be configured to encrypt new data 128 and / or cached data 132 using encryption circuitry 122 and encryption algorithm 136 before saving new data 128 and / or cached data 132 to memory circuitry 114 as stored data 138; however, the stored data 138 does not need to be encrypted and may include encrypted data, unencrypted data, or any combination of encrypted and unencrypted data. Processor 112 may also use integrity verification circuitry 124 to generate an integrity check value 140 based on new data 128, virtual address 130, cached data 132, and / or physical address 134. Memory controller 170 may write the integrity check value to memory 114 based on the processor's key identifier (key ID) (to facilitate corruption detection of stored data 138), and / or memory controller 170 may encrypt the data written to memory using a key identified by the processor (e.g., by specifying the key identifier in the physical address).
[0020] Processor 112 may use pointer security circuitry 126 to provide security for data within system 104. According to various embodiments disclosed herein, pointer security circuitry 126 may be configured to detect when virtual address 130 and / or physical address 134 is overridden, detect when virtual address 130 and / or physical address 134 has been manipulated, provide byte-level memory security, and / or provide access to memory tags. According to various embodiments, Figure 2 , Figure 4 and Figure 5 The illustrations show various example memory tag configurations that can be identified, defined, and / or applied by pointer security circuitry 126 to protect system 104 from side-channel analysis 110.
[0021] When processor core 118 assigns virtual address 130 (e.g., by executing a software program) to new data 128, pointer security circuitry 126 can define, insert, or identify one or more memory tags 142A in virtual address 130 to associate with the new data 128 to reduce the likelihood of successful side-channel analysis. One or more memory tags 142A may include identification tag 144 and / or encryption tag 146. In some embodiments, the tag may be selected by software that writes its data to memory. Software (e.g., a memory allocator function, such as malloc) can select a tag value and insert it into a virtual (linear) address. Hardware can decode the tag value, encode it, transform it, and / or pass it to a physical address.
[0022] The virtual address 130 for new data 128 may include an identification tag 144 to provide access control for the new data 128. The identification tag 144 may refer to a color, password color, memory color, tag color, key ID, etc. Pointer security circuitry 126 may be configured to define where the identification tag 144 resides or is defined within the virtual address 130. For example, pointer security circuitry 126 may define the identification tag 144 as the most significant eight bits in the virtual address 130. For example, the identification tag 144 may be defined as bits 56-62 (i.e., seven bits) of bits 0-63 of the virtual address 130, assuming, as an example, that the length of the virtual address 130 is 64 bits. Other embodiments may use larger or smaller tag sizes and / or larger or smaller virtual address sizes (e.g., 128 bits).
[0023] Pointer security circuit 126 can use identifier tag 144 in various ways to provide security to new data 128. For example, pointer security circuit 126 can use identifier tag 144 in encryption algorithm 136 as a tweak or as part of a tweak (e.g., input of a cipher in addition to plaintext data, which produces different ciphertext data for different tweak values). In embodiments, identifier tag 144 is combined with a subset of virtual address 130 to define the tweak that can be used by encryption algorithm 136 when encrypting new data 128.
[0024] The virtual address 130 for the new data 128 may include an encryption tag 146 to provide security for the new data 128. Pointer security circuitry 126 can be configured to define where the encryption tag 146 resides or is defined within the virtual address 130. For example, pointer security circuitry 126 can define the encryption tag 146 as the most significant three bits in the virtual address 130. For example, encryption tag 146 can be defined as bits 59-62 (i.e., four bits) of bits 0-63 of the virtual address 130, assuming, for example, that the virtual address 130 is 64 bits long. Encryption tag 146 can be a representation of key ID 152, used to look up encryption key 154 within key table 156 via encryption circuitry 122. Encryption tag 146 can also be identified using other techniques, for example, it can be defined within one or more bits in physical address 134. It can be copied or transformed from the virtual address to the physical address, allowing the key ID to be passed to the memory encryption circuitry. The implementation can provide the use of the key ID to aid in the defense against speculative side-channel analysis, because if a faulty memory encryption tag is used, the data will not be revealed (it will be decrypted into random bits), so speculation based on this random data in side-channel analysis will not reveal any secrets to the attacker.
[0025] The pointer security circuit 126 may also include pointer security instructions 158 that at least partially provide tag definition 160. Pointer security instructions 158 may include multiple instructions or operations that can be used by pointer security circuit 126 or processor 112 to add pointers according to tag definition 160. Tag definition 160 may define the length, position, and one or more of the identification tag 144 and / or encryption tag 146 in use. In embodiments, the instructions may be used to set corresponding tag values in memory and / or to read tag values from memory and may be restricted to use by privileged software (e.g., OS kernel or VMM).
[0026] The pointer security circuit 126 can use the pointer metadata table 162 to store, update, and retrieve memory tags 142E and / or tag definitions 160.
[0027] When processor 112 writes new data 128 to cached data 132 using physical address 134, pointer security circuitry 126 can define, insert, or identify one or more memory tags 142B in physical address 134 to associate with cached data 132 to reduce the likelihood of successful side-channel analysis. One or more memory tags 142B embedded within physical address 134 may include one or more of identification tags 144 and / or encryption tags 146. Physical address 134 may include fewer, more, or different portions than the memory tags 142B used or associated with virtual address 130.
[0028] For the purpose of speculative attack prevention, since the memory write is performed by a software function that "owns" the data being written, the write can be assigned an associated identification tag (e.g., write for ownership, or My data, my tag). Tag assignment begins with a software stream applied to the corresponding virtual (linear) address for writing the data. The hardware is responsible for performing read memory access control based on the tag value. In the tagged scenario, the hardware compares the tag value initially written with the data with the tag value in the memory access request (memory load). If the tags match, the memory access can proceed (the requester knows the correct identification tag value to use). Similarly, for encrypted tags, the requester knows the correct key to use (the key used for encryption when writing data to memory).
[0029] Figure 1B According to the embodiments Figure 1A A block diagram of processor 112 shows a processor core 118, cache 120, pointer metadata table 162, and a more detailed description of memory controller 170. According to, for example... Figure 3 In embodiments such as method 300, the tag lookup circuit 172 can be used to locate memory tags associated with physical addresses. According to, for example... Figure 3 In embodiments such as method 300, the tag comparison circuit 174 can compare the memory tag associated with physical address 130 and the memory tag associated with virtual address 130. The memory control circuit 178 can represent any other circuitry used to perform memory control operations according to any method.
[0030] Figure 2The illustration shows a memory address translation diagram 200 illustrating an implementation of a memory tag that can be used to protect memory address pointers from side-channel analysis according to an embodiment. Memory address translation diagram 200 illustrates an extended virtual address (or linear address) 202, including an identification tag 204 occupying one or more bits (e.g., non-standard bits), and a virtual address 206 occupying a subset of the extended virtual address 202. The extended virtual address 202 can be 64 bits. The identification tag 204 can occupy one or more most significant bits or other bits within the extended virtual address 202. As shown, the virtual address 206 is translated to a physical address 208 via a translation back lookup buffer (TLB) 210, or via a page table walkthrough. The identification tag 204 is appended to the physical address 208. The physical address 208 and the identification tag 204 can be combined to form or define an encryption trimmer 212, which, as described below, can be applied to an encryption algorithm. Encryption tag 214 can be attached to identification tag 204 and physical address 208 to identify one or more encryption keys via key table 156 (shown in Figure 1). Identification tag 204, physical address 208, and encryption tag 214 can be combined to define cache line physical address 216. Bit positions and / or tag size can vary between different embodiments. The larger the tag size, the more possible tag values are possible, and the more difficult it is for an attacker to guess.
[0031] In an embodiment, the memory tag architecture shown in memory address transformation diagram 200 may employ identification tags 204 and / or encryption tags 214 of different sizes to adjust the difficulty of guessing which memory tag (e.g., identification tag 204 and / or encryption tag 214) is associated with a particular memory address pointer and / or a particular object.
[0032] Memory tagging works similarly to Multi-Key Total Memory Encryption (MKTME), where physical address bits (or other cached metadata) store tag bits (e.g., key identifier KeyID or key field). Software (e.g., memory allocator libraries, such as malloc in glibc) selects tags by setting non-standard bits to tag values within a linear address space. Hardware can bypass paging structures for these transformations, allowing tag bits to be set directly in the physical address from a linear address. Embodiments may include checking tag metadata between external memory and the processor cache during load operations, providing side-channel defense mechanisms because tags can be checked and verified before cache contents are affected. According to embodiments, the tagging operations described herein may be performed by hardware referred to as a “memory controller” or “memory tag controller,” more generally referring to memory controller subsystem hardware, which may be located in various locations within the memory subsystem to handle cache line data tagging.
[0033] Figure 3 A flowchart illustrating a method 300 for performing a loading operation according to an embodiment of the present invention is shown. In the embodiment, method 300 may be executed by a memory controller or other memory execution circuitry. Thus, method 300 may be executed by hardware circuitry, firmware, software, and / or a combination thereof.
[0034] As shown, method 300 begins by receiving a load request that includes tag information of a data row in memory (box 310). This load request can be from any given component that wants to read at least one data slot from the data row. In an embodiment, the data request may include a tag identifier included in a non-standard portion of the address of the load request. In response to the load request, the memory controller sends the load request to the memory (box 320). For this load operation, the memory controller may receive a tag included in the metadata associated with the memory row and data from the requested address of the memory (box 330). The memory controller (e.g., by tag comparison circuitry 174 in memory controller 170) may determine whether one or more tags of the tag information match the tag of the address requested by the memory (diamond box 340). If so, one or more portions (e.g., data slots) can be stored in a cache row, and the tag identifier itself can be stored, for example, in the metadata of the cache row.
[0035] If no matching tag is found during loading, control is passed to box 360, where in one embodiment, the memory controller may prevent loading of the cache line, or in another embodiment, the memory controller may load the cache line with random or garbage data (i.e., data not indicating the corresponding physical address stored in memory), which can provide a defense against attackers trying to guess the tag value without revealing whether a tag match exists.
[0036] Now for reference Figure 4The diagram illustrates a high-level arrangement of a system 400 including a processor (CPU) 410 and associated memory (DRAM) 460. As shown, it is assumed that a load or read request has been generated. Software can use a 64-bit linear address 420 to request data to be read. As shown, the 64-bit linear address 420 includes several parts, including a least significant portion 422 (e.g., 6 bits for identifying bytes within a cache line), another portion 424 for identifying the cache line, a linear address portion 425 for identifying the page location, and a small object indicator 426, such as a small object bit, which, when set, indicates that the request is for a page smaller than the cache line width. For example, this small object address bit can be set by a page table entry corresponding to a page that is part of a small object region of the heap. As further shown, non-standard portions of the address can include a label 428 as described herein. Note that the linear address portion 425 can be used to perform a lookup within the page table and TLB cache structure 430 to obtain the physical memory address 442. It is assumed that this physical address corresponds to a page that is also... Figure 4 The memory row 466 shown includes four 16B slots (slots 0-3), each slot having a corresponding tag 468 stored in the ECC memory 468 (or a table therein). 0-3 .
[0037] When each of these stored tags has a different tag identifier value, it means that each slot is associated with a different tag, and therefore... Figure 4 As further shown, when loaded and stored in cache 445, each slot can be stored in a different cache line (e.g., as shown, on the right-hand side of the cache line), where its corresponding tag identifier 448 is in the PA address of the cache line. Therefore, as... Figure 4 As shown, when each of the tag identifiers 4680-4683 includes a different value (i.e., value 1-4), each corresponding data slot in memory line 466 can be stored in a different cache line 446, and each data slot is stored in the address or metadata portion of the cache 445 associated with the cache line in association with its corresponding tag identifier.
[0038] As further illustrated, the memory controller operations to be performed during loading are shown. Of course, in other cases, this (memory tag controller) function can be performed between any layers of the cache hierarchy, such as between L2 cache and LLC, or between L1 and L2 cache, etc. As shown, memory controller 450 can determine whether the tag of an address matches any of the identified tags in the tag information obtained from memory (diamond box 452). If so, it can also determine whether a small address object indicator is set (diamond box 456). If so, memory controller 450 can store the data slot associated with the matching tag in a given cache line aligned with the right-hand side shown. Data shifting in the cache line using out-of-bounds detection can occur when the next byte to be read or written exceeds the end of the cache line. And note that, depending on whether an underflow or overflow error is to be caught, the data can be aligned / shifted to the beginning or end of the cache line. Depending on the use case, the data slot can be shifted to one end or the other. For example, for stack use, the shift can be to the most valid side. If an overflow occurs by pushing all data to the end of a cache line, the buffer overflow can be detected at the byte level because one more byte is read beyond the end of the buffer, and another cache line is read. When this subsequent adjacent cache line read occurs, it is provided to the memory controller for the adjacent cache line, and the memory controller determines that the tag does not match the previous cache line, thus detecting corruption. The direction in which a shift occurs for a particular cache line can be configured as part of a tag configuration stored in (e.g., ECC) memory, or alternatively, can be indicated by another address bit similar to a small object indicator bit indicating the expected direction of the shift operation.
[0039] If there is no match between the tag at the address and any of the tag identifiers received from the memory during memory loading, in one embodiment, the memory controller 450 may prevent the loading of the cache line, or in another embodiment, the memory controller 450 may load the cache line with random data or garbage data (i.e., data not indicating the corresponding physical address stored in the memory), which can provide a defense against attackers trying to guess the tag value, but does not reveal whether there is a tag match.
[0040] Figure 5The block diagram 500 illustrates an extended virtual memory address 502, wherein an identifier label 504 (e.g., a color label) can be stored in various locations within the virtual memory address. The identifier label 504 can occupy one or more bits within the virtual memory address 502, such that the virtual memory address 502 includes one or more bits above the identifier label 504 and one or more bits between the identifier label and the portion of the virtual memory address that is translated into a physical address (e.g., via a translation backing buffer).
[0041] Address encoding / encryption
[0042] return Figure 1A The processor 112 can be configured to encrypt and decrypt virtual / linear addresses (e.g., virtual address 130), any portion thereof, any other address (direct or indirect), and / or any portion thereof, and can also, or alternatively, use encryption circuitry 122 to encrypt and decrypt new data 128, cached data 132, and / or stored data 138.
[0043] Figure 6 yes Figure 1A and Figure 1B Another block diagram of processor 112 illustrates processor core 118, cache 120, and secure memory access circuitry 600 according to an embodiment where virtual addresses can be encrypted. Secure memory access circuitry 600 may use or include, for example... Figure 1A The encryption circuit represented by the encryption circuit 122 shown may use or include other encryption circuits, but for convenience it is shown to include encryption circuit 658 and decryption circuit 654.
[0044] In an embodiment, the secure memory access circuit 600 utilizes metadata about an address (e.g., virtual address 130), which is encoded into memory tag bits (e.g., memory tag 142A) or within the address or in other bits associated with the address (e.g., non-standard bits of a 64-bit address, or, for example, an address range reserved by the operating system such that the corresponding higher-order bits of the address range can be used to store metadata), to protect the memory location pointed to by the address and / or provide access control to the memory location. For example, the metadata encoding and decoding provided by the secure memory access circuit 600 can prevent the address from being manipulated to cause a buffer overflow, and / or can prevent program code from accessing memory it does not have access permission to.
[0045] In one embodiment, the secure memory access circuitry 600 includes address encoding circuitry 652, which can be invoked when memory is allocated in any of a variety of different ways (e.g., by the operating system, in the heap) and provided to an executable program, including by using functions such as malloc, alloc, or new functions, or implicitly via the loader, or statically by the compiler, etc. As a result, the encoded address pointing to the allocated memory is encoded with address metadata.
[0046] Address metadata can include valid range metadata. Valid range metadata allows the executable program to manipulate the value of an address within its valid range (e.g., by performing pointer arithmetic on the plaintext portion of a pointer), but it can corrupt the address if memory is accessed using an address outside its valid range (e.g., by affecting the ciphertext portion of a pointer used as part of a cipher's tuning input or other bits of the pointer). Alternatively or additionally, valid range metadata can be used to identify the valid code range, such as the range of memory that the program code is allowed to access (e.g., encoded range information can be used to set an explicit range on a register). Other information that can be encoded in address metadata includes access restrictions on the address (e.g., whether the address can be used for writing, execution, or only reading the referenced memory).
[0047] In an embodiment, the secure memory access circuitry 600 includes an address decoding circuitry 662, which can be invoked to verify encoded metadata in memory read and write operations utilizing processor instructions such as MOV, where general-purpose registers are used as memory addresses to read values from or write values to memory (e.g., load / store), and in other operations involving “use” of memory (such as control transfer instructions, e.g., CALL / JMP, etc.) and / or any instructions that may employ memory operands. Indirect (e.g., encoded virtual / linear) memory addresses used for memory access are first decoded and / or decrypted by the processor to obtain the correct virtual / linear memory address.
[0048] In embodiments, during (or within) a memory allocation operation (e.g., "malloc"), memory allocation circuitry (e.g., memory management code within a privileged system component in system memory) can allocate a memory range for a buffer and return an address and corresponding metadata (e.g., range and / or license metadata). For example, the memory allocation circuitry can encode plaintext range information in the address (e.g., in unused / non-standard bits before encryption) or provide the metadata as one or more separate parameters to the instruction, where the parameters(s) specify range and / or code license information. Therefore, according to embodiments, the memory allocation circuitry can invoke address encoding circuitry 652. Address encoding circuitry 652 includes range rule circuitry 654 and address adjustment circuitry 656, which, as described below, encode the address with metadata (e.g., range and / or license metadata) and "adjustment". Address encoding circuitry 652 can store the metadata in the unused portion of the address (e.g., non-standard bits of a 64-bit address).
[0049] To determine the valid range metadata, the range rule circuit 654 can select the valid range metadata to indicate the upper limit of the size of the buffer referenced by the address. The address adjustment circuit 656 can adjust the valid range metadata as needed, such that as long as the address points to a memory location within the valid range indicated by the range metadata, the higher address bits (e.g., the most significant bit) of the address within the address range will not change. This allows the address to be manipulated (e.g., by software performing arithmetic operations, etc.), but only if the manipulation will not cause the address to go out of the valid range (e.g., by an overflow buffer). In other words, the processor will take the adjustment value and add it to the address (pointer) value, and memory access is permitted as long as the operation does not affect the ciphertext of the address (or the bits used as part of the adjustment). In an embodiment, the adjustment value itself can be encrypted as a portion of the encoded address to prevent speculation that an attacker controls the adjustment value of the address.
[0050] Address encoding circuit 652 can use valid range metadata to select a portion of the address to be encrypted. Encryption circuit 658 can use a secret key (e.g., Figure 1A The address decoding circuit 662 uses a secret key (154) and fine-tuning to encrypt selected portions of the address (and, in some embodiments, tuning and / or identification tags), as further described below. During memory access operations (e.g., read, write, or execute operations), the address decoding circuit 662 can decode the previously encoded address. To do this, the decryption circuit 664 can use the secret key and fine-tuning to decrypt the encrypted portions of the address (and, in some embodiments, encrypted tuning and / or encrypted identification tags), as further described below.
[0051] Address recovery circuit 666 can restore an address to its original (e.g., canonical) form to recover the original value of the address (e.g., a real, original linear memory address). To do this, address recovery circuit 666 can remove valid range metadata encoded in the unused bits of the address (e.g., restore the unused bits to their original form). If the address is successfully decoded, the memory access operation is successfully completed. However, if the encoded address has been manipulated (e.g., by software) so that its value falls outside the valid range indicated by the range metadata (e.g., an overflow buffer), the address will be corrupted as a result of the decryption process performed by decryption circuit 664. The corrupted indirect address will cause an error (e.g., a general protection error). In this way, secure memory access circuit 650 enables the processor to provide access control and address security against buffer overflow attacks and similar exploits.
[0052] Now for reference Figure 7 In some embodiments, the computer system may establish a computing environment 710 (e.g., a native and / or virtual runtime or "execution" environment) during operation. Various modules depicted in environment 710 may be embodied as hardware, firmware, software, or a combination thereof. In environment 710, a user-space application 734 (or a privileged system component 742, e.g., during the loading of user-space application 734) may periodically issue a memory allocation 702 during operation of the computer system. The memory allocation 702 may be transformed (e.g., compiled or interpreted) by the memory allocation circuitry 746 of the privileged system component 742 as needed before being passed to the processor (e.g., processor 112). In the processor, in response to the memory allocation 702 (e.g., in place of a conventional "malloc" instruction), address encoding circuitry 652 is invoked. As described herein, given that a regular malloc instruction simply allocates memory and returns an (unprotected) pointer, address encoding circuitry 652 encodes address 704, which includes metadata 705 (e.g., range and / or permission information, which is already encoded in plaintext in the address (without encryption applied by the processor), or as a separate parameter specifying the range of the instruction), and returns the encoded address 706.
[0053] Similarly, user-space application 734 or privileged system component 742 may periodically issue memory access 708, which may be handled by the processor as a processor instruction (e.g., MOV instruction) that reads from memory and writes to a register or reads from a register and writes to memory. Using the MOV instruction as an example, secure movement circuit 660 performs the memory access only after a successful call to address decoding circuit 662. Although secure movement circuit 660 and address decoding circuit 662 are in... Figure 6 and Figure 7While shown as separate modules, it should be understood that the address decoding circuitry 662 can be incorporated into the secure move circuitry 660 or implemented separately. Furthermore, it should be understood that the address decoding circuitry 662 can be incorporated into other types of instructions (e.g., call, JMP, etc.) as alternatives to or supplements to the MOV instruction, or referenced by other types of instructions. For example, control transfer instructions such as call and JMP can load the code at an encoded address to execute into the processor's program counter register (e.g., the instruction pointer or RIP, where the RIP is the instruction pointer register used for instruction-relative addressing in 64-bit code). The instruction pointer register can then be queried by the program, and as a result, the current program counter address will be in encoded form (an offset to the current program counter location).
[0054] If address decoding circuit 662 successfully decodes the encoded address 706, the original address 704 is returned to privileged system component 742 and memory access is completed (716), or program execution begins at the new program counter location (in the case of a change in control flow). If the encoded address 706 is not successfully decoded, an error is caused (718).
[0055] Now for reference Figure 8A and Figure 8B Examples of methods 802 and 820 for performing a memory allocation process are shown. Parts of methods 802 and 820 may be executed by the hardware, firmware, and / or software of a computer system (e.g., by a privileged system component 742 that performs memory allocation circuitry 746). Figure 8A In this method, 802 begins in response to a call for memory allocation from calling code (e.g., privileged system component 742 or user-space application 734). In box 810, the computer system determines whether the calling code is authorized to allocate memory. To do this, the computer system may utilize a set of processor registers to record the location of the most recently taken code branch, such as the Last Branch Record (LBR). For example, to determine the calling code (e.g., the code that calls a function), the function may query the LBR to view the branch history. Alternatively, the function may query the call stack for the return address (however, the return address on the stack may not be as secure as data stored in processor registers). If the computer system determines that the calling code is not authorized to allocate memory, an error is caused in box 812. If the computer system determines that the calling code is authorized to allocate memory, the computer system proceeds to box 814 and initiates a secure memory allocation using the techniques disclosed herein. Thus, the computer system proceeds from box 814 to the starting point of method 900. Figure 9 It is shown in the figure and described below.
[0056] exist Figure 8BIn this method, method 820 begins in response to the output of the encoded address at block 924 of method 900. In block 822, the computer system returns an encoded version of the address (e.g., encoded address 706) to the input... Figure 8A In box 814, the call code initiates a memory allocation. In box 824, the call code uses an encoded address to access the allocated memory (e.g., a buffer). In doing so, the call code can change or modify the encoded address, for example, by performing an arithmetic operation on the encoded address. Therefore, subsequent read or write operations by the call code can trigger access to... Figure 10 The execution of the method is as follows.
[0057] Now for reference Figure 9 This illustrates an example of a method 900 for protecting addresses. Parts of method 900 can be executed by the hardware, firmware, and / or software of a computer system (e.g., by processor 112 calling address encoding circuitry 652). Method 900 responds to (e.g., by memory manager modules in...) Figure 8A The process begins with memory allocation (as described in box 814). In box 910, the computer system obtains the address, address range, and other inputs required for the encoded address (e.g., a code block identifier or instruction pointer, as described below). In box 912, the computer system determines the calling code (e.g., ...). Figure 8A The system checks whether the code initiating the memory allocation in box 810 is authorized to access the indirect address (e.g., address 704) received in box 910. To do this, the computer system can perform an access control check by verifying the privilege level information of the calling program of the instruction pointer or the calling program of the calling code, which can be obtained from, for example, the heap manager of the memory manager module. If the computer system determines that the calling code is not authorized to access the address, an error (914) is generated. If the computer system determines that the calling code is authorized to access the address, the computer system proceeds to box 916. In box 916, the computer system determines the unused (e.g., non-standard) address bits of the address to perform address range encoding. To do this, the computer system can simply use the higher (e.g., most significant) unused / non-standard bits of the address. It should be noted that the encoded address does not need to be architecturally non-standard. Instead, the unused / non-standard address can simply be a memory range reserved by, for example, a privileged system component 742 to implement the address encoding disclosed herein.
[0058] In box 918, the computer system creates metadata (e.g., valid range and / or permission data) and stores the metadata in unused / non-standard bits of an address selected in box 916. Schematably, the metadata indicates the upper limit of the size of the buffer pointed to by the address. To create the metadata, the computer system translates the address value to a central location where the highest valid standard address bit remains unchanged for the valid memory range. In some embodiments, the range metadata includes an “exponent” for determining the memory range size as a power of 2. In some cases, “adjustment” is used to force the value to the end of a range of powers of 2, as described below. In other embodiments, adjustment can be used to force the buffer to the beginning of a range of powers of 2 when a buffer “underflow” needs to be resolved (as opposed to a buffer “overflow”). By using the exponent metadata, any memory range of powers of 2 (e.g., 2, 4, 8, 16… 2^64) can be defined.
[0059] The following is a simplified example of range metadata encoding. Address 0000b – 0011b contains the range 0-3, where the higher two bits remain unchanged. However, if the pointer is modified to go to index 4, one of the higher bits will change. Therefore, the valid range metadata can be encoded as [2] (encoding range 4 for the higher two bits), and the valid range metadata can be stored in the higher non-standard bits, for example, “[2] 00xxb”. In this example, the size of the index will be 2 bits (e.g., values [1-4]) to cover the 4-bit address used in the example. Table 1 below shows several additional simplified examples.
[0060]
[0061] Table 1. Examples of Address Encoding
[0062] In Table 1, encoded addresses are represented using a format similar to that used for floating-point formats. In the encoded addresses in the third column of Table 1, the numbers in parentheses, such as [2], are exponents or effective range metadata; the numbers in curly braces, such as {3}, are adjustment values, and the address to the right of the adjustment value indicates unused / non-standard bits where the effective range metadata and the adjustment value are stored. In box 920, the computer system determines the adjustment (or “offset”) to be applied to the effective range and stores the adjustment value in unused / non-standard bits of the indirect address. In some embodiments, the adjustment is used to force the encoded range to the end of a power-of-2 boundary (e.g., to set a specific upper bound for the buffer size). In this way, an encoded version of the original (unencoded) effective address range can be created. The encoded version can be designed such that a minimum number of higher bits over the effective range will be changed (e.g., such that encryption of the higher bits will detect / amplify the modification to the encoded address upon decryption). The encoding is reversible, such that the original expected effective address range can be returned as long as the encoding is modified within the range. In the example above, the decimal range 0-3 (binary 0000b-0011b) can be encoded as [2] {0} 00xxb (where “xx” means that these bits can take any value for the range: 00, 01, 10, 11). In another example, the decimal range 1-4 (0001b-0100b) can be encoded as [2] {-1} 00xxb (where the adjustment is subtracted to keep the higher bits constant). Alternatively, the same decimal range 1-4 (0001b-0100b) can be encoded as [2] {3} 01xxb (this time with the adjustment 3 added to keep the higher bits constant). Using either representation, the encoded version is decoded back to the original address range 1-4. In yet another example, if the buffer size is 4KB, a 10-bit adjustment value with a precision of 4 bytes can be used.
[0063] Other embodiments may use signed adjustment values (e.g., two's complement of 2), where, depending on the sign of the adjustment (+ / -), the buffer can be adjusted to the beginning or end of a power of 2 boundary. Depending on the adjustment sign, such embodiments can prevent buffer overflow or underflow. With 16 bits available in an unused / non-standard address (e.g., in current 64-bit processors), 10 bits of the available bits can be used for adjustment, and the remaining 6 bits can be used for valid range metadata (e.g., exponent value / power of 2). If the exponent value reaches a range exceeding 4KB pages, the adjustment can be multiplied by 2 to allow adjustment of large buffers in the range of powers of 2 or even greater (note that in some embodiments, 4096 bytes are completely covered by a 10-bit adjustment value, which allows the adjustment to "adjust" the buffer to end with the last 4 bytes of a word in a 4KB page before the higher (power of 2) bits are changed). Such adjustments (e.g., adding 1) will adjust the buffer position by 4 bytes at a time. In other embodiments, any other choice of initial adjustment size and word size is possible. In another example, if the exponent is 13, the adjustment value can be multiplied by 2 so that the adjustment will still cover the full range of powers of 2 (in this case, if 8 bytes are adjusted at a time, that's two 4KB pages), and so on (e.g., an exponent value of 14 means the adjustment value is multiplied by 4, and an exponent value of 15 means the adjustment value is multiplied by 8, and so on, thus allowing the adjustment to cover the full range of powers of 2).
[0064] In block 922, the computer system encrypts a portion of an address, where the portion of the address to be encrypted is determined by effective range metadata (e.g., powers of 2) and a modifier value. The effective range metadata determines the number of the most significant address bits of the encoded address to be encrypted (e.g., down to a minimum number, so that some address bits can always be encrypted). In some embodiments, the modifier value and / or an identification tag are also encrypted (e.g., to create a reasonable block size for the block cipher). In some embodiments, the most significant bits of the used bits / standard address identified in the effective range metadata are encrypted using a secret key (e.g., secret key 720), using the effective range metadata (which may or may not include the modifier value) as a fine-tuning. In the illustrated embodiment, the effective range metadata (e.g., powers of 2) is not encrypted because the processor uses the effective range metadata in plaintext to determine the number of bits to be encrypted. However, in the case of a fine-tunable block cipher (and thus affecting the encrypted bits), the effective range metadata (e.g., powers of 2) can be used as a fine-tuning. Other data values that can be used for fine-tuning include: data stored in unused bits of the indirect address, the upper limit of the buffer size, the exponent of the power of 2 boundary chosen as the upper limit of the buffer size, the adjustment value applied to the power of 2 boundary, the code block identifier, instruction pointer data, permission information encoded in metadata, and / or the version number (useful when reassigning / recalling a pointer previously assigned to a program; the version can be maintained by the processor in a register). Examples can use small block ciphers such as Simon, Speck, and PRINCE ciphers (e.g., encrypting 32-bit data) because the block size corresponds to the size of a (fitted) 64-bit virtual / linear memory address / pointer. As an addition or alternative to encryption, the cipher can be used to generate a Message Authentication Code (MAC), which can be truncated and stored in unused, non-standard linear / virtual address bits; this cipher MAC can be used to detect tampering or modification of the virtual address when manipulated outside the boundaries of the virtual address.
[0065] As used herein, among other things, “fine-tuning” can refer to a second input to a block cipher in addition to the usual plaintext or ciphertext input and key (e.g., secret key 720). Encrypting two higher-order bits allows a computer system to detect when an address has been illegally altered because the encryption algorithm will cause the illegally altered higher bits to produce a random bit sequence that is uncertain to an attacker. When the illegally altered indirect address is used, the random bit sequence is likely to be incorrect.
[0066] Encryption algorithms using cryptographic patterns such as fine-tunable block ciphers are used to encrypt the portion of the address to be encrypted (e.g., the higher used / standard bits), using effective range metadata and tuning (e.g., in the example above, [2]{-1}) as tuning. Some examples of fine-tunable block ciphers include: XOR-encrypted-XOR (XEX), Liskov, Rivest, and Wagner (LRW), and XEX-based fine-tuning codebook patterns (XTS) that exploit ciphertext theft. Other bit-diffusion methods can be used in which any single bit change in the ciphertext results in a change across the entire decrypted plaintext. If desired, alternative embodiments can trade performance for security by using non-cryptographic methods that still achieve reasonable bit-diffusion similar to block ciphers.
[0067] The cipher chosen for encryption can be implemented in hardware using an algorithm with a bit-selectable block size (e.g., SPECK), or an algorithm with a fixed block size that allows fine-tuning using the remaining unencrypted bits (e.g., extra bits beyond the fixed block size). In some embodiments, the cipher has sufficient bit spread such that any bit change made to the encrypted address bits will equally affect (cascade through) all bit positions upon decryption. This provides the basis for any corrupted address given any change or boundary violation. By using this method, if an attacker attempts to tamper with metadata (e.g., exponent or regulation values or identification tags, or the most significant encrypted bit), the resulting decoded address will be corrupted. In a 64-bit address space, address corruption will produce errors with a high probability, allowing address corruption (as well as pointer access or boundary violation) to be caught by privileged system components 742 (e.g., operating system / executor / VMM / alternate mode / debug trace / management processor / subsystem, etc.).
[0068] In the examples above, if the address / pointer value is increased by more than 3, modifying the address / pointer in this way will corrupt the higher-order bits and lead to nondeterministic memory accesses that are not under the attacker's control. For example, exceeding the buffer size by one byte will result in a random memory access that will cause a page fault with a high probability. This is due to the bit-spreading property of the cryptography, which ensures that even a change to a single bit will spread across all the most significant bits. As a result of regulation at the end of the range of values forced to powers of 2, buffer overflow leads to corruption of the encrypted address bits.
[0069] Cryptographic tuning can be extended to include code block identifiers to provide access control for these access-controlled code blocks (e.g., the block from which the calling code is located) that are allowed to access memory using indirect addresses / pointers. Furthermore, instruction pointer information (which may be referred to as the "program counter") or range can be encoded as part of the pointer cryptographic tuning. Instruction pointer information can be used to restrict the range from which code can access which data. For example, all code can be arranged within a fixed memory block within a 64-bit address space. Code with similar access permissions can be grouped together in the same block or range. Tuning can include the identifier of the memory block from which the instructions are being executed. In this way, code and data can be associated and access-controlled, preventing attackers from different code blocks from using cryptographic pointers to access data in the protected block, because if an incorrect code block identifier is used as tuning, the cryptographic pointer will not be correctly decoded. Furthermore, when a code block calls, for example, malloc to allocate memory to itself, malloc can use the memory block from which the calling code returns a cryptographic address to ensure private access to the allocated memory (provided that the allocated memory is not freed and then reassigned to another code block). Alternatively, other methods of identifying the calling code can be used in the fine-tuning, such as a protection key. Furthermore, metadata used by processor 112 to control access to memory for read / write / execute access can be used as part of the fine-tuning for encrypted address bits. Additionally, the instruction pointer itself can be represented as (e.g., range-based) an encoded pointer. In this case, metadata and encrypted address bits can be used as part of the "fine-tuning" that identifies the access data pointer or the code block requesting memory allocation / dispatch.
[0070] Now for reference Figure 10 This illustrates an example of a method 1000 for decoding addresses. Parts of method 1000 can be executed by the hardware, firmware, and / or software of a computer system (e.g., by processor 112 invoking secure movement circuitry 660 and / or address decoding circuitry 662). Method 1000 begins in response to a memory access operation (e.g., an MOV instruction) such as a read, write, or execute operation. Table 2 below provides some illustrative examples of MOV instructions that can use the address encoding techniques disclosed herein. Of course, different processor architectures may refer to the “MOV” function with different names or different options / parameters for the instructions. Thus, the disclosed embodiments are applicable to all types of “MOV” functions across different architectures, regardless of the terminology used to refer to such functions. Furthermore, the MOV instruction is an example, and any instruction that can access memory to read / write data can be applied to the address encoding and decoding methods disclosed herein.
[0071]
[0072] Table 2. Example MOV instructions
[0073] In box 1010, the computer system obtains an encoded address (e.g., encoded address 706, which may be obtained from a register). In box 1012, the computer system determines whether the encoded address obtained in box 1010 has unused or non-standard bits. If the computer system determines that the encoded address does not have unused / non-standard bits (e.g., the address does not fall within a non-standard or otherwise reserved address range, regardless of whether the address range is 32-bit, 64-bit, 128-bit, or whatever range an alternative architecture might require), an error (1014) is caused. If the computer system determines that the encoded address has unused / non-standard bits (e.g., the address falls within a standard or reserved address range), the computer system proceeds to box 1016. In box 1016, by using... Figure 9 The corresponding decryption algorithm for the encryption algorithm used in box 922, and using the decryption algorithm provided by... Figure 9 Using the same secret key and fine-tuning as the encryption algorithm in box 922, the computer system decrypts the encrypted portion of the encoded address. In box 1018, the computer system "undoes" the adjustment of the range metadata in the decrypted address (e.g., by subtracting the decrypted adjustment value in unused / non-standard bits from the full decrypted value of the address). In box 1030, the computer system returns the decrypted address to its original (e.g., standard) form by, for example, removing unused / non-standard bits. In box 1022, the computer system uses the decoded address output from box 1020 as a "real" (e.g., virtual or linear) memory address (e.g., as a pointer). In box 1024, the computer system determines whether the decoded address used as a memory address / pointer at box 1022 is a corrupted address. If the decoded address is corrupted, an error is caused (1014). If the decoded address is not corrupted, in box 1026, the computer system uses the decoded address as a memory address / pointer to successfully complete the memory access operation. In this manner, method 1000 allows a computer system to verify range-encoded indirect addresses and performs an embedding range check before translating the range-encoded addresses into actual memory addresses. Furthermore, invalid adjustment values (e.g., adjustment values in ranges exceeding powers of 2) can be used to determine with some probability when corruption occurs, and invalid address values or metadata can be retained to detect when corruption occurs. Even if corruption is not detected, the resulting address will be indeterminate (and therefore unusable) for an attacker.
[0074] Label and address encoding / encryption
[0075] Figure 11This illustrates an embodiment where the memory tag is encrypted using an encrypted portion of the address. The embodiment where the memory tag is included within the encrypted portion of the address allocated by a memory allocator (e.g., malloc) prevents an attacker from manipulating the ciphertext portion of the address without simultaneously affecting the tag value. Therefore, an attacker cannot independently take a fixed address and begin guessing the tag bits. Encryption alters both the tag value and the encrypted address bits, resulting in a random tag associated with a random address.
[0076] In embodiments where the memory tag is included within the encrypted portion of the cryptographic pointer, an attacker can prevent the tag from being guessed. If any part of the encrypted pointer is modified, all decrypted bits will be randomized. The decrypted address and the tag will both be different; therefore, an attacker cannot associate the tag with the encrypted address because both will change whenever an attacker attempts to modify the ciphertext and speculate on the result.
[0077] Example Implementation
[0078] In one embodiment, a processor includes a decoder, a cache, an address translation circuit, a cache controller, and a memory controller. The decoder decodes instructions. The instructions specify a first address associated with a data object, the first address having a first memory tag. The address translation circuit translates the first address into a second address, the second address identifying a memory location of the data object. A comparator compares the first memory tag with a second memory tag associated with the second address. The cache controller detects a cache miss associated with the memory location. The memory controller loads the data object from the memory location into the cache in response to the comparator detecting a match between the first and second memory tags and the cache controller detecting a cache miss.
[0079] In various embodiments, any one or any combination of the following may also be applicable. The first address may be a virtual address, and the second address may be a physical address. The memory controller may also be configured to prevent loading of a cache line corresponding to a memory location until the comparator has detected a match. The memory controller may also be configured to load data that does not indicate a data object into the cache line corresponding to the memory location in response to the comparator detecting a mismatch between the first memory tag and the second memory tag. The processor may also include a pollution queue circuit for setting an indicator to indicate that the cache line corresponding to the memory location is invalid in response to the comparator detecting a mismatch between the first memory tag and the second memory tag. The pollution queue circuit may also be configured to provide the software with an indication that the cache line is invalid only after the result of the instruction has been committed. The processor may also include pointer-safe circuitry for defining the first memory tag. The processor may also include encryption circuitry for cryptographically protecting the data object at least partially based on the first memory tag. The first memory tag may include an identification tag for identifying the type, function, memory location, or purpose of the data object. The encryption circuitry may be configured to use at least a portion of the memory tag to at least partially define the fine-tuning input of an encryption algorithm. The first memory tag may include an encryption tag, and the encryption circuitry may also be used to identify one of a plurality of encryption keys using the encryption tag. The first memory tag may include a small object tag to indicate whether a cache line associated with a memory location is used to include multiple data objects. The small object tag can be used to implement memory tagging at the sub-cache line granularity. The first memory tag includes a boundary distance tag to indicate the permissible distance between the first memory address and the data object. The processor may also include integrity verification circuitry for generating an integrity verification value based at least in part on the first address and the encrypted value of the data object. The processor may also include pointer security circuitry for detecting tampering with the first address based at least in part on the integrity verification value.
[0080] In one embodiment, a processor includes: a decoder for decoding instructions for allocating a memory region to a software program; and an execution unit for executing the instructions. The execution unit includes: a range rule circuit for determining a valid range of the memory region; an address adjustment circuit for determining a first plurality of address bits and a second plurality of address bits, the first plurality of address bits to be used by the software program to manipulate addresses within the valid range, the second plurality of address bits for including a memory tag to indicate access permission; and an encryption circuit for encrypting at least a portion of the address and the memory tag to generate an encrypted address to be returned to the software program.
[0081] In one embodiment, a processor includes: a decoder for decoding instructions specifying an encrypted first address associated with a data object; a decryption circuit for decrypting the encrypted first address to generate a decrypted first address and a decrypted first memory tag; a cache; an address translation circuit for translating the decrypted first address into a second address, the second address identifying a memory location of the data object; a comparator for comparing the first memory tag with a second memory tag associated with the second address; a cache controller for detecting a cache miss associated with the memory location; and a memory controller for loading the data object from the memory location into the cache in response to the comparator detecting a match between the first memory tag and the second memory tag and the cache controller detecting a cache miss.
[0082] In one embodiment, a processor includes: a decoder for decoding an instruction specifying a first address associated with a data object, the first address having a first memory tag; a cache; an address translation circuit for translating the first address into a second address, the second address identifying a memory location of the data object; a comparator for comparing the first memory tag with a second memory tag associated with the second address; a cache controller for detecting a cache miss associated with the memory location; and means for loading the data object from the memory location into the cache in response to the comparator detecting a match between the first memory tag and the second memory tag and the cache controller detecting a cache miss.
[0083] In various embodiments, any one or any combination of the following may also be applicable. The means may also be configured to prevent loading of the cache line corresponding to the memory location until the comparator has detected a match. The means may also be configured to load data that does not indicate a data object into the cache line corresponding to the memory location in response to the comparator detecting a mismatch between the first memory tag and the second memory tag. The processor may also include a pollution queue means for setting an indicator to indicate that the cache line corresponding to the memory location is invalid in response to the comparator detecting a mismatch between the first memory tag and the second memory tag. The pollution queue means may also be configured to provide the software with an indication that the cache line is invalid only after the result of the instruction has been committed.
[0084] In one embodiment, a processor includes: a decoder for decoding instructions for allocating a memory region to a software program; an execution unit for executing the instructions, the execution unit including: a range rule means for determining a valid range of the memory region; an address adjustment means for determining a first plurality of address bits and a second plurality of address bits, the first plurality of address bits to be used by the software program to manipulate addresses within the valid range, the second plurality of address bits for including a memory tag to indicate access permission; and an encryption means for encrypting at least a portion of the address and the memory tag to generate an encrypted address to be returned to the software program.
[0085] In one embodiment, a processor includes: a decoder for decoding instructions specifying an encrypted first address associated with a data object; a decryption circuit for decrypting the encrypted first address to generate a decrypted first address and a decrypted first memory tag; a cache; an address translation circuit for translating the decrypted first address into a second address for identifying a memory location of the data object; a comparator for comparing the first memory tag with a second memory tag associated with the second address; a cache controller for detecting a cache miss associated with the memory location; and means for loading the data object from the memory location into the cache in response to the comparator detecting a match between the first memory tag and the second memory tag and the cache controller detecting a cache miss.
[0086] In one embodiment, a method includes: decoding an instruction for specifying a first address associated with a data object, the first address having a first memory tag; transforming the first address into a second address for identifying a memory location of the data object; comparing the first memory tag with a second memory tag associated with the second address; detecting a cache miss associated with the memory location; and loading the data object from the memory location into a cache in response to detecting a match between the first memory tag and the second memory tag and detecting a cache miss.
[0087] In various embodiments, any one or any combination of the following may also be applicable. The first address may be a virtual address, and the second address may be a physical address. The method may further include preventing loading of a cache line corresponding to a memory location until a match is detected. The method may further include loading data that does not indicate a data object into the cache line corresponding to the memory location in response to detecting a mismatch between a first memory tag and a second memory tag. The method may further include setting an indicator to indicate that the cache line corresponding to the memory location is invalid in response to the comparator detecting a mismatch between the first memory tag and the second memory tag. The method may further include providing the software with an indication that the cache line is invalid only after the result of the instruction has been committed.
[0088] In one embodiment, a method includes: decoding an instruction for allocating a memory region to a software program; executing the instruction, the execution including determining a valid range of the memory region; determining a first plurality of address bits to be used by the software program to manipulate addresses within the valid range; determining a second plurality of address bits for including a memory tag to indicate access permission; encrypting at least a portion of the address and the memory tag to generate an encrypted address; and returning the encrypted address to the software program.
[0089] In one embodiment, a method includes: decoding an instruction for specifying an encrypted first address associated with a data object; decrypting the encrypted first address to generate a decrypted first address and a decrypted first memory tag; transforming the decrypted first address into a second address for identifying a memory location of the data object; comparing the first memory tag and a second memory tag associated with the second address; detecting a cache miss associated with the memory location; and loading the data object from the memory location into a cache in response to detecting a match between the first memory tag and the second memory tag and detecting a cache miss.
[0090] In an embodiment, an apparatus may include means for performing any of the functions and / or methods described above. In an embodiment, a machine-readable tangible medium may store instructions that, when executed by a machine, cause the machine to perform any of the methods described above.
[0091] Exemplary cores, processors, and system architectures
[0092] Embodiments of the invention have been described and depicted with reference to processor 112, which may represent any of a number of different processors in which the invention is embodied in different ways and / or for different purposes. These processors and cores, as described below, may include hardware such as caches and branch predictors that improve performance but may make the processor and / or core more vulnerable to attacks that can be defended against by analyses according to embodiments of the invention.
[0093] For example, implementations of a core (e.g., core 118) in a processor embodied in the present invention may include: a general-purpose ordered core intended for general-purpose computing; a high-performance general-purpose out-of-order core intended for general-purpose computing; and a dedicated core intended primarily for graphics and / or scientific (throughput) computing. Implementations of a processor embodied in the present invention may include: a central processing unit (CPU) including one or more general-purpose ordered cores and / or one or more general-purpose out-of-order cores intended for general-purpose computing; and a coprocessor including one or more dedicated cores intended primarily for graphics and / or scientific (throughput) computing. Such different processors result in different computer system architectures, which may include: a coprocessor on a separate chip from the CPU; a coprocessor in the same package as the CPU but on a separate die; a coprocessor on the same die as the CPU (in which case such a coprocessor is sometimes referred to as dedicated logic or a dedicated core, such as integrated graphics and / or scientific (throughput) logic); and a system-on-a-chip (SoC) that may include the described CPU (sometimes referred to as application cores or application processors), the coprocessors described above, and additional functionality on the same die.
[0094] The following describes an exemplary core architecture, followed by an exemplary processor and computer architecture. Each processor may include one or more cores, wherein each core and / or combination of cores may be constructed and designed to execute one or more threads, processes, or other sequences of instructions at different times. Core architecture and design techniques may prepare for and / or support concurrent execution of multiple threads according to any or any other approach in a class of methods known as simultaneous (or symmetric) multithreading (SMT).
[0095] Furthermore, as mentioned above and explained in more detail below, embodiments of this disclosure can be applied to any type of processor or processing element, including: general-purpose processors, server processors or processing elements used in server environments, coprocessors (e.g., security coprocessors), high-throughput MIC processors, GPGPUs, accelerators (such as, for example, graphics accelerators or digital signal processing (DSP) units, cryptographic accelerators, fixed-function accelerators, machine learning accelerators, networking accelerators, or computer vision accelerators), field-programmable gate arrays, or any other processor or processing device. One or more processors can be implemented on one or more chips. One or more processors can be part of one or more substrates, and / or can be implemented on one or more substrates using any of a variety of process technologies (such as, for example, BiCMOS, CMOS, or NMOS). The processors and processing devices listed above and described herein are exemplary; as explained herein, this disclosure applies to any processor or processing device.
[0096] Furthermore, as described above and in more detail below, embodiments of this disclosure can be applied to processors or processing elements using a variety of instruction sets and instruction set architectures, including, for example: the x86 instruction set (optionally including extensions with updated versions added); the MIPS instruction set of MIPS Technologies, Inc., Sunnyvale, California; the ARM instruction set of ARM Holdings, Inc., Sunnyvale, California (with optional additional extensions such as NEON); IBM's "Power" instruction set; or any other instruction set, including both RISC and CISC instruction sets. The instruction sets and instruction set architectures listed above and described herein are exemplary; as explained herein, this disclosure applies to any instruction set or instruction set architecture.
[0097] Exemplary core architecture
[0098] Figure 12A This is a block diagram illustrating both an exemplary ordered pipeline and an exemplary out-of-order release / execution pipeline for register renaming, according to embodiments of the present invention. Figure 12B This is a block diagram illustrating both an exemplary embodiment of an ordered architecture core to be included in a processor according to an embodiment of the present invention and an exemplary out-of-order release / execution architecture core with register renaming. Figures 12A-12B The solid-line boxes in the diagram illustrate ordered pipelines and ordered cores, while the optionally added dashed-line boxes illustrate register-renamed, out-of-order release / execution pipelines and cores. Since the ordered aspect is a subset of the out-of-order aspect, the out-of-order aspect will be described.
[0099] exist Figure 12AIn the processor pipeline 1200, there are fetch stage 1202, length decoding stage 1204, decoding stage 1206, allocation stage 1208, renaming stage 1210, scheduling (also known as dispatch or issue) stage 1212, register read / memory read stage 1214, execution stage 1216, write-back / memory write stage 1218, exception handling stage 1222, and commit stage 124.
[0100] Figure 12B A processor core 1290 is shown, which includes a front-end unit 1230 coupled to an execution engine unit 1250, and both are coupled to a memory unit 1270. Core 1290 can be a Reduced Instruction Set Computing (RISC) core, a Complex Instruction Set Computing (CISC) core, a Very Long Instruction Word (VLIW) core, or a hybrid or alternative core type. Alternatively, core 1290 can be a dedicated core, such as, for example, a network or communications core, a compression engine, a coprocessor core, a general-purpose computing graphics processing unit (GPGPU) core, a graphics core, etc. For example, as explained above, core 1290 can be any member of a set including: a general-purpose processor, a server processor or processing element used in a server environment, a coprocessor (e.g., a security coprocessor), a high-throughput MIC processor, a GPGPU, an accelerator (such as, for example, a graphics accelerator or digital signal processing (DSP) unit, a cryptographic accelerator, a fixed-function accelerator, a machine learning accelerator, a networking accelerator, or a computer vision accelerator), a field-programmable gate array, or any other processor or processing device.
[0101] Front-end unit 1230 includes branch prediction unit 1232 coupled to microoperation cache 1233 and instruction cache unit 1234 coupled to instruction translation lookup buffer (TLB) 1236 coupled to instruction fetch unit 1238 coupled to decoding unit 1240. Decoding unit 1240 (or decoder) decodes instructions and generates one or more microoperations, microcode entry points, microinstructions, other instructions, or other control signals as output, which are decoded from, or otherwise reflect, the original instructions or derived from them. Microoperations, microcode entry points, microinstructions, etc., can be stored at least in microoperation cache 1233. Decoding unit 1240 can be implemented using various mechanisms. Examples of suitable mechanisms include, but are not limited to, lookup tables, hardware implementations, programmable logic arrays (PLAs), microcode read-only memory (ROM), etc. In one embodiment, core 1290 includes a microcode ROM or other medium (e.g., in decoding unit 1240, or otherwise within front-end unit 1230) storing microcode for certain macro instructions. Microoperation cache 1233 and decoding unit 1240 are coupled to rename / allocator unit 1252 in execution engine unit 1250. In various embodiments, a microoperation cache such as 1233 may also be, or alternatively, referred to as an op cache, u-op cache, uop cache, or µop cache; and a microoperation may be referred to as micro-op, u-op, uop, and µop.
[0102] Execution engine unit 1250 includes a rename / allocator unit 1252 coupled to a retirement unit 1254 and a set 1256 of one or more scheduler units. The scheduler units 1256 represent any number of different schedulers, including reserved stations, central instruction windows, etc. The scheduler units 1256 are coupled to physical register file units 1258. Each physical register file unit in the physical register file units 1258 represents one or more physical register files, where different physical register files store one or more different data types, such as scalar integers, scalar floating-point numbers, compressed integers, compressed floating-point numbers, vector integers, vector floating-point numbers, status (e.g., an instruction pointer as the address of the next instruction to be executed), etc. In one embodiment, the physical register file units 1258 include vector register units, write mask register units, and scalar register units. These register units can provide architectural vector registers, vector mask registers, and general-purpose registers. Multiple physical register file units 1258 are overlapped by retirement units 1254 to illustrate various ways in which register renaming and out-of-order execution can be implemented (e.g., using multiple reordering buffers and multiple retirement register files; using multiple future files, multiple history buffers, and multiple retirement register files; using register mappings and register pools; etc.). Retirement units 1254 and multiple physical register file units 1258 are coupled to multiple execution clusters 1260. Multiple execution clusters 1260 include a set 1262 of one or more execution units and a set 1264 of one or more memory access units. Execution units 1262 can perform various operations (e.g., shift, addition, subtraction, multiplication) and can perform operations on various data types (e.g., scalar floating-point, compressed integer, compressed floating-point, vector integer, vector floating-point). While some embodiments may include several execution units dedicated to a particular function or set of functions, other embodiments may include only one execution unit or multiple execution units that all perform all functions. The scheduler unit 1256, physical register file unit 1258, and execution cluster 1260 are shown as potentially multiple because some embodiments create separate pipelines for certain types of data / operations (e.g., scalar integer pipelines, scalar floating-point / compact integer / compact floating-point / vector integer / vector floating-point pipelines, and / or memory access pipelines each having their own scheduler unit, physical register file unit, and / or execution cluster—and in the case of separate memory access pipelines, some embodiments are implemented where only the execution cluster of that pipeline has multiple memory access units 1264). It should also be understood that, in the case of using separate pipelines, one or more of these pipelines may be out-of-order deployments / executions, and the remaining pipelines may be ordered deployments / executions.
[0103] A set of memory access units 1264 is coupled to a memory unit 1270, which includes a data TLB unit 1272, which is coupled to a data cache unit 1274, which is coupled to a Level 2 (L2) cache unit 1276. In one exemplary embodiment, the memory access unit 1264 may include a load unit, a memory address unit, and a memory data unit, each of which is coupled to the data TLB unit 1272 in the memory unit 1270. An instruction cache unit 1234 is also coupled to the Level 2 (L2) cache unit 1276 in the memory unit 1270. The L2 cache unit 1276 is coupled to one or more other levels of cache and ultimately to main memory.
[0104] As an example, the exemplary register renaming out-of-order release / execution core architecture can implement pipeline 1200 as follows: 1) Instruction fetch 1238 executes fetch stage 1202 and length decoding stage 1204; 2) Decoding unit 1240 executes decoding stage 1206; 3) Rename / allocator unit 1252 executes allocation stage 1208 and rename stage 1210; 4) (multiple) scheduler units 1256 execute scheduling stage 1212; 5) (multiple) physical register file units 1258 and memory unit 1270 execute register read / memory read stage 1214; execution cluster 1260 executes execution stage 1216; 6) memory unit 1270 and (multiple) physical register file units 1258 execute write-back / memory write stage 1218; 7) each unit may involve exception handling stage 1222; and 8) retirement unit 1254 and (multiple) physical register file units 1258 execute commit stage 1224.
[0105] Core 1290 may support one or more instruction sets (e.g., the x86 instruction set (with some extensions added with newer versions); the MIPS instruction set of MIPS Technologies, Inc., Sunnyvale, California; the ARM instruction set of ARM Holdings, Inc., Sunnyvale, California (with optional additional extensions such as NEON); IBM's "Power" instruction set; or any other instruction set, including both RISC and CISC instruction sets), including the instructions described herein. In one embodiment, Core 1290 includes logic for supporting compressed data instruction set extensions (e.g., AVX, AVX2, AVX-512), thereby allowing the use of compressed data to perform operations used by many multimedia applications.
[0106] It should be understood that a core may support multithreading (execution of two or more parallel operations or a set of threads) and may accomplish this multithreading in various ways, including time-division multithreading, SMT (e.g., a single physical core providing a logical core for each of the threads in which the physical core is synchronously multithreading), or a combination thereof (e.g., time-division fetching and decoding and subsequent SMT such as with Intel® Hyper-Threading Technology).
[0107] Although register renaming is described in the context of out-of-order execution, it should be understood that register renaming can also be used in ordered architectures. While the illustrated processor embodiment also includes separate instruction and data cache units 1234 / 1274 and a shared L2 cache unit 1276, alternative embodiments may have a single internal cache for both instructions and data, such as, for example, a Level 1 (L1) internal cache or multiple levels of internal caches. In some embodiments, the system may include a combination of internal caches and external caches located outside the core and / or processor. Alternatively, all caches(s) may be located outside the core and / or processor.
[0108] Exemplary core architecture
[0109] Figure 13 This is a block diagram illustrating an out-of-order release / execution processor core that may be included in a processor according to an embodiment of the present invention. Figure 13 In the processor core 1300, there are a front-side unit 1310, an integer unit 1320, a front-side unit 1330, a load memory unit 1340, and a level 2 (L2) cache unit 1350. Provided for illustrative purposes. Figure 13 And thus Figure 13 Various units are shown arranged and named according to one of a variety of methods, which are possible according to embodiments of the invention.
[0110] exist Figure 13In this configuration, the front-end unit 1310 includes a branch prediction unit 1311, a micro-operation cache (op cache) unit 1312, an instruction cache (i cache) unit 1313, a decoding unit 1314, and a micro-operation (micro-op) queue unit 1315. The branch prediction unit 1311 includes branch prediction circuitry, such as a branch target buffer (BTB), for reducing average branch latency, and is coupled to the op cache unit 1312 and the i cache unit 1313. The op cache unit 1312 includes an op cache where micro-operations associated with instructions are cached. The i cache unit 1313 includes an i cache, which in an embodiment may be a 64K quad-way i cache for caching instructions. The i cache unit 1313 is coupled to the decoding unit 1314 to provide cached instructions to be decoded. The decoding unit 1314 includes decoding circuitry, such as an instruction decoder, for decoding instructions. In this embodiment, the front-end unit 1310 can fetch up to four instructions per clock cycle, and the decoding unit 1314 can decode up to four instructions per clock cycle. The op cache unit 1312 and the decoding unit 1314 are each coupled to the micro-operation queue unit 1315 to provide two paths for loading micro-operations into the micro-operation queue unit 1315. The micro-operation queue unit 1315 includes a micro-operation queue, which in this embodiment can dispatch six micro-operations per cycle to one or more execution units.
[0111] In addition, Figure 13In this configuration, integer unit 1320 includes an integer renaming unit 1321; integer scheduler units 1322A, 1322B, 1322C, 1322D, 1322E, and 1322F (collectively referred to as integer scheduler unit 1322); an integer physical register file 1323; arithmetic logic units (ALUs) 1324A, 1324B, 1324C, and 1324D (collectively referred to as ALU 1324); and address generation units (AGUs) 1325A and 1325B (collectively referred to as AGU 1325). Integer renaming unit 1321 is coupled to micro-operation queue unit 1315 to receive one or more micro-operations to be executed, wholly or partially, by one or more of ALU 1324 and / or AGU 1325. Integer renaming unit 1321 includes register renaming circuitry and is also coupled to integer scheduler unit 1322, which in turn is coupled to integer physical register file 1323 to provide integer register renaming. Integer scheduler unit 1322 includes scheduling circuitry for scheduling micro-operations to be executed wholly or partially by one or more of ALU 1324 and / or AGU 1325. Integer physical register file 1323 includes a physical integer register file, which in an embodiment may include 168 physical integer registers. Each of ALU 1324 and AGU 1325 is coupled to physical register file 1323 to receive values to be used as inputs in the execution of a micro-operation and / or to provide values as outputs of the execution of a micro-operation.
[0112] In addition, Figure 13 In this configuration, FP unit 1330 includes an FP renaming unit 1331, an FP scheduler unit 1332, an FP register file 1333, FP multipliers 1334A and 1334B (collectively referred to as FP multipliers 1334), and FP adders 1335A and 1335B (collectively referred to as FP adders 1335). FP renaming unit 1331 is coupled to micro-operation queue unit 1315 to receive one or more micro-operations to be performed wholly or partially by one or more of FP multipliers 1334 and / or FP adders 1335. FP renaming unit 1331 includes register renaming circuitry and is also coupled to FP scheduler unit 1332, which in turn is coupled to FP register file 1333 to provide FP register renaming. The FP scheduler unit 1332 includes scheduling circuitry for scheduling micro-operations to be performed wholly or partially by one or more of the FP multipliers 1334 and / or FP adders 1335. Each of the FP multipliers 1334 and FP adders 1335 is coupled to the FP register file 1333 to receive values to be used as inputs in the execution of the micro-operation and / or to provide values as outputs of the execution of the micro-operation.
[0113] In addition, Figure 13 In this embodiment, the load memory unit 1340 includes a load memory queue unit 1341 and a data cache (d cache) unit 1342. The load memory queue unit 1341 may include any number of load and / or store queues, providing two loads and one store per clock cycle in this embodiment, coupled to AGU 1325 to receive memory addresses for load and / or store operations. The d cache unit 1342 includes a d cache, which in this embodiment may be a 32K eight-way Level 1 (L1) d cache, in which data is cached. The d cache is coupled to integer physical register file 1323, FP register file 1333, and the load memory queue unit 1341 to receive data generated by the execution of micro-operations and to provide data to be used in the execution of micro-operations.
[0114] In addition, Figure 13 In this embodiment, the L2 cache unit 1350 includes an L2 cache, which may be a 512K eight-way cache in which instructions and data are cached.
[0115] Exemplary processor architecture
[0116] Figure 14 This is a block diagram of a processor 1400 according to an embodiment of the present invention, which may have more than one core, may have an integrated memory controller, and may have an integrated graphics device. Figure 14 The solid box in the figure shows a processor 1400 having a single core 1402A, a system agent 1410, and a collection 1416 of one or more bus controller units, while the optional additional dashed box shows an alternative processor 1400 having multiple cores 1402A-N, a collection 1414 of one or more integrated memory controller units among the system agent units 1410, and dedicated logic 1408.
[0117] Therefore, different implementations of processor 1400 may include: 1) a CPU, where dedicated logic 1408 is an integrated graphics device and / or scientific (throughput) logic (which may include one or more cores), and cores 1402A-N are one or more general-purpose cores (e.g., general-purpose ordered cores, general-purpose out-of-order cores, or a combination of both); 2) a coprocessor, where cores 1402A-N are a large number of dedicated cores designed primarily for graphics and / or scientific (throughput); 3) a coprocessor, where cores 1402A-N are a large number of general-purpose ordered cores; and 4) cores 1402A-N representing any number of decomposed cores with separate input / output (I / O) blocks. Thus, processor 1400 may be a general-purpose processor, a server processor or a processing element used in a server environment, a coprocessor (e.g., a security coprocessor), a high-throughput MIC processor, a GPGPU, an accelerator (such as, for example, a graphics accelerator or digital signal processing (DSP) unit, a cryptographic accelerator, a fixed-function accelerator, a machine learning accelerator, a networking accelerator, or a computer vision accelerator), a field-programmable gate array, or any other processor or processing device. The processor can be implemented on one or more chips. The processor 1400 can be part of one or more substrates, and / or can be implemented on one or more substrates using any of several process technologies, such as, for example, BiCMOS, CMOS, or NMOS.
[0118] The memory hierarchy includes one or more levels of cache within the core, or a set 1406 of one or more shared cache units, and external memory (not shown) coupled to a set 1414 of integrated memory controller units. The set 1406 of shared cache units may include one or more intermediate-level caches, a final-level cache (LLC), and / or combinations thereof, such as Level 2 (L2), Level 3 (L3), Level 4 (L4), or other levels of cache. While in one embodiment, ring-based interconnect units 1412 interconnect integrated graphics logic 1408 (which is an example and is also referred to herein as dedicated logic), the set 1406 of shared cache units, and system proxy units 1410 / (multiple) of integrated memory controller units 1414, alternative embodiments may use any number of known techniques to interconnect such units. In one embodiment, consistency is maintained between one or more cache units 1406 and cores 1402A-N.
[0119] In some embodiments, one or more of the cores 1402A-N are capable of multithreading. System agent 1410 includes those components that coordinate and operate the cores 1402A-N. System agent unit 1410 may include, for example, a power control unit (PCU) and a display unit. The PCU may be, or may include, the logic and components required to regulate the power state of the cores 1402A-N and the integrated graphics logic 1408. The display unit is used to drive one or more externally connected displays.
[0120] The 1402A-N cores can be homogeneous or heterogeneous in terms of their instruction set architecture; that is, two or more cores in the 1402A-N cores can be able to execute the same instruction set, while other cores can be able to execute only a subset of that instruction set or execute different instruction sets.
[0121] Figure 15 This is a block diagram of an illustrative central processing unit (CPU) complex that may be included in a processor according to an embodiment of the present invention. In the embodiment, the L3 cache is an 8MB 16-way cache distributed across a quad-core module (referred to as a CPU complex or CCX), providing a 2MB "slice" of L3 cache per core. However, the L3 cache slices within the CCX are implemented such that the L3 cache is a shared cache. Multiple CCXs may be included in a single processor (e.g., two CCXs form a 16MB L3 cache). The 8MB cache on each CCX is separate, so these caches act as the last-level cache for each quad-core module, with appropriate hooks to the other L3 cache to determine whether data is needed (the protocol involved in the L3 cache design allows each core to access the L3 cache of other cores). Therefore, these L1, L2, and L3 caches are coherent caches, wherein the L3 cache slices within a CCX and the L3 cache slices between CCXs are connected by cache coherent interconnects (also referred to as cache coherent structures).
[0122] Figure 16 This is a block diagram illustrating a cache hierarchy structure that may be included in a processor according to an embodiment of the present invention. Figure 16In this implementation, the cache hierarchy 1600 includes L1 i cache 1610A and L1 d cache 1610B (collectively referred to as L1 cache 1610), L2 instruction and data cache 1620, and L3 instruction and data cache 1630. In this embodiment, L1 cache 1610 and L2 cache 1620 are both private / local write-back caches, while L3 cache 1630 is a victim cache. In this embodiment, L1 i cache 1610A is a 64KB 4-way cache, L1d cache 1610B is a 32KB 8-way cache, L2 cache 1620 is a 512KB 8-way cache, and L3 cache 1630 is an 8MB 16-way cache.
[0123] Exemplary computer architecture
[0124] Figures 17-21 This is a block diagram of an exemplary computer architecture. Other system designs and configurations known in the art for laptops, desktops, handheld PCs, personal digital assistants, engineering workstations, servers, network devices, network hubs, switches, embedded processors, digital signal processors (DSPs), general-purpose processors, server processors or processing elements used in server environments, coprocessors (e.g., security coprocessors), high-throughput MIC processors, GPGPUs, accelerators (such as, for example, graphics accelerators, cryptographic accelerators, fixed-function accelerators, machine learning accelerators, networking accelerators, or computer vision accelerators), field-programmable gate arrays, or any other processor or processing device, graphics devices, video game devices, set-top boxes, microcontrollers, cellular phones, portable media players, handheld devices, and various other electronic devices are also suitable. Generally, a wide variety of systems or electronic devices capable of incorporating processors and / or other execution logic as disclosed herein are generally suitable.
[0125] Now for reference Figure 17The diagram illustrates a system 1700 according to an embodiment of the present invention. System 1700 may include one or more processors 1710, 1715 coupled to a controller hub 1720. In one embodiment, the controller hub 1720 includes a graphics memory controller hub (GMCH) 1790 and an input / output hub (IOH) 1750 (which may be on separate chips); the GMCH 1790 includes memory and a graphics controller, to which a memory 1740 and a coprocessor 1745 are coupled; the IOH 1750 couples an I / O device 1760 to the GMCH 1790. Alternatively, one or both of the memory and the graphics controller are integrated within the processor (as described herein), with the memory 1740 and the coprocessor 1745 directly coupled to the processor 1710 and the controller hub 1720, which resides on a single chip with the IOH 1750.
[0126] The optional properties of the additional processor 1715 are in Figure 17 The text uses dashed lines to represent these cores. Each processor 1710, 1715 may include one or more of the processing cores described herein, and may be a version of processor 1400.
[0127] The memory 1740 may be, for example, dynamic random access memory (DRAM), phase-change memory (PCM), or a combination of both. In at least one embodiment, the controller hub 1720 communicates with the processors(s) 1710, 1715 via a multi-branch bus such as a front-side bus (FSB), a point-to-point interface such as a fast path interconnect (QPI), or a similar connection 1795.
[0128] In one embodiment, processor 1745 is a dedicated processor (including, for example, a general-purpose processor, a server processor or processing element used in a server environment, a coprocessor such as a security coprocessor, a high-throughput MIC processor, a GPGPU, an accelerator (such as, for example, a graphics accelerator or digital signal processing (DSP) unit, a cryptographic accelerator, a fixed-function accelerator, a machine learning accelerator, a networking accelerator, or a computer vision accelerator), a field-programmable gate array, or any other processor or processing device). In one embodiment, controller hub 1720 may include an integrated graphics accelerator.
[0129] There can be various differences between physical resources 1710 and 1715 in a range of quality metrics, including architecture, microarchitecture, thermal and power consumption characteristics.
[0130] In one embodiment, processor 1710 executes instructions that control general-type data processing operations. Embedded within these instructions may be coprocessor instructions. Processor 1710 identifies these coprocessor instructions as having a type that should be executed by an attached coprocessor 1745. Therefore, processor 1710 issues these coprocessor instructions (or control signals representing coprocessor instructions) to coprocessor 1745 on a coprocessor bus or other interconnect. Coprocessors 1745(s) receive and execute the received coprocessor instructions.
[0131] Now refer to Figure 18 The diagram shown is a block diagram of a more specific first exemplary system 1800 according to an embodiment of the present invention. Figure 18 As shown, the multiprocessor system 1800 is a point-to-point interconnect system and includes a first processor 1870 and a second processor 1880 coupled via a point-to-point interconnect 1850. Each of processors 1870 and 1880 may be a version of processor 1400. In one embodiment of the invention, processors 1870 and 1880 are processors 1710 and 1715, respectively, and coprocessor 1838 is coprocessor 1745. In another embodiment, processors 1870 and 1880 are processor 1710 and coprocessor 1745, respectively.
[0132] Processors 1870 and 1880 are shown as including integrated memory controller (IMC) units 1872 and 1882, respectively. Processor 1870 also includes point-to-point (PP) interfaces 1876 and 1878 as part of its bus controller unit; similarly, the second processor 1880 includes PP interfaces 1886 and 1888. Processors 1870 and 1880 can exchange information via PP interface 1850 using point-to-point (PP) interface circuitry 1878 and 1888. Figure 18 As shown, IMC 1872 and 1882 couple the processor to the corresponding memory, namely memory 1832 and memory 1834, which may be portions of the main memory locally attached to the corresponding processor.
[0133] Processors 1870 and 1880 can each exchange information with chipset 1890 via their respective PP interfaces 1852 and 1854 using point-to-point interface circuits 1876, 1894, 1886, and 1898. Chipset 1890 can optionally exchange information with coprocessor 1838 via high-performance interface 1892. In one embodiment, coprocessor 1838 is a dedicated processor, such as, for example, a high-throughput MIC processor, a network or communication processor, a compression engine, a graphics processor, a GPGPU, an embedded processor, etc.
[0134] A shared cache (not shown) may be included in either processor or external to both processors but connected to them via a PP interconnect, such that if the processors are in a low-power mode, the local cache information of either or both processors may be stored in the shared cache.
[0135] Chipset 1890 may be coupled to first bus 1816 via interface 1896. In one embodiment, first bus 1816 may be a peripheral component interconnect (PCI) bus, or a bus such as PCI Express bus or another third-generation I / O interconnect bus, but the scope of the invention is not limited thereto.
[0136] like Figure 18 As shown, various I / O devices 1814 may be coupled to a first bus 1816 together with a bus bridge 1818, which couples the first bus 1816 to a second bus 1820. In one embodiment, one or more additional processors 1815 (such as general-purpose processors, server processors or processing elements used in server environments, coprocessors (e.g., security coprocessors), high-throughput MIC processors, GPGPUs, accelerators (such as, for example, graphics accelerators or digital signal processing (DSP) units, cryptographic accelerators, fixed-function accelerators, machine learning accelerators, networking accelerators, or computer vision accelerators), field-programmable gate arrays, or any other processor or processing device) are coupled to the first bus 1816. In one embodiment, the second bus 1820 may be a low pin count (LPC) bus. In one embodiment, various devices may be coupled to the second bus 1820, including, for example, a keyboard and / or mouse 1822, a communication device 1827, and a storage unit 1828, such as a disk drive or other mass storage device that may include instruction / code and data 1830. Furthermore, the audio I / O 1824 can be coupled to a second bus 1820. Note that other architectures are possible. For example, instead of... Figure 18 The point-to-point architecture allows the system to implement multi-branch buses or other similar architectures.
[0137] Now for reference Figure 19 The diagram shown is a block diagram of a second, more specific exemplary system 1900 according to an embodiment of the present invention. Figure 18 and Figure 19 Similar elements in the figure use similar reference numerals, and from Figure 19 The middle part is omitted Figure 18 certain aspects to avoid confusion Figure 19 Other aspects.
[0138] Figure 19The diagram shows that processors 1870 and 1880 may include integrated memory and I / O control logic (“CL”) 1872 and 1882, respectively. Thus, CL 1872 and 1882 include an integrated memory controller unit and I / O control logic. Figure 19 The diagram shows that not only are the memories 1832 and 1834 coupled to CLs 1872 and 1882, but the I / O device 1914 is also coupled to the control logic 1872 and 1882. The conventional I / O device 1915 is coupled to the chipset 1890.
[0139] Now refer to Figure 20 The diagram shown is a block diagram of a SoC 2000 according to an embodiment of the present invention. Figure 14 Similar components in the figure share the same reference numerals. Additionally, dashed boxes are an optional feature on more advanced SoCs. Figure 20 In this context, interconnect units 2002 are coupled to: application processor 2010, which includes a set of one or more cores 1402A-N and a set of one or more shared cache units 1406, the set of one or more cores 1402A-N including cache units 1404A-N; system agent unit 1410; bus controller units 1416; integrated memory controller units 1414; and a set of one or more coprocessors 2020, which may include integrated graphics logic, image processors, audio processors, video processors, general-purpose processors, and servers. The processor or processing element used in a server environment, a security coprocessor, a high-throughput MIC processor, a GPGPU, an accelerator (such as, for example, a graphics accelerator or digital signal processing (DSP) unit, a cryptographic accelerator, a fixed-function accelerator, a machine learning accelerator, a networking accelerator, or a computer vision accelerator), a field-programmable gate array, or any other processor or processing device; a static random access memory (SRAM) unit 2030; a direct memory access (DMA) unit 2032; and a display unit 2040 for coupling to one or more external displays. In one embodiment, the coprocessor(s) 2020 includes a dedicated processor, such as, for example, a network or communications processor, a compression engine, a GPGPU, a high-throughput MIC processor, an embedded processor, and so on.
[0140] Now refer to Figure 21 The diagram shown is a block diagram of a SoC 2000 according to an embodiment of the present invention.
[0141] in conclusion
[0142] Embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of such implementations. Embodiments of the invention may be implemented as computer programs or program code that execute on programmable systems, including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The processor may include, for example, a general-purpose processor, a server processor, or a processing element used in a server environment, a coprocessor (e.g., a security coprocessor), a high-throughput MIC processor, a GPGPU, an accelerator (such as, for example, a graphics accelerator or digital signal processing (DSP) unit, a cryptographic accelerator, a fixed-function accelerator, a machine learning accelerator, a networking accelerator, or a computer vision accelerator), a field-programmable gate array, or any other processor or processing device.
[0143] Program code (such as, Figure 18 The code 1830 illustrated herein is applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor, such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.
[0144] The program code can be implemented using a high-level procedural programming language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used if needed. In fact, the mechanisms described in this document are not limited to any particular programming language. In any case, the language can be compiled or interpreted.
[0145] One or more aspects of at least one embodiment may be implemented by representational instructions stored on a machine-readable medium representing various logic in a processor, which, when read by a machine, causes the machine to manufacture logic for performing the techniques described herein. Such representations, referred to as “IP cores,” may be stored on tangible machine-readable media and provided to multiple customers or production facilities for loading into manufacturing machines that actually manufacture the logic or processor.
[0146] Such machine-readable storage media can include, but are not limited to, non-transitory, tangible arrangements of articles made or formed by a machine or device, including storage media such as hard disks; any other type of disk, including floppy disks, optical disks, compact disc read-only memory (CD-ROM), rewritable compact discs (CD-RW), and magneto-optical disks; semiconductor devices such as read-only memory (ROM), random access memory (RAM) such as dynamic random access memory (DRAM) and static random access memory (SRAM), erasable programmable read-only memory (EPROM), flash memory, electrically erasable programmable read-only memory (EEPROM); phase-change memory (PCM); magnetic cards or optical cards; or any other type of medium suitable for storing electronic instructions.
[0147] Therefore, embodiments of the invention also include non-transitory tangible machine-readable media containing instructions or design data, such as a hardware description language (HDL), that defines the architectures, circuits, devices, processors, and / or system characteristics described herein. Such embodiments may also be referred to as program products.
[0148] Instructions executed by a processor core according to embodiments of the present invention can be embodied in the “generic vector-friendly instruction format” described in detail below. In other embodiments, another instruction format is used instead of such a format; however, the descriptions below of write mask registers, various data transformations (mixing, broadcasting, etc.), addressing, etc., generally apply to the description of embodiments of the above (multiple) instructions. Furthermore, exemplary systems, architectures, and pipelines are detailed below. Instructions can be executed on such systems, architectures, and pipelines, but are not limited to those detailed.
[0149] In some cases, an instruction translator can be used to translate instructions from a source instruction set to a target instruction set. For example, an instruction translator can transform instructions (e.g., using static binary transformation, including dynamically compiled binary transformation), modify, emulate, or otherwise convert them into one or more other instructions that will be processed by the core. Instruction translators can be implemented in software, hardware, firmware, or a combination thereof. Instruction translators can be on the processor, off the processor, or partially on and partially off the processor.
[0150] Figure 22 This is a block diagram illustrating the use of a software instruction converter to convert binary instructions in a source instruction set into binary instructions in a target instruction set, according to an embodiment of the present invention. In the illustrated embodiment, the instruction converter is a software instruction converter; however, alternatively, the instruction converter can be implemented using software, firmware, hardware, or various combinations thereof. Figure 22A program of the form of a high-level language 2202 can be compiled using an x86 compiler 2204 to generate x86 binary code 2206 that can be natively executed by a processor 2216 having at least one x86 instruction set core. A processor 2216 having at least one x86 instruction set core means any processor that can perform substantially the same function as an Intel processor having at least one x86 instruction set core by compatibly executing or otherwise processing: (1) a substantial portion of the instruction set of an Intel x86 instruction set core, or (2) a version of object code for an application or other software aimed at running on an Intel processor having at least one x86 instruction set core to achieve substantially the same results as an Intel processor having at least one x86 instruction set core. The x86 compiler 2204 means a compiler operable to generate x86 binary code 2206 (e.g., object code) that can be executed on a processor 2216 having at least one x86 instruction set core, with or without additional linking processing. Similarly, Figure 22 A program utilizing a high-level language 2202 can be compiled using an alternative instruction set compiler 2208 to generate alternative instruction set binary code 2210 that can be natively executed by a processor 2214 that does not have at least one x86 instruction set core (e.g., a processor with a core executing the MIPS instruction set of MIPS Technologies, Inc., Sunnyvale, California, and / or the ARM instruction set of ARM Holdings, Inc., Sunnyvale, California). An instruction converter 2212 is used to translate the x86 binary code 2206 into code that can be natively executed by the processor 2214 that does not have an x86 instruction set core. This translated code is unlikely to be identical to the alternative instruction set binary code 2210 because an instruction converter capable of doing so would be difficult to manufacture; however, the translated code will perform general operations and consist of instructions from the alternative instruction set. Thus, the instruction converter 2212 represents, through emulation, simulation, or any other process, software, firmware, hardware, or a combination thereof that allows a processor or other electronic device without an x86 instruction set processor or core to execute the x86 binary code 2206.
[0151] The operations in the flowcharts may have been described with reference to exemplary embodiments in other accompanying drawings. However, it should be understood that the operations in the flowcharts may be performed by embodiments other than those of the invention discussed with reference to other accompanying drawings, and that the embodiments of the invention discussed with reference to other accompanying drawings may perform operations different from those discussed with reference to the flowcharts. Furthermore, although the flowcharts in the drawings illustrate a specific order of operations performed by certain embodiments of the invention, it should be understood that such order is exemplary (e.g., alternative embodiments may perform operations in a different order, some operations may be combined, some operations may overlap, etc.).
[0152] One or more portions of embodiments of the present invention may be implemented using different combinations of software, firmware, and / or hardware. Embodiments may be implemented using electronic devices that use machine-readable media (also known as computer-readable media) to store and (internal and / or via a network with other electronic devices) code (which consists of software instructions and is sometimes referred to as computer program code or computer program) and / or data. Machine-readable media include machine-readable storage media (e.g., disks, optical discs, read-only memory (ROM), flash memory devices, phase-change memory) and machine-readable transmission media (also known as carriers) (e.g., electrical, optical, radio, acoustic, or other forms of propagation signals—such as carrier waves, infrared signals). Therefore, an electronic device (e.g., a computer) may include hardware and software, such as a collection of one or more processors coupled to one or more machine-readable storage media for storing code to be executed on the collection of processors and / or for storing data. For example, an electronic device may include non-volatile memory containing code, because non-volatile memory retains code / data even when the electronic device is turned off (when power is removed), while when the electronic device is turned on, the portion of the code to be executed by the processor(s) of that electronic device is typically copied from the slower non-volatile memory to the volatile memory (e.g., dynamic random access memory (DRAM), static random access memory (SRAM)) of that electronic device. A typical electronic device also includes a collection of one or more physical network interfaces for establishing network connections with other electronic devices (to transmit and / or receive code and / or data using propagation signals).
[0153] Although the invention has been described by way of several embodiments, those skilled in the art will recognize that the invention is not limited to the described embodiments, and that the invention can be practiced with modifications and variations within the spirit and scope of the appended claims. The description is therefore to be regarded as illustrative rather than restrictive.
Claims
1. An apparatus comprising: Circuitry for receiving an address pointer, the address pointer having address bits, valid range metadata and a password message authentication code (MAC), the valid range metadata indicating the valid range of memory that can be accessed by the address pointer, and the password MAC being generated with a password and stored in the non-standard bits of the address pointer; The circuitry used to generate the adjusted address pointer includes performing arithmetic operations on the value of the address bit and the adjustment value; Circuitry for corrupting the regulated address pointer when the regulated address pointer points to a memory location outside the valid range, wherein the cipher MAC is used to detect whether the regulated address pointer points to a memory location outside the valid range; as well as Circuitry for loading data from a memory location using the adjusted address pointer when the adjusted address pointer is not corrupted.
2. The apparatus of claim 1, wherein, The address pointer has an identification tag, and the circuitry for loading is not used to load the data from the memory location using the adjusted address pointer when the identification tag does not match the memory tag.
3. The apparatus of claim 2, wherein, The circuitry for corrupting the tunable address pointer is used to determine, based on the determination that the identifier tag has been changed, that the tunable address pointer points to a memory location outside the valid range.
4. The apparatus of claim 1, wherein, The circuitry used to generate the adjusted address pointer is used to add the value of the address bit to the adjustment value.
5. The apparatus according to any one of claims 1 to 4, wherein, The circuitry for corrupting the regulated address pointer is used to change at least one bit of the regulated address pointer.
6. The apparatus according to any one of claims 1 to 4, wherein, The effective range metadata is used to indicate the upper limit of the effective range.
7. The apparatus according to any one of claims 1 to 4, wherein, The circuitry for corrupting the tunable address pointer is used to determine, based on the determination that a non-standard bit of the tunable address pointer has been changed, that the tunable address pointer points to a memory location outside the effective range.
8. The apparatus according to any one of claims 1 to 4, wherein, The address pointer has an encrypted portion, which is encrypted using a secret key and fine-tuning of at least a portion of the address bits.
9. The apparatus of claim 8, wherein, The circuitry for corrupting the tunable address pointer is used to determine that the tunable address pointer points to a memory location outside the valid range when the arithmetic operation affects the encrypted portion.
10. A method comprising: Receive an address pointer, the address pointer having address bits, valid range metadata and a password message authentication code (MAC), the valid range metadata indicating the valid range of memory that can be accessed by the address pointer, and the password MAC being generated with a password and stored in the non-standard bits of the address pointer; An adjusted address pointer is generated by performing arithmetic operations on the value of the address bit and the adjustment value; as well as The regulated address pointer is corrupted based on the determination that the regulated address pointer points to a memory location outside the valid range, wherein the cipher MAC is used to determine that the regulated address pointer points to a memory location outside the valid range.
11. The method of claim 10, wherein, The address pointer has an identification label.
12. The method of claim 11, wherein, The identification tag is used to determine whether the adjusted address pointer points to a memory location outside the valid range.
13. The method of claim 10, wherein, Performing the arithmetic operation includes adding the value of the address bit to the adjustment value.
14. The method according to any one of claims 10 to 13, wherein, Damage includes altering at least one bit of the regulated address pointer.
15. The method according to any one of claims 10 to 13, wherein, The effective range metadata indicates the upper limit of the effective range.
16. The method of any one of claims 10 to 13, further comprising determining whether the adjusted address pointer points to a memory location outside the effective range based on whether a non-standard bit of the adjusted address pointer has been changed.
17. The method according to any one of claims 10 to 13, wherein, Receiving includes receiving the address pointer having an encrypted portion, the encrypted portion being encrypted with a secret key and fine-tuning at least a portion of the address bits.
18. The method of claim 17, further comprising determining whether the regulated address pointer points to a memory location outside the valid range based on determining whether performing the arithmetic operation affects the encrypted portion.
19. A system comprising: System memory; as well as A device coupled to the system memory, the device comprising: Circuitry for receiving an address pointer, the address pointer having address bits, valid range metadata and a password message authentication code (MAC), the valid range metadata indicating the valid range of memory that can be accessed by the address pointer, and the password MAC being generated with a password and stored in the non-standard bits of the address pointer; The circuitry used to generate the adjusted address pointer includes performing arithmetic operations on the value of the address bit and the adjustment value; Circuitry for corrupting the regulated address pointer when it points to a memory location outside the valid range, wherein the cipher MAC is used to detect whether the regulated address pointer points to a memory location outside the valid range; and Circuitry for loading data from a memory location using the adjusted address pointer when the adjusted address pointer is not corrupted.
20. The apparatus of claim 19, wherein, The system memory includes dynamic random access memory (DRAM), wherein the address pointer has an identification tag, and wherein the circuitry for loading is not used to load the data from the memory location using the adjusted address pointer when the identification tag does not match the memory tag.
21. The apparatus of claim 20, further comprising a mass storage device coupled to the apparatus, wherein, The circuitry for corrupting the tunable address pointer is used to determine, based on the determination that the identifier tag has been changed, that the tunable address pointer points to a memory location outside the valid range.
22. The apparatus of claim 19, further comprising an input / output device coupled to the apparatus, wherein, The circuitry used to generate the adjusted address pointer is used to add the value of the address bit to the adjustment value.
23. The apparatus as claimed in any one of claims 19 to 22, wherein, The circuitry for corrupting the regulated address pointer is used to change at least one bit of the regulated address pointer.
24. The apparatus as claimed in any one of claims 19 to 22, wherein, The effective range metadata is used to indicate the upper limit of the effective range.
25. The apparatus according to any one of claims 19 to 22, wherein, The circuitry for corrupting the tunable address pointer is used to determine, based on the determination that a non-standard bit of the tunable address pointer has been changed, that the tunable address pointer points to a memory location outside the effective range.
