Operation of a secure code segment on a processor core of a processing unit

JP2024541488A5Active Publication Date: 2024-11-15INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024531100
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-12-03
Filing Date
2022-11-09
Publication Date
2024-11-15
Estimated Expiration
2042-11-09

AI Technical Summary

Technical Problem

Existing multithreaded processor architectures struggle to efficiently execute secure code segments without interfering with non-secure code, leading to reduced performance and potential software failures due to inadequate protection of thread states beyond design states.

Method used

Implementing a method and system for exclusive secure execution of secure code segments on processor cores, ensuring uninterrupted execution, purging design and non-design states, and transitioning to a first execution mode post-execution to prevent interference and optimize resource utilization.

Benefits of technology

This approach enhances processor performance by minimizing interference and failures, allowing secure code segments to execute without disruption, thereby improving overall system efficiency and reliability.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

A computer-implemented method, computer system, and computer program product for operating secure code segments on a processor core of a processing unit, the processing unit being configured with at least one processor core. The method includes requesting exclusive secure execution of the secure code segments of the program code on the at least one processor core. The method also includes configuring the at least one processor core for exclusive secure execution for the secure code segments. The method further includes uninterruptibly executing the secure code segments on the at least one processor core. Additionally, the method includes clearing the architected and unarchitected state of the physical processor core from the at least one processor core. Finally, the method includes configuring the at least one processor core to a first execution mode for the program code on the at least one processor core.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates generally to data processing systems, and more particularly to a computer-implemented method, computer system, computer program product, and data processing system for operating secure code segments on a processor core of a processing unit. [Background technology]

[0002] A multithreaded processor may include multiple hardware threads that can execute simultaneously. One example of a multithreaded processor may be a simultaneous multithreaded (SMT) processor. Simultaneous multithreading allows instructions from more than one thread at a time to execute at any given instruction pipeline stage. Simultaneous multithreading may therefore allow multiple independent threads of execution to better utilize resources provided by the processor architecture. Simultaneous multithreading allows each processor in a virtual machine to be presented to an application as n processors, called threads.

[0003] Processes or threads from different customers, in the cloud or on-premise, can be virtualized on virtual machines (VMs) or containers and run on the same physical core. It is common to request that threads run in single-threaded mode.

[0004] One implementation of a pipeline for secure multi-threaded execution may be an integrated circuit for executing instructions, the integrated circuit including: a processor pipeline configured to execute instructions from two or more threads in parallel using execution units of the processor pipeline; and thread hazard circuitry configured to detect when an instruction of a first thread is designated as a sensitive instruction and, in response to detecting the sensitive instruction, to prevent instructions of threads other than the first thread from being executed using the execution units of the processor pipeline while the sensitive instruction is being executed by the execution units of the processor pipeline.

[0005] This implementation can only protect a single instruction that verifies that the architected state of a thread is isolated, and cannot take into account non-architected state.

[0006] While it is possible to permanently reserve cores for all secure work, this can effectively reduce overall processor performance if not performing secure work all the time, and this does not scale even if the majority of the work on a computer system requires a secure environment to run. Summary of the Invention

[0007] A computer-implemented method is proposed for operating secure code segments on processor cores of a processing unit, the processing unit being configured to run, by at least one processor core, a first execution mode to execute program code on the at least one processor core and to execute program code of operational instructions on the at least one processor core, the method including at least (i) requesting exclusive secure execution of the secure code segments of the program code on the at least one processor core, (ii) configuring the at least one processor core for exclusive secure execution for the secure code segments, (iii) uninterruptibly executing the secure code segments on the at least one processor core, (iv) clearing architected and unarchitected states of the physical processor core from the at least one processor core, and (v) configuring the at least one processor core to the first execution mode for executing the program code on the at least one processor core.

[0008] According to the proposed method, a secure code segment can require an exclusive secure context for at least a minimum time and a minimum number of operational instructions, which includes at least reliably placing a physical core in an exclusive secure mode under hardware control, executing uninterrupted for a minimum time and / or number of operational instructions, and finally flushing at least architected and unarchitected state of the physical core from cache storage or registers or memory when exiting the secure code segment or interrupting after an initial period and / or number of operational instructions.

[0009] Advantageously, interference between different code segments within a processor core can be avoided. The number of faults during the execution of a code segment can be reduced. Furthermore, preferably, the performance of a computer system can be improved by the proposed method of secure operation of a secure code segment within a processor core.

[0010] According to an embodiment of the present invention, at least the architected and non-architected states of the physical processor core may additionally or alternatively be saved before placing the processor core in the exclusive secure mode, so that after terminating the execution of the secure code segment, the architected and non-architected states of the physical processor core may be restored to continue the normal execution of the program code.

[0011] According to an embodiment of the present invention, at least the architected and unarchitected states of the physical processor core may additionally or alternatively be restored prior to setting the processor core in the first execution mode, such that after terminating execution of the secure code segment, the architected and unarchitected states of the physical processor core may be restored to continue normal execution of the program code.

[0012] According to an embodiment of the present invention, additionally or alternatively, the non-architectural state of the physical processor core may be purged prior to execution of the secure code segment, in particular from at least one cache storage of the physical processor core, so that the execution of the secure code segment does not cause interference with data already present.

[0013] According to an embodiment of the present invention, additionally or alternatively, the flushing of non-designed state of the physical processor cores may be performed in a hardware-controlled manner by the hardware of the processing unit, preferably to reduce the risk of software failure and subsequent insufficient flushing.

[0014] Additionally or alternatively, according to an embodiment of the invention, the first execution mode of the processor core may be a simultaneous multithreading mode, which allows multiple independent threads of execution to better utilize resources provided by the processor architecture and is the normal execution mode of a typical processor core.

[0015] According to an embodiment of the present invention, additionally or alternatively, the uninterruptible execution of the secure code segment can be defined for a minimum duration and / or a minimum number of instructions, thus ensuring unhindered execution of the secure code segment for efficient processing.

[0016] According to one embodiment of the invention, additionally or alternatively, the uninterruptible execution of the secure code segment may be controlled by a state machine, which may be an efficient way of controlling the uninterruptible execution of the secure code segment.

[0017] An embodiment of the present invention may additionally or alternatively prevent interruptions during execution of a secure code segment, and preferably the secure code segment may be executed without disruption for a minimal amount of time and / or number of operational instructions.

[0018] According to an embodiment of the present invention, additionally or alternatively, clearing the at least one processor core of architected and non-architected state after execution of the secure code segment may be initiated by an interrupt request, such that further successful execution of the program code in the first execution state may be achieved without interference with remaining data from execution of the secure code segment.

[0019] According to an embodiment of the present invention, the operating instructions may additionally or alternatively be implemented on a virtual machine or container. Preferably, processes / threads running on the same physical core from different customers in the cloud or on-premise may be virtualized on a virtual machine or container.

[0020] Further, a computer system for running a secure code segment on a processor core of a processing unit is proposed, the processing unit being configured by at least one processor core. The computer system comprises at least one processor unit having at least one processor core, the processor core being configured to run a first execution mode to execute program code on the at least one processor core and to execute program code of operational instructions on the at least one processor core. The computer system is configured to execute a method including at least (i) requesting exclusive secure execution of the secure code segment of the program code on the at least one processor core, (ii) configuring the at least one processor core to exclusive secure execution for the secure code segment, (iii) uninterruptibly executing the secure code segment on the at least one processor core, (iv) clearing the architected and unarchitected states of the physical processor core from the at least one processor core, and (v) configuring the at least one processor core to a first execution mode for executing the program code on the at least one processor core.

[0021] By running on the proposed computer system, a secure code segment can request an exclusive secure context for at least a minimum amount of time and / or a minimum number of operational instructions, which includes at least reliably placing a physical core in an exclusive secure mode under hardware control, executing uninterrupted for a minimum amount of time and / or a minimum number of operational instructions, and finally flushing at least architected and unarchitected state from cache storage or registers or memory of the physical core when exiting the secure code segment or when interrupting after an initial period and / or a minimum number of operational instructions.

[0022] Advantageously, interference between different code segments within a processor core can be avoided. The number of faults during the execution of a code segment can be reduced. Furthermore, preferably, the performance of a computer system can be improved by the proposed method of secure operation of a secure code segment within a processor core.

[0023] According to an embodiment of the present invention, additionally or alternatively, the computer system may be configured to preserve at least the architected and unarchitected states of the physical processor core before placing the processor core in the exclusive secure mode, such that after terminating execution of the secure code segment, the architected and unarchitected states of the physical processor core can be restored to continue normal execution of the program code.

[0024] According to an embodiment of the invention, additionally or alternatively, the computer system may be configured to restore at least the architected and unarchitected states of the physical processor core before the processor core was set to the first execution mode, such that after terminating execution of the secure code segment, the architected and unarchitected states of the physical processor core may be restored to continue normal execution of the program code.

[0025] According to an embodiment of the invention, additionally or alternatively, the computer system may be configured to flush non-architected state of the physical processor core before the secure code segment is executed, in particular from at least one cache storage of the physical processor core, so that the execution of the secure code segment does not interfere with data already present.

[0026] According to an embodiment of the present invention, the computer system may additionally or alternatively be configured for hardware-controlled cleanup of non-designed state of the physical processor cores by the processing unit hardware, preferably reducing the risk of software failure and subsequent insufficient cleanup.

[0027] Additionally or alternatively, according to an embodiment of the invention, the first execution mode of the processor core may be a simultaneous multithreading mode, which allows multiple independent threads of execution to better utilize resources provided by the processor architecture and is the normal execution mode of a typical processor core.

[0028] According to an embodiment of the present invention, additionally or alternatively, the computer system may be configured to execute the secure code segment uninterruptibly for a minimum period and / or a minimum number of instructions, thus ensuring unhindered execution of the secure code segment for efficient processing.

[0029] According to one embodiment of the invention, additionally or alternatively, the uninterruptible execution of the secure code segment may be controlled by a state machine, which may be an efficient way of controlling the uninterruptible execution of the secure code segment.

[0030] According to an embodiment of the invention, the computer system may additionally or alternatively be configured to prevent interruptions during execution of the secure code segment, and preferably the secure code segment may be executed without disruption for a minimal amount of time and / or number of operational instructions. According to an embodiment of the present invention, additionally or alternatively, clearing the at least one processor core of architected and non-architected state after execution of the secure code segment may be initiated by an interrupt request, such that further successful execution of the program code in the first execution state may be achieved without interference with remaining data from execution of the secure code segment.

[0031] According to an embodiment of the present invention, the operating instructions may additionally or alternatively be implemented on a virtual machine or container. Preferably, processes / threads running on the same physical core from different customers in the cloud or on-premise may be virtualized on a virtual machine or container.

[0032] Further, a preferred computer program product is proposed for executing secure code segments on a processor core of a processing unit, the processing unit being configured by at least one processor core. A computer system comprises at least one processor unit having at least one processor core, the processor core being configured to run a first execution mode to execute program code on the at least one processor core and to execute program code of operational instructions on the at least one processor core.

[0033] The computer program product comprises a computer-readable storage medium having program instructions embodied therein, the program instructions being executable by the computer system to cause the computer system to perform a method including (i) requesting exclusive secure execution of secure code segments of program code on at least one processor core; (ii) configuring the at least one processor core for exclusive secure execution for the secure code segments; (iii) uninterruptibly executing the secure code segments on the at least one processor core; (iv) clearing the at least one processor core of architected and unarchitected physical processor core state; and (v) configuring the at least one processor core to a first execution mode for executing the program code on the at least one processor core.

[0034] Furthermore, a data processing system is proposed for executing a data processing program comprising computer readable program instructions for carrying out the method described above.

[0035] The present invention, together with these and other objects and advantages, can best be understood from the following detailed description of illustrative embodiments, to which the invention is not limited. [Brief description of the drawings]

[0036] [Figure 1] 4 is a flow diagram of a computer-implemented method for running secure code segments on a processor core of a processing unit according to one embodiment of the present invention. [Diagram 2] FIG. 1 illustrates an exemplary embodiment of a data processing system for performing the method according to the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0037] In the drawings, like elements are referred to by the same reference numerals. These drawings are merely schematic representations and are not intended to describe the specific parameters of the invention. Moreover, these drawings are intended to depict only typical embodiments of the invention and therefore should not be considered as limiting the scope of the invention.

[0038] Exemplary embodiments described herein provide a computer system for executing secure code segments on a processor core of a processing unit, the processing unit being configured with at least one processor core. The computer system includes at least one processor unit having at least one processor core, the processor core configured to run a first execution mode to execute program code on the at least one processor core and to execute program code of operational instructions on the at least one processor core.

[0039] Exemplary embodiments may further be used in a method including at least (i) requesting exclusive secure execution of a secure code segment of program code on at least one processor core; (ii) configuring the at least one processor core for exclusive secure execution for the secure code segment; (iii) uninterruptibly executing the secure code segment on the at least one processor core; (iv) clearing design and non-design state from the at least one processor core; and (v) configuring the at least one processor core to a first execution mode for the program code on the at least one processor core.

[0040] FIG. 1 illustrates a flow diagram of a computer-implemented method for running secure code segments on a processor core of a processing unit 216 shown in FIG. 2 according to one embodiment of the present invention.

[0041] The processing unit 216 is configured, by the at least one processor core, to run a first execution mode to execute program code on the at least one processor core as normal execution.

[0042] A first execution mode of the processor core may be a simultaneous multithreading mode. Simultaneous multithreading allows multiple independent threads of execution to better utilize resources provided by the processor architecture and is the normal execution mode of a typical processor core.

[0043] The operating instructions can be implemented on a virtual machine or a container. Preferably, processes / threads running on the same physical core from different customers in the cloud or on-premise can be virtualized on a virtual machine or a container.

[0044] In step S100, program code of operational instructions is executed on at least one processor core in a first execution mode.

[0045] In step S102, an exclusively secure mode is requested for exclusively secure execution of a secure code segment of the program code on at least one processor core.

[0046] Optionally, in step S104, before setting the processor core in the exclusive secure mode, at least the architected and unarchitected states of the physical processor core may be saved, so that after terminating the execution of the secure code segment, the architected and unarchitected states of the physical processor core can be restored to continue normal execution of the program code.

[0047] Next, in step S106, at least one processor core is configured for exclusive secure execution for the secure code segment.

[0048] Also optionally, in step S108, the non-architected state of the physical processor core can be purged before executing the secure code segment. In particular, the non-architected state can be purged from at least one cache storage or register or memory of the physical processor core. The purging of the non-architected state of the physical processor core can be performed in a hardware-controlled manner by the hardware of the processing unit 216. Preferably, the risk of software failure and subsequent insufficient purging can be reduced. This ensures that the execution of the secure code segment does not cause interference with already existing data.

[0049] Then, in step S110, the secure code segment is executed on at least one processor core. The secure code segment is executed uninterruptibly for a minimum period of time and / or a minimum number of instructions. The uninterruptible execution of the secure code segment can be controlled by a state machine. A state machine can be an efficient way of controlling the uninterruptible execution of the secure code segment.

[0050] Interruptions may be prevented during execution of the secure code segment. Thus, unimpeded execution of the secure code segment may be ensured for efficient processing. Preferably, the secure code segment may be executed without disruption for a minimum amount of time and / or number of operational instructions.

[0051] After finishing the execution of the secure code segment, in step S112, the architected and non-architected state can be purged, in particular from at least one cache storage or register or memory of the at least one processor core. The purging of the architected and non-architected state from the at least one processor core after the execution of the secure code segment can be initiated by an interrupt request. Thus, further normal execution of the program code in the first execution state can be realized without interference with remaining data from the execution of the secure code segment.

[0052] Optionally, if the architected and unarchitected states were saved in step S104, then in step S112 at least the architected and unarchitected states of the physical processor core may be restored prior to setting the processor core to the first execution mode, so that after terminating execution of the secure code segment, the architected and unarchitected states of the physical processor core may be restored to continue normal execution of the program code.

[0053] Then, in step S114, the at least one processor core is set to a first execution mode for the program code on the at least one processor core and continues normal execution in step S116.

[0054] 2, a schematic diagram of an example of a data processing system 210 is shown. Data processing system 210 is only one example of a suitable data processing system and is not intended to suggest any limitation to the scope of use or functionality of the embodiments of the invention described herein. Nevertheless, data processing system 210 is capable of being implemented with and / or performing any of the functions described herein above.

[0055] Within data processing system 210 is computer system / server 212, which may operate in numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, or configurations, or combinations thereof, that may be suitable for use with computer system / server 212 include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the above systems or devices.

[0056] The computer system / server 212 may be described in the general context of computer system executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc., that perform particular tasks or implement particular abstract data types. The computer system / server 212 may be implemented in a distributed cloud computing environment where tasks are performed by remote processing devices linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media, including memory storage devices.

[0057] 2, computer system / server 212 in data processing system 210 is shown in the form of a general purpose computing device. Components of computer system / server 212 may include, but are not limited to, one or more processors or processing units 216, a system memory 228, and a bus 218 that couples various system components including the system memory 228 to the processing unit 216.

[0058] Bus 218 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures, including, by way of example and not limitation, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0059] Computer system / server 212 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer system / server 212 and includes both volatile and nonvolatile media, removable and non-removable media.

[0060] The system memory 228 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 230 and / or cache memory 232. The computer system / server 212 may further include other removable / non-removable volatile / non-volatile computer system storage media. By way of example only, the storage system 234 may be provided for reading from and writing to a non-removable non-volatile magnetic medium (not shown, but typically referred to as a "hard drive"). Although not shown, a magnetic disk drive may be provided for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), as well as an optical disk drive for reading from or writing to a removable non-volatile optical disk, such as a CD-ROM, DVD-ROM, or other optical media. In such instances, each may be connected to the bus 218 by one or more data media interfaces. As further shown and described below, the memory 228 may include at least one program product having a set (e.g., at least one) program module configured to implement the functions of an embodiment of the present invention.

[0061] By way of example and not limitation, a program / utility 240 having a set (at least one) program module 242 may be stored in memory 228, as well as an operating system, one or more application programs, other program modules, and program data. Each of the operating system, one or more application programs, other program modules, and program data, or a combination thereof, may comprise an implementation of a networking environment. The program modules 242 generally implement the functions and / or methods of embodiments of the invention described herein.

[0062] The computer system / server 212 may also communicate with one or more external devices 214, such as a keyboard, a pointing device, a display 224, one or more devices that allow a user to interact with the computer system / server 212, or any device that allows the computer system / server 212 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.), or a combination thereof. Such communication may occur through an input / output (I / O) interface 222. Additionally, the computer system / server 212 may communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), or a public network (e.g., the Internet), or a combination thereof, through a network adapter 220. As shown, the network adapter 220 communicates with other components of the computer system / server 212 through a bus 218. It is understood that other hardware and / or software components, not shown, may also be used with the computer system / server 212. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archiving storage systems.

[0063] The present invention may be a system, method, and / or computer program product, which may include a computer-readable storage medium (or media) having computer-readable program instructions for causing a processor to implement aspects of the present invention.

[0064] A computer readable storage medium may be a tangible device capable of holding and storing instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. A non-exhaustive list of more specific examples of computer readable storage media includes portable computer diskettes, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), static random access memories (SRAM), portable compact disk read-only memories (CD-ROM), digital versatile disks (DVD), memory sticks, floppy disks, mechanically encoded devices such as punch cards, or raised structures in grooves with instructions recorded thereon, and any suitable combination of the above. As used herein, a computer-readable storage medium should not be construed as being a transitory signal per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through a fiber optic cable), or electrical signals transmitted through wires. The computer readable program instructions described herein can be downloaded from a computer readable storage medium to the respective computing / processing device or to an external computer or storage device via a network, such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. The network can include copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in the respective computing / processing device. The computer readable program instructions for carrying out the operations of the present invention may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including object oriented programming languages ​​such as Smalltalk, C++, and traditional procedural programming languages ​​such as the "C" programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) may execute computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry to perform aspects of the present invention. Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.

[0065] These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, provide means for implementing the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams to produce a machine. These computer readable program instructions may also be stored in a computer readable storage medium, such that the computer readable storage medium on which the instructions are stored comprises an article of manufacture including instructions that implement aspects of the functions / operations specified in one or more blocks of the flowcharts and / or block diagrams, and may direct a computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner.

[0066] The computer readable program instructions may also be loaded into a computer, other programmable data processing apparatus, or other device such that the instructions, which execute on a computer, other programmable apparatus, or other device, implement the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams, causing the computer, other programmable apparatus, or other device to perform a series of operational steps to produce a computer-implemented process.

[0067] The flowcharts and block diagrams in these figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowcharts or block diagrams may represent a module, segment, or portion of instructions, which includes one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions described in the blocks may occur out of the order shown in these figures. For example, two blocks shown in succession may in fact be executed substantially simultaneously, or the blocks may be executed in the reverse order, depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a special purpose hardware-based system that performs the specified functions or operations or executes a combination of special purpose hardware and computer instructions.

[0068] The description of various embodiments of the present invention is presented for illustrative purposes and is not intended to be exhaustive or limiting to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terms used in this specification are selected to best explain the principles of the embodiments, practical applications, or technical improvements to the technology found in the market, or to enable those skilled in the art to understand the embodiments disclosed herein.

[0069] Further exemplary embodiments of the present disclosure are described in the following numbered clauses.

[0070] Numbered Clause 1: A computer-implemented method for executing secure code segments on a processor core of a processing unit (216), the processing unit (216) being configured to run, by at least one processor core, a first execution mode to execute program code on the at least one processor core and to execute program code of operational instructions on the at least one processor core, the method comprising: (i) requesting exclusive secure execution of a secure code segment of program code on at least one processor core; (ii) configuring at least one processor core for exclusive secure execution for the secure code segment; (iii) uninterruptibly executing a secure code segment on at least one processor core; and (iv) clearing the physical processor core's design state and non-design state from at least one processor core; and (v) configuring at least one processor core to a first execution mode for executing program code on the at least one processor core.

[0071] Numbered clause 2: The method of numbered clause 1, further comprising preserving at least an architected state and a non-architected state of the physical processor core prior to setting the processor core in the exclusive secure mode.

[0072] Numbered clause 3: The method according to numbered clause 1 or 2, further comprising recovering at least an architected state and a non-architected state of the physical processor core before setting the processor core in the first execution mode.

[0073] Numbered clause 4: A method according to any one of numbered clauses 1 to 3, further comprising flushing non-design state of the physical processor core from at least one cache storage of the physical processor core prior to executing the secure code segment.

[0074] Numbered clause 5: The method of numbered clause 4, wherein clearing the non-designed state of the physical processor core is performed in a hardware-controlled manner by hardware of the processing unit (216).

[0075] Numbered clause 6: A method according to any one of numbered clauses 1 to 5, wherein the first execution mode for executing program code on a processor core is a simultaneous multithreading mode.

[0076] Numbered clause 7: The method of any one of numbered clauses 1 to 6, wherein the uninterruptible execution of the secure code segment on at least one processor core is defined for a minimum duration or a minimum number of instructions, or both.

[0077] Numbered clause 8: A method according to any one of numbered clauses 1 to 7, wherein the uninterruptible execution of the secure code segment on at least one processor core is controlled by a state machine. Numbered clause 9: A method according to any one of numbered clauses 1 to 8, wherein interruption during execution of a secure code segment is prevented.

[0078] Numbered clause 10: A method according to any one of numbered clauses 1 to 9, wherein clearing out the architected and unarchitected state of a physical processor core from at least one processor core after execution of a secure code segment is initiated by an interrupt request.

[0079] Clause 11: A method according to any one of clauses 1 to 10, wherein the operating instructions are implemented on a virtual machine or on a container.

[0080] Numbered clause 12: A computer system (212) for executing secure code segments on a processor core of a processing unit (216), the processing unit (216) being configured with at least one processor core, the computer system (212) comprising at least one processor unit (216) having at least one processor core, the processor core being configured to run a first execution mode to execute program code on the at least one processor core, and to execute program code of operational instructions on the at least one processor core, the computer system (212) comprising: (i) requesting exclusive secure execution of a secure code segment of program code on at least one processor core; (ii) configuring at least one processor core for exclusive secure execution for the secure code segment; (iii) uninterruptibly executing a secure code segment on at least one processor core; and (iv) clearing the physical processor core's design state and non-design state from at least one processor core; and (v) configuring at least one processor core to a first execution mode for executing program code on the at least one processor core, the computer system being configured to perform the method described in any one of numbered clauses 1 to 11.

[0081] Numbered clause 13: The computer system of numbered clause 12, configured to preserve at least an architected state and a non-architected state of a physical processor core prior to setting the processor core into an exclusive secure mode.

[0082] Numbered clause 14: A computer system as described in numbered clause 12 or 13, configured to restore at least a designed state and a non-designed state of the physical processor core before the processor core was set to the first execution mode.

[0083] Numbered clause 15: A computer system as described in any one of numbered clauses 12 to 14, configured to purge non-design state of a physical processor core from at least one cache storage of the physical processor core before a secure code segment is executed.

[0084] Numbered clause 16: A computer system as described in any one of numbered clauses 12 to 15, configured to clear non-designed state of a physical processor core in a hardware-controlled manner by hardware of the processing unit.

[0085] Numbered clause 17: A computer system as described in any one of numbered clauses 12 to 16, wherein a first execution mode for executing program code on a processor core is a simultaneous multithreading mode.

[0086] Numbered clause 18: A computer system as described in any one of numbered clauses 12 to 17, configured to uninterruptibly execute secure code segments on at least one processor core for a minimum period of time or a minimum number of instructions or both.

[0087] Numbered clause 19: A computer system as described in any one of numbered clauses 12 to 18, wherein uninterruptible execution of secure code segments on at least one processor core is controlled by a state machine.

[0088] Numbered clause 20: A computer system as described in any one of numbered clauses 12 to 19, configured to prevent interruption during execution of a secure code segment.

[0089] Numbered clause 21: A computer system as described in any one of numbered clauses 12 to 20, wherein clearing of the architected state and non-architected state of the physical processor core from at least one processor core after execution of a secure code segment is initiated by an interrupt request.

[0090] Numbered clause 22: A computer system as described in any one of numbered clauses 12 to 21, wherein operating instructions are implemented on a virtual machine or a container.

[0091] Numbered clause 23: A computer program product for operating a secure code segment on a processor core of a processing unit (216), the processing unit (216) being configured to run, by at least one processor core, a first execution mode to execute program code on the at least one processor core, and to execute program code of operational instructions on the at least one processor core, the computer program product comprising a computer readable storage medium having program instructions embodied therein, the program instructions being configured to be executed by a computer system (212) to: (i) requesting exclusive secure execution of a secure code segment of program code on at least one processor core; (ii) configuring at least one processor core for exclusive secure execution for the secure code segment; (iii) uninterruptibly executing a secure code segment on at least one processor core; and (iv) clearing the physical processor core's design state and non-design state from at least one processor core; and (v) configuring at least one processor core into a first execution mode for executing program code on the at least one processor core.

[0092] Numbered clause 24: A data processing system (210) for executing a data processing program (240) comprising computer readable program instructions for carrying out the method according to any one of numbered clauses 1 to 11.

[0093] Numbered clause 25: An integrated circuit for executing instructions for operating a secure code segment on a processor core of a processing unit, the processing unit being configured by at least one processor core, a computer system comprising at least one processor unit having at least one processor core, the processor core being configured to run a first execution mode to execute program code on the at least one processor core, and to execute program code of operational instructions on the at least one processor core, the integrated circuit comprising: (i) requesting exclusive secure execution of a secure code segment of program code on at least one processor core; (ii) configuring at least one processor core for exclusive secure execution for the secure code segment; (iii) uninterruptibly executing a secure code segment on at least one processor core; and (iv) clearing the physical processor core's design state and non-design state from at least one processor core; and (v) configuring at least one processor core to a first execution mode for executing program code on the at least one processor core, the integrated circuit being configured to perform the method described in any one of numbered clauses 1 to 11.

Claims

1. 1. A computer-implemented method for operating secure code segments on a processor core of a processing unit, the processing unit being configured to run, by at least one processor core, a first execution mode to execute program code on the at least one processor core and to execute program code of operational instructions on the at least one processor core, the method comprising: requesting exclusive secure execution of a secure code segment of said program code on said at least one processor core; configuring the at least one processor core for exclusive secure execution for the secure code segment; uninterruptibly executing the secure code segment on the at least one processor core; clearing the at least one processor core of designed and undesigned physical processor core state; and configuring the at least one processor core to the first execution mode for executing program code on the at least one processor core.

2. 2. The computer-implemented method of claim 1, further comprising preserving at least the architected state and the non-architected state of the physical processor core prior to placing the processor core in an exclusive secure mode.

3. 2. The computer-implemented method of claim 1, further comprising: recovering at least the architected state and the non-architected state of the physical processor core before setting the processor core to the first execution mode.

4. 2. The computer-implemented method of claim 1, further comprising flushing the non-architected state of the physical processor core from at least one cache storage of the physical processor core prior to executing the secure code segment.

5. 5. The computer-implemented method of claim 4, wherein clearing the non-designed state of the physical processor core is performed in a hardware-controlled manner by hardware of the processing unit.

6. 2. The computer-implemented method of claim 1, wherein the first execution mode for executing program code on the processor core is a simultaneous multithreading mode.

7. 2. The computer-implemented method of claim 1, wherein uninterruptibly executing the secure code segment on the at least one processor core is defined for a minimum duration and a minimum number of instructions.

8. 2. The computer-implemented method of claim 1, wherein uninterruptibly executing the secure code segment on the at least one processor core is controlled by a state machine.

9. The computer-implemented method of claim 1 , wherein interruptions during execution of the secure code segment are prevented.

10. 2. The computer-implemented method of claim 1, wherein clearing the architected state and the non-architected state of the physical processor core from the at least one processor core after execution of the secure code segment is initiated by an interrupt request.

11. The computer-implemented method of claim 1 , wherein the operating instructions are implemented on a virtual machine or a container.

12. 1. A computer system for executing secure code segments on a processor core of a processing unit, the processing unit being configured with at least one processor core, the computer system comprising at least one processor unit having at least one processor core, the processor core being configured to run a first execution mode to execute program code on the at least one processor core and to execute program code of operational instructions on the at least one processor core, the computer system comprising: requesting exclusive secure execution of a secure code segment of said program code on said at least one processor core; configuring the at least one processor core for exclusive secure execution for the secure code segment; uninterruptibly executing the secure code segment on the at least one processor core; clearing the at least one processor core of designed and undesigned physical processor core state; and setting the at least one processor core to the first execution mode for executing program code on the at least one processor core.

13. 13. The computer system of claim 12, configured to preserve at least the architected state and the non-architected state of the physical processor core prior to placing the processor core in an exclusive secure mode.

14. 13. The computer system of claim 12, configured to restore at least the architected state and the non-architected state of the physical processor core before the processor core is set to the first execution mode.

15. 13. The computer system of claim 12, further configured to purge the non-architected state of the physical processor core from at least one cache storage of the physical processor core before the secure code segment is executed.

16. 16. The computer system of claim 15, configured to purge the non-designed state of the physical processor core by hardware of the processing unit in a hardware-controlled manner.

17. 13. The computer system of claim 12, wherein the first execution mode for executing program code on the processor core is a simultaneous multithreading mode.

18. 13. The computer system of claim 12, configured to execute the secure code segment uninterruptibly on the at least one processor core for a minimum duration and a minimum number of instructions.

19. 13. The computer system of claim 12, wherein the uninterruptible execution of the secure code segment on the at least one processor core is controlled by a state machine.

20. 13. The computer system of claim 12, configured to prevent interruption during execution of the secure code segment.

21. 13. The computer system of claim 12, wherein clearing the architected state and the non-architected state of the physical processor core from the at least one processor core after execution of the secure code segment is initiated by an interrupt request.

22. 13. The computer system of claim 12, wherein the operating instructions are implemented on a virtual machine or a container.

23. Program code for causing a processor core to execute the computer-implemented method of claim 1.

24. 2. A data processing system for executing a data processing program comprising computer readable program instructions for performing the computer implemented method of claim 1.

25. 1. An integrated circuit for executing instructions for operating a secure code segment on a processor core of a processing unit, the processing unit being configured with at least one processor core, the integrated circuit comprising at least one processor unit having at least one processor core, the processor core being configured to run a first execution mode to execute program code on the at least one processor core, and to execute program code of operational instructions on the at least one processor core, the integrated circuit comprising: requesting exclusive secure execution of a secure code segment of said program code on said at least one processor core; configuring the at least one processor core for exclusive secure execution for the secure code segment; uninterruptibly executing the secure code segment on the at least one processor core; clearing the at least one processor core of designed and undesigned physical processor core state; and setting the at least one processor core to the first execution mode for executing program code on the at least one processor core.