Processor with adjustable security level according to application

By introducing security level registers into the computer processor and dynamically configuring the safe operation mode, the problem of performance degradation of processors when improving security is solved, and flexible performance and security trade-offs are achieved to adapt to the needs of different applications and prevent failure of Authorized access vulnerability.

CN113168486BActive Publication Date: 2024-11-05MICRON TECHNOLOGY INC
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN201980079760.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-12-05
Filing Date
2019-12-02
Publication Date
2024-11-05
Estimated Expiration
2039-12-02

AI Technical Summary

Technical Problem

Existing computer processors will degrade performance when improving security, and different applications have different security requirements, making it difficult to make a flexible trade-off between performance and security.

Method used

By introducing security level registers in the processor, allowing the application or operating system to dynamically configure the processor to run in different safe modes, adjusting the safe operation mode of the functional unit according to the security preferences of the application, thereby performing performance and security Make flexible trade-offs.

Benefits of technology

It enables enhanced security without degrading performance, or improved performance without decreasing security protection, adapting to the needs of different applications and preventing unauthorized access vulnerabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113168486B_ABST
    Figure CN113168486B_ABST
Patent Text Reader

Abstract

Methods, systems, and devices related to adjustable security levels in a processor are described. A processor may have a functional unit and a register configured to control security operations of the functional unit. When the register includes a first setting, the register configures the functional unit to operate in a first security operating mode; and when the register includes a second setting, the register configures the functional unit to operate in a second security operating mode (e.g., to skip / bypass a set of security operating circuits for enhancing execution speed).
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Related Applications

[0002] This application claims priority to U.S. Patent Application No. 16 / 210,605, filed on December 5, 2018, and entitled “Processor with Adjustable Security Level Based on Application Program,” the entire disclosure of which is hereby incorporated by reference herein. Technical Field

[0003] At least some embodiments disclosed herein relate generally to computer architecture, and more particularly, but not limited to, processor security and performance. Background Art

[0004] A typical computer processor receives instructions and / or data from the main memory of a computer system for processing. Instructions and / or data may be cached for use by the processor. In some cases, unauthorized access to the contents of the main memory or processor cache may be performed. For example, multiple processors or processing cores formed on the same die may share the main memory. One processor or processing core may access the contents of another processor or processing core via a shared main memory and / or processor cache memory via a memory sharing and / or cache coherency protocol.

[0005] For example, speculative execution is a computing technique in which a processor executes one or more instructions before a determination is available as to whether such instructions should be executed, based on speculation that such instructions need to be executed under certain conditions. Speculative execution may introduce security vulnerabilities in which unauthorized access to content may be made. Examples of security vulnerabilities in computer processors include Meltdown and Spectre, which were disclosed in 2018. Meltdown is a hardware vulnerability that allows a malicious process to read all memory without authorization. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements.

[0007] Figure 1 A processor is shown having security level registers that may be configured by or for an application program for execution thereof, according to one embodiment.

[0008] Figure 2 An example of a security level register for controlling data scrambling operations in a processor is shown according to one embodiment.

[0009] Figure 3 Another example of a security level register for controlling a data path in a processor is shown according to one embodiment.

[0010] Figure 4 Yet another example of a security level register for controlling a data path in a processor is shown according to one embodiment.

[0011] Figure 5 A method of configuring security operations in a processor according to one embodiment is shown.

[0012] Figure 6 Showing that it can be implemented Figure 5 A computing system for a method of DETAILED DESCRIPTION

[0013] The present disclosure includes techniques for balancing security and performance in computer processors.

[0014] Logic circuits may be added to a computer processor to enhance the security of the computer processor. However, such arrangements made to improve security may degrade the performance of the computer processor. As a result, a computer processor configured with improved security may have a lower performance level than a computer processor without improved security.

[0015] Generally speaking, different applications programmed to execute on the same computer processor may have different security requirements. Some applications may require a high level of security to eliminate or minimize unauthorized access to any information, data, and / or instruction execution state. However, other applications may not require such a high level of security.

[0016] In the present disclosure, a computer processor is configured with different operating modes configured for different tradeoffs between performance and security. The instruction set of a computer program can be executed in any of the security modes of the computer processor to obtain the same execution results from a given data set. However, executing the instruction set in one mode may provide enhanced security protection (e.g., at the expense of performance), while executing the same instruction set in another mode may provide enhanced performance / speed (e.g., with reduced security protection). Therefore, the user and / or programmer of the instruction set is provided with the option to select an execution mode that is optimized for a particular computer program and / or a particular execution instance of the computer program. In some cases, the operating system of the computer system may select a security level based on a set of rules (e.g., based on the identity of the user running the program).

[0017] Preferably, the security mode in which the computer processor executes the instruction set can be selected for the instructions of the program based on the properties of the program, the virtual address of the program, or the settings or preferences of the execution instance of the program. Therefore, when the computer processor is executing the instructions of the first program, the computer processor can be dynamically configured to run in the first security mode (e.g., configured to enhance security); and when the computer processor is executing the instructions of the second program, the computer processor can be dynamically configured to run in the second security mode (e.g., configured to enhance performance), such as Figure 1 As described in .

[0018] Figure 1 A processor (101) is shown having security level registers (121) that may be configured by or for an application (eg, 135...136) for execution thereof, according to one embodiment.

[0019] Figure 1 The processor (101) has a set of functional units (123) (eg, execution units, control logic). The security operations configured in the functional units (123) can be adjusted by the contents of the security level register (121).

[0020] For example, the security level register (121) may contain a setting that identifies a high performance mode. When this setting is contained in the security level register (121), the functional unit (123) is dynamically configured to relax security operations to enhance performance levels.

[0021] For example, the security level register (121) may alternatively contain a setting that identifies a high security mode. When this setting is contained in the security level register (121), the functional unit (123) is dynamically configured to enhance security operations to increase the security level.

[0022] Optionally, the security level register (121) may be configured to store a level indicator selected from a plurality of predefined level indicators. Each of the predefined level indicators causes the functional unit (123) to implement a specific combination of security-performance tradeoffs.

[0023] Alternatively, the security level register (121) may include a set of security feature selectors; and each of the security features may be individually / separately selected / configured using one or more parameters. The security level register (121) may be configured by the computer system's operating system and / or by the processor (101) based on a reference (e.g., as described via Figure 2 The security register is set by using the properties of the object referenced by the memory address register (169) described in the description. In some cases, the computer system does not provide the user of the computer program with the authority to modify or access the security level register (121).

[0024] Figure 1 The processor (101) has a memory management unit (MMU) (125) configured to load data and instructions from the memory (131) into the internal cache (107) of the processor (101) for processing and execution. Figure 2 and Figure 6 As described in , the memory (131) may be a memory device (105), an external memory (103), or a storage device (104). In general, instructions of an application (135 or 136) may be loaded into an internal cache (107) by an MMU (125) for execution by a functional unit (123) of the processor (101). Data / operands of the corresponding instructions may be loaded into registers (111) for processing by the corresponding instructions; and execution results may be initially placed in registers (111).

[0025] Preferably, the security level register (121) can be configured differently based on the security preference settings (e.g., 137 ... 138) of the application (e.g., 135 ... 136) for executing different applications (e.g., 135 ... 136). For example, one security preference setting (e.g., 137) can be used in the security level register (121) to configure the processor (101) to a high security mode with reduced performance; and another security preference setting (e.g., 137) can be used in the security level register (121) to configure the processor (101) to a high performance mode with relaxed security operation.

[0026] For example, application A (135) may have a security preference setting A (137); and application B (136) may have a different security preference setting B (138). When application A (135) is being loaded into the internal cache (107) of the processor (101) for execution, the security level register (121) is configured to include the security preference setting A (137); and when application B (136) is being loaded into the internal cache (107) of the processor (101) for execution, the security level register (121) is configured to include the security preference setting B (138). The operation of configuring the security level register (121) may be performed as part of initiating execution of a program (e.g., 135 or 136) by an operating system of a computer system. In general, when a program (e.g., 135 or 136) is started, the operating system initializes various registers; using a predetermined set of rules, the operating system can determine the contents of the security level register (121) (e.g., based on the identity of the user running the program (e.g., 135 or 136) and / or the security preference settings of the program (e.g., 135 or 136)).

[0027] In some embodiments, the application (135...136) may be programmed with instructions responsible for loading its security reference settings (137...138) into the security level register (121).

[0028] In other embodiments, the security preference settings (137 ... 138) are configured as security attributes of the corresponding application (135 ... 136). When any instruction of the application (e.g., 135 or 136) is being executed by the processor (101), the processor (101) and / or the operating system of the computer system is configured to load the corresponding security preference settings (e.g., 137 or 138) into the security level register (121). For example, the security attribute can be identified based on the virtual memory address of the corresponding application (135 ... 136).

[0029] In some cases, different users of the same application (e.g., 135 or 136) may have different security requirements. Therefore, the security preference settings (e.g., 137 or 138) may be configured as runtime environment parameters of the corresponding application (e.g., 135 or 136). The runtime environment parameters may be managed by the operating system of the computer system and may change from one execution instance of an application (e.g., 135 or 136) to another execution instance of the same application (e.g., 135 or 136).

[0030] When execution in the processor (101) switches from instructions of application A (135) to instructions of application B (136), the contents of the security level register (121) change from security preference setting A (137) to security preference setting B (138); and the security operating mode of the functional unit (123) changes according to the contents of the security level register (121).

[0031] Generally speaking, the applications (135...136) may be separate programs with different security preference settings (137...138). In some cases, the applications (135...136) may be separate routines with different security preference settings (137...138); and one routine may call another routine for service.

[0032] Figure 1 The security level register (121) allows individual applications (135...136) to be executed at a preferred balance between security and performance.

[0033] For example, the computer processor (101) may be configured to operate on data in an internal cache (107) in scrambled form in one mode for enhanced security and to operate on descrambled data in the internal cache (107) in another mode for enhanced performance; and the security level register (121) indicates whether the data in the internal cache (107) is scrambled.

[0034] For example, the computer processor (101) may be configured to operate in one mode for enhanced security on data in the internal cache (107) protected with a long scrambling key, and in another mode for enhanced performance on data in the internal cache (107) protected with a short scrambling key; and the security level register (121) indicates the length of the scrambling key used in the security operation. The descrambler (113) and the scrambler (112) are both capable of processing with short and long scrambling keys. For example, the short scrambling key may have only 32 random bits applied to the first and second halves of a 64-bit word, respectively, to scramble the 64-bit word; and alternatively, the long scrambling key may have 64 random bits applied to the entire 64-bit word.

[0035] In another example, the computer processor (101) may be configured to operate in one mode for enhanced security on data in the internal cache (107) protected using a computationally intensive encryption key, and in another mode for enhanced performance on data in the internal cache (107) protected using a computationally efficient scrambling key.

[0036] In yet another example, the computer processor (101) may be configured to operate in one mode for enhanced security on data in the internal cache (107) protected with a scrambling key and a reversal key, in another mode for data in the internal cache (107) protected with a scrambling key, in another mode for data in the internal cache (107) protected with a reversal key, and in yet another mode for further enhanced performance and reduced security protections on descrambled data in the internal cache (107).

[0037] For example, a scrambling key can be used to rearrange the positions of bits within a data word without changing the values ​​of the bits. After scrambling the positions of the bits of the original data word, a scrambled data word is generated. Without the scrambling key (or the corresponding descrambling key), the original data word cannot be recovered from the scrambled data word.

[0038] For example, the inversion key can be used to selectively invert the bit values ​​of the data word at the selected positions identified by the inversion key. After selectively inverting the bit values ​​of the original data word, a protected data word is generated. Without the inversion key, the original data word cannot be restored from the protected data word.

[0039] For example, an encryption key may be used to combine and convert the values ​​of the bits of the original data word into the values ​​of the bits of the encrypted data word using a predetermined cryptographic algorithm. The encryption may be performed using a symmetric cryptographic algorithm that requires the same encryption key to decrypt the encrypted data word, or an asymmetric cryptographic algorithm that requires a different decryption key to decrypt the encrypted data word, where the decryption key may be difficult to identify from the encryption key. Different cryptographic algorithms have different tradeoffs in terms of performance and security.

[0040] In general, the computer processor (101) may be configured to perform security operations in various combinations for various security modes selectable via the security level register (121). For example, data items may be protected in the cache (107) and memory (131) for a program (e.g., 135 or 136) via scrambling keys, reversal keys, and / or encryption keys implemented via different cryptographic algorithms to achieve a desired performance-security trade-off level, or may be stored in plain text (e.g., no scrambling, reversing, encryption) in the cache (107) and memory (131) to minimize performance impact.

[0041] For example, security operations related to data scrambling within the processor (101) may be controlled by the security level register (121) in the form of Figure 2 and / or Figure 3 Controlled in the manner described in .

[0042] Figure 2 An example of a security level register (121) for controlling data scrambling operations in a processor (101) according to one embodiment is shown. For example, Figure 2 The processor (101) may be Figure 1 An implementation of a processor (101).

[0043] Figure 2 A key storage area (167) in the processor (101) is shown for data security.

[0044] exist Figure 2In the embodiment of the present invention, the processor (101) has a descrambled area (163) for performing calculations on the data (117) in a descrambled form, so that classical computer processor technology can be used to perform calculations in the descrambled area (163). Other processors (e.g., 102) can access certain resources of the processor (101), such as the storage device (104), the memory device (105), the external cache (103) and / or the internal cache (107). However, these processors (e.g., 102) are prevented from accessing the descrambled area (163) of the processor (101). For example, the processors (101 and 102) can be different processing cores formed on the same silicon die and / or packaged in the same integrated circuit chip. In other examples, the processors (101 and 102) can be packaged in different integrated circuit chips and connected via communication connections such as buses, interconnects, networks, etc.

[0045] A malicious program, for example, may be running in processor (102) and attempt to gain unauthorized access to content to be processed by processor (101) (e.g., using security vulnerabilities such as Meltdown and Spectre). To prevent such unauthorized access, data (109) may be stored in a scrambled form in a location outside of descrambled area (163). For example, data (109) may be stored in a scrambled form in storage device (104), in a computer's memory device (105), and in an external cache (103) shared between processors (101 and 102). Additionally, data (109) may be stored in a scrambled form in a scrambled area (161) of processor (101), such as the internal cache (107) of processor (101), when processor (102) may access the internal cache (107) via a cache coherency protocol.

[0046] exist Figure 2 In the embodiment of the present invention, when the processor (101) executes an instruction authorized to process the scrambled data (109), the descrambler (113) of the processor (101) converts the scrambled data (109) into the descrambled data (117). The existence of the descrambled data (117) is limited to the descrambled area (163). Since another processor (102) is prevented from accessing the descrambled area (163) of the processor (101), a malicious program running in the processor (102) can be prevented from gaining unauthorized access to the descrambled data (117) (e.g., via security vulnerabilities such as Meltdown and Spectre).

[0047] exist Figure 2In the embodiment of the present invention, the processor (101) has a security area (165) including a key storage area (167) and a security level register (121). The key storage area (167) has keys for the descrambler (113) and the scrambler (112) for various data objects. Without access to the corresponding key for the object, the processors (101 and 102) cannot recover the descrambled data (117) from the scrambled data (109).

[0048] exist Figure 2 In the invention, access to the key storage area (167) is based at least in part on a virtual address (195) used to load scrambled data (109) for operations to be performed in the descrambling area (163).

[0049] For example, the virtual address (195) may include fields such as an object ID (199), an object type (198), and / or an offset (196).

[0050] For example, the virtual memory address (195) may have a predetermined width (predetermined bits) and be stored in a memory address register (169) of the processor (101). The virtual address (195) may include a portion representing an object ID (199) and a portion representing an offset (196) within the object represented by the object ID (199).

[0051] For example, the object located at virtual address (195) may be an instruction set or a routine; and the object ID (199) of virtual address (195) may be used to identify specific properties of the instructions and / or routine, such as access rights.

[0052] For example, the object located at the virtual address (195) may be a data file, a data set, or a data item; and the object ID (199) of the virtual address (195) may be used to identify access rights to the data.

[0053] In some cases, the object name server is configured to store attributes of objects identified via object IDs (199). The processors (101 and 102) may query the object name server to obtain the attributes for access control.

[0054] In some cases, a static object ID of a predetermined value (e.g., 0) may be used to represent a kernel object of the operating system (104). Thus, a static object ID specified in a memory address may be used to identify a particular access restriction without having to communicate with an object name server. Some details and examples of static object IDs in memory addresses used by a computer processor to load instructions for execution may be found in U.S. Patent Application No. 16 / 028,840, filed on July 6, 2018, and entitled “Static Identifications in Object-based Memory Access,” the entire disclosure of which is hereby incorporated by reference herein.

[0055] In some cases, an object ID (e.g., 199) of a virtual memory address (195) and / or a memory address may include a portion (198) that indicates an object type. For example, an object type (198) value of 0 to 3 may be used to identify a kernel object of an operating system. For example, an object type (198) value of 4 to 5 may be used to specify that an offset is an address of a different width (e.g., a 64-bit address or a 32-bit address contained within a 128-bit memory address). For example, an object type (198) value of 6 to 7 may be used to specify that a predetermined portion of an object ID is to be interpreted as an identifier of a local object or an object in a partitioned global address space (PGAS). For example, an object type (198) value of 32 may be used to specify that the remainder of the object ID is to be interpreted as an identifier of an object defined in a server (e.g., 197).

[0056] The object type (198) and / or object ID (199) may optionally be used to determine access rights, runtime environment parameters, security preferences (e.g., 137...138).

[0057] exist Figure 2 In the example embodiment, the object ID (199) can be used to access the key storage area (167) to retrieve the key for the object represented by the object ID (199). Therefore, when the descrambling area (163) is authorized to load the scrambled data (109) into the descrambling area (163) via the virtual address (195) for processing, the key for the descrambler (113) can be retrieved or obtained from the key storage area (167) to generate the descrambled data (117) from the scrambled data (109).

[0058] When the descrambled data (117) leaves the descrambled area (163) (e.g., to be stored at the virtual address (195) as a result of a calculation and / or as part of an object represented by the object ID (199)), the scrambler (112) converts the descrambled data (117) into the scrambled data (109). By reducing the location and duration of the presence of the descrambled data (117), the data security of the computer system is improved.

[0059] The object ID (199) may be further used to identify the security preferences (e.g., 137...138) of the object represented by the object ID (199) and apply the security preferences (e.g., 137...138) of the object to control the operation of the key store (167).

[0060] For example, the security level register (121) may control the length of the scrambling key used in the descrambler (113) and the scrambler (112). When a shorter scrambling key is used, the performance impact of the scrambling / descrambling operation may be reduced, while the security protection provided by the scrambling / descrambling is also reduced. When a longer scrambling key is used, the performance impact of the scrambling / descrambling operation may be increased, while the security protection provided by the scrambling / descrambling is also improved.

[0061] In some cases, one object may have a security preference setting (e.g., 137) to use a key of a predetermined length in the scrambler (112) and descrambler (113), while another object may have a security preference setting (e.g., 137) to use descrambled data in an internal cache (107) and bypass the scrambler (112) and descrambler (113), such as Figure 3 Further explanation in.

[0062] In general, the descrambled data (117) may be instructions, operands, and / or results of execution of instructions by the execution unit (115). The descrambled area (163) may include: a register storing a virtual address for loading scrambled operands into the descrambled area (163); a register storing a virtual address for deriving a scrambled result from the descrambled area (163); and / or a register (e.g., a program counter) storing a virtual address for loading scrambled instructions into the descrambled area (163).

[0063] For example, the descrambling area (163) may include a program counter, a programmer-visible register file, and / or memory address registers. Programs running outside the descrambling area (163) of the processor (101) (e.g., in another processor (102) such as a separate processing core) are generally prevented from accessing the descrambling area (163) of the processor (101), but such external programs may access caches (e.g., 103 and / or 107) and main memory (e.g., 105) whose contents are in scrambled form.

[0064] An execution unit (e.g., 115) may perform operations (e.g., arithmetic operations) on operands stored in registers and generate results in registers. Such registers for operands and results may be configured in a descrambled region (163) so that the execution unit (e.g., 115) operates and generates data in a descrambled form; and therefore, scrambling outside the descrambled region (163) does not affect the operation and / or efficiency of the execution unit (e.g., 115).

[0065] The program counter may increase the address stored therein by one to execute the next instruction, or be assigned a branch address to execute an instruction at a given branch address. The program counter may also be configured in the descrambled area (163) so that its operation is based on the descrambled address. Thus, the contents of the program counter and / or address used to identify an operand in the main memory (e.g., 105) may be a descrambled address in the descrambled area (163).

[0066] Figure 3 Another example of a security level register (121) for controlling a data path in a processor (101) according to one embodiment is shown. For example, Figure 3 The processor (101) may be Figure 1 For example, the data path selector (127) may be implemented in Figure 2 In the processor (101). For example, based on Figure 2 The object ID (199) described in the security level register (121) is used to set the content of the security level register (121).

[0067] Figure 3 The processor (101) has a data path selector (127) controlled by the contents of the security level register (121).

[0068] When the security level register (121) has a predetermined security preference setting (e.g., 137), the data in the internal cache (107) to be processed in the descramble area (163) is not scrambled. Therefore, the data path selector (127) selects / uses the data path (133) that bypasses the descrambler (113) and the scrambler (112), so that the data delay caused by the descrambler (113) and the scrambler (112) can be reduced or eliminated.

[0069] When the security level register (121) has another security preference setting (e.g., 138), the data in the internal cache (107) for processing in the descrambling area (163) is scrambled. Therefore, the data path selector (127) uses the data path (134) passing through the descrambler (113) and the scrambler (112) so that the data security of the execution is improved by scrambling the data in the scrambling area (161) within the processor (101).

[0070] The descrambler (113) and the scrambler (112) may be implemented using a multiplexer that selects bits (or data items) according to a key set to rearrange the order of bits (or data items) in the input to produce an output. For example, when the input is descrambled data (117), the output having the bits rearranged according to the key set provides the scrambled data (109); and rearranging the order of bits in the scrambled data (109) according to the key set may restore the descrambled data (117). Details and examples of the descrambler (113) and the scrambler (112) may be found in U.S. patent application Ser. No. 16 / 054,913, filed on Aug. 3, 2018, and entitled “Data Protection in Computer Processors,” and U.S. patent application Ser. No. 16 / 134,387, filed on Sept. 18, 2018, and entitled “Key Management in Computer Processors,” the disclosures of which are incorporated herein by reference in their entirety.

[0071] Figure 2 and Figure 3 The security level register (121) is described to selectively control the deployment of data scrambling and / or the key length used for scrambling / descrambling in the processor (101). In general, the security level register (121) can also be used to adjust the deployment of other security measures.

[0072] For example, Figure 4 As described in Figure 3The processor (101) may be augmented to include an inversion circuit (e.g., 145) that uses an inversion key to protect data, and / or an encryption / decryption circuit (e.g., 143) that uses an encryption / decryption key to protect data. In addition, different encryption / decryption circuits may implement different cryptographic algorithms with different security / performance tradeoffs. A data path selector (127) may be controlled by a security level register (121) to selectively bypass some or all of the security circuits (140) of the processor (101). The security circuits (140) may include scrambling circuits (e.g., 141) (e.g., descrambler (113) and scrambler (112)), encryption / decryption circuits (e.g., 143), and / or inversion circuits (e.g., 145). The data path selector (127) may be controlled by a security level register (121) to selectively apply a subset of the security circuits (140) in a selected order identified by the contents of the security level register (121). For example, one path may be configured to apply scrambling (141) followed by inversion (145), while another path may be configured to apply inversion (145) followed by scrambling (141) or encryption (143).

[0073] For example, U.S. Patent Application No. 16 / 029,135, filed on July 6, 2018, discloses security techniques for using separate branch target buffers for different call levels, the entire disclosure of which is hereby incorporated by reference herein. The contents of the security level register (121) may be used to control the selective deployment of security measures and / or call levels to be separated by separate branch target buffers.

[0074] For example, U.S. Patent Application No. 16 / 028,930, filed on July 6, 2018, discloses a security technique using a shadow cache for ensuring conditional speculative instruction execution, the entire disclosure of which is hereby incorporated by reference herein. The contents of the security level register (121) may be used to control the selective deployment of the shadow cache.

[0075] Figure 5 A method for configuring a security operation in a processor (101) according to one embodiment is shown. For example, Figure 5 The method can be implemented in Figure 1 , 2 , 3 or 4 processors (101).

[0076] At block 201 , the processor ( 101 ) determines a first security preference setting (eg, 137 ) associated with a first program (eg, 135 ).

[0077] For example, a first security preference setting (eg, 137) can be associated with a first program (eg, 135) as an environment variable managed by an operating system for executing the first program (eg, 135).

[0078] For example, a first security preference setting (e.g., 137) may be associated with a first program (e.g., 135) as a security parameter of the first program (e.g., 135) configured in a lookup table for translating virtual memory addresses of the first program (e.g., 135) into physical memory addresses.

[0079] For example, the first security preference setting (e.g., 137) may be programmed in a first program (e.g., 135), wherein one or more instructions of the first program may be executed to identify or calculate the first security preference setting (e.g., 137).

[0080] At block 203 , the processor ( 101 ) loads a first security preference setting (eg, 137 ) into a security level register ( 121 ) of the processor ( 101 ).

[0081] At block 205, the processor (101) configures the functional unit (123) in a first security operating mode according to a first security preference setting (eg, 137) in the security level register (121).

[0082] At block 207, the processor (101) executes instructions of a first program (eg, 135) via a first secure operating mode.

[0083] For example, the first secure operating mode may include keeping data in an internal cache (107) in a scrambled form, using a shadow cache for ensuring conditional speculative instruction execution, and / or using separate branch target buffers for different call levels.

[0084] At block 209 , the processor ( 101 ) determines a second security preference setting (eg, 138 ) associated with a second program (eg, 136 ).

[0085] At block 211 , the processor ( 101 ) loads a second security preference setting (eg, 138 ) into a security level register ( 121 ) of the processor ( 101 ).

[0086] At block 213, the processor (101) configures the functional unit (123) in a second security operating mode according to a second security preference setting (eg, 138) in the security level register (121).

[0087] At block 215, the processor (101) executes instructions of a second program (eg, 136) via a second secure operating mode.

[0088] For example, the first mode may include a set of security operations performed that are not performed in the second mode. One example of such a security operation performed in the first mode but not the second mode is descrambling data in the cache (107) for use in the descrambling area (163) of the processor (101), and scrambling data before outputting the data from the descrambling area (163) into the cache (107).

[0089] Another example of such a safe operation that is performed in the first mode but not the second mode is the use of separate branch target buffers for different call levels.

[0090] Yet another example of such a security operation that is performed in the first mode but not the second mode is a shadow cache used to ensure conditional speculative instruction execution.

[0091] Instructions executed in the first security mode on the same data set may provide the same results as those executed in the second security mode. However, when executed in the first security mode, the possibility of security breaches is reduced. When executed in the second security mode, the execution time duration is reduced.

[0092] like Figure 3 and Figure 4 As described in , when the security level register (121) includes a second setting (e.g., 138), the security level register (121) can dynamically configure the functional unit (121) to bypass the logic circuits (e.g., 113 and 112). The logic circuits (e.g., 113 and 112) are active in the first security mode but are not used in the second security mode. The functional unit (121) can include an execution unit (115), a data path selector (127), a descrambler (113) / scrambler (112), a shadow cache, and / or a separate branch target buffer of the processor (101).

[0093] Figure 6 Showing that it can be implemented Figure 5 A computing system for a method of

[0094] Figure 6 The computing system may include a processor (101) having an internal cache (191), a memory device (105), an external cache (107), and a storage device (104) connected to the processor (101) and / or the memory device (105) via an interconnect (185).

[0095] For example, the processor (101) may have a functional unit (124) to execute instructions. The processor (101) may further include a register (111) to contain the memory address of the instruction to be executed in the functional unit (123), data / operands and / or the execution result of the instruction.

[0096] For example, registers 111 may include a program counter for loading instructions for execution, and a memory address register. When instructions are executed in processor 101, the memory address stored in the memory address register may be used to load operands for the instruction and / or store calculation results generated by executing the instruction.

[0097] The processor (101) may dynamically configure the security operation of the functional unit (123) based on the contents / settings contained in the security level register (121). For example, the security level register (121) may control Figure 3 or 4 data path selector (127) to select a data path (133 or 134), and / or control Figure 2 The key storage area (167) is used to identify the key lengths used for the scrambler (112) and the descrambler (113).

[0098] In some cases, the addresses used by registers of the processor (101) are virtual memory addresses; and the memory management unit (MMU) (125) can convert the virtual memory addresses into physical memory addresses to access external cache (107), memory device (105) and / or storage device (104).

[0099] For example, data in the memory device (105) may be cached in the external cache (107) of the processor (101) and / or the internal cache (191) of the processor (101).

[0100] For example, data in the external cache (107) may be cached in the internal cache (191).

[0101] For example, data in the storage device (104) may be cached in the memory device (105), in the external cache (107), and / or in the internal cache (191).

[0102] In some cases, a memory management unit (MMU) (125) controls the movement of data among the internal cache (191), the external cache (107), and the memory devices (198).

[0103] The technology disclosed herein is at least applicable to computer systems in which the processor is separated from the memory and the processor communicates with the memory and storage device via a communication bus and / or a computer network. In addition, the technology disclosed herein can be applied to computer systems in which the processing power is integrated into the memory / storage device. For example, a processing circuit including an execution unit and / or a register of a typical processor can be implemented in an integrated circuit and / or an integrated circuit package of a memory medium to perform processing in a memory device. Therefore, the processor (e.g., 101) as discussed above and illustrated in the figures does not have to be a central processing unit in a von Neumann architecture. The processor can be a unit integrated into the memory to overcome the von Neumann bottleneck, that is, the limitation of computing performance due to the limitation of the processing volume caused by the delay when data moves between a central processing unit and a memory separately configured according to the von Neumann architecture.

[0104] The description and drawings of the present disclosure are illustrative and should not be construed as limiting. Numerous specific details are described to provide a thorough understanding. However, in some cases, well-known or conventional details are not described to avoid obscuring the description. References to one or an embodiment in the present disclosure do not necessarily refer to the same embodiment; and such references mean at least one.

[0105] In the foregoing description, the present disclosure has been described with reference to specific exemplary embodiments of the present disclosure. It should be apparent that various modifications may be made to the present disclosure without departing from the broader spirit and scope as set forth in the following claims. Therefore, the description and drawings should be viewed in an illustrative rather than a restrictive sense.

Claims

1. A processor, comprising: a functional unit configured to execute instructions of a program; registers configured to control security operations of the functional units; Cache; and wherein when the register contains a first setting, the functional unit is configurable by the register to operate in a first secure operating mode; wherein when the register contains a second setting, the functional unit can be configured by the register to operate in a second secure operating mode; and The functional unit comprises: Data path selector; Execution unit; a first data path between the data path selector and the execution unit; and a second data path between the data path selector and the execution unit; wherein when in the first secure operating mode, the data path selector connects the cache to the execution unit via the first data path; and Wherein when in the second secure operating mode, the data path selector connects the cache to the execution unit via the second data path. 2 . The processor of claim 1 , wherein the set of secure operations in the first secure operating mode is different from the set of secure operations in the second secure operating mode.

3. The processor of claim 2, wherein when the register contains the second setting, the functional unit is configurable by the register to bypass logic circuits active in the first secure operating mode.

4. The processor of claim 2, wherein the functional unit is configurable to execute instructions faster in the second secure operating mode than in the first secure operating mode.

5. The processor of claim 1 , wherein the first data path includes a security circuit; and the second data path bypasses the security circuit; the security circuit includes a scrambler and descrambler, an encryption and decryption circuit, or an inversion circuit, or any combination thereof; and wherein the scrambler and the descrambler include a multiplexer configured to change the data by rearranging the order of bits according to a key; the inversion circuit inverts the values ​​of the bits according to the key; and the encryption and decryption circuit combines the values ​​of the bits according to the key.

6. The processor of claim 1, wherein the register includes the first setting when the processor is executing instructions of a first program; and the register includes the second setting when the processor is executing instructions of a second program.

7. The processor of claim 6, wherein the instructions of the first program load the first setting into the register during execution of the first program; and the instructions of the second program load the second setting into the register during execution of the second program.

8. The processor of claim 6, wherein the processor is configured to load a security preference setting associated with an object identified by an identifier provided in a virtual address of an instruction while the instruction is being executed in the processor.

9. A method for configuring a secure operation in a processor, comprising: loading first settings associated with a first program into registers of a processor having functional units controlled by the registers; configuring the functional unit in a first secure operating mode according to the first setting loaded in the register; executing instructions of the first program in the processor in the first secure operating mode; loading second settings associated with a second program into the register; configuring the functional unit in a second secure operating mode according to the second setting loaded in the register; executing instructions of the second program in the processor in the second secure operating mode; and selecting a data path between a cache of the processor and an execution unit of the processor based on the contents of the register; Wherein, when in the first security operation mode, the first data path is selected by the register; when in the second security operation mode, the second data path is selected by the register.

10. The method of claim 9, wherein at least one security operation performed in the first security operating mode is not performed in the second security operating mode; and the functional unit executes the same instruction faster in the second security operating mode than in the first security operating mode.

11. The method of claim 10, wherein the second data path bypasses logic circuitry; the first data path includes a scrambler and a descrambler; The second data path bypasses the scrambler and the descrambler; and The method further comprises: While in the first security operating mode, data is descrambled and scrambled on the first data path between the cache and the execution unit.

12. The method according to claim 11, further comprising: identifying the first setting based on a virtual address of an instruction of the first program to load the first setting into the register; and The second setting is identified based on a virtual address of an instruction of the second program to load the second setting into the register.

13. The method according to claim 11, further comprising: executing a first instruction of the first program to load the first setting into the register; and A second instruction of the second program is executed to load the second setting into the register.

14. A non-transitory computer-readable medium storing instructions which, when executed in a processor having registers and functional units, cause the processor to perform the method according to any one of claims 9 to 13.

Citation Information

Patent Citations

  • Static Identifications in Object-based Memory Access

    US20190339974A1

  • Separate Branch Target Buffers for Different Levels of Calls

    US20190339975A1

  • Shadow Cache for Securing Conditional Speculative Instruction Execution

    US20190339978A1

  • Data Protection in Computer Processors

    US20200042745A1

  • Key Management in Computer Processors

    US20200089625A1