Apparatus and method for providing a one-time programmable memory component in a virtual machine monitor of a computing device

By using the processor and memory in the computing device, high-privilege level memory pool initialization and write protection are realized, which solves the problems of data integrity protection and flexible adjustment of the number of OTP memories in the computer memory, and reduces the cost and complexity of hardware-based implementation. sex.

CN112534416BActive Publication Date: 2024-10-29HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201880096378.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-08-08
Publication Date
2024-10-29
Estimated Expiration
2038-08-08

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively protect the integrity of important data in computer memory while flexibly adjusting the number of write-once-read-many memories, and the cost of hardware-based implementation is high.

Method used

By using the processor and memory in the computing device, a first software process initializes the memory pool at a high privilege level and performs write protection at a second privilege level, providing a one-time programmable memory function that allows dynamically increasing or decreasing the OTP memory. quantity, avoiding high cost and complexity.

Benefits of technology

It achieves reliable protection of the integrity of important data in computer memory, while avoiding the high cost and complexity of hardware-based write-once-read-many memory, and provides flexible OTP memory configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112534416B_ABST
    Figure CN112534416B_ABST
Patent Text Reader

Abstract

A device includes a processor and a memory. The processor and the memory are used to provide: a first software process, the first software process is used to execute at a first privilege level; a second software process, the second software process is used to execute at a second privilege level, wherein the first privilege level is more restrictive than the second privilege level. The processor is used to: initialize a memory pool in the memory at the first privilege level; allocate a memory block at the first privilege level; send a request to the second software process to write-protect the memory block; and write-protect the allocated memory block at the second privilege level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Aspects of the present disclosure relate generally to computing devices and, more particularly, to management of computer memory in computing devices. Background Art

[0002] Modern computer applications often need to allocate memory and store data in the computing devices that host them. User applications are usually supported by an operating system (OS) and need to request the OS to allocate various types of memory for them. Data stored in certain types of memory often remain unchanged for a long time and may be very important to the security of the system. This data may become an attractive target for hackers and computer malware. Unauthorized modifications may result in system downtime or loss of monetary value.

[0003] One method of preventing data from being accidentally modified is to use a type of computer memory that is configured to write once and thereafter keep the written value as a constant, where the constant value can be read at any time but will not be modified. This type of computer memory can be called a write-once read-many memory. The write-once read-many memory can be based on technologies such as efuse-type computer memory. Writing to efuse memory involves permanently changing the metal connection (called a fuse) to set the data. This ensures that the data will never be changed once written through the physical properties of the memory. However, the efuse memory will increase the cost of the computing device and also has the disadvantage that the number of efuse memories is fixed during manufacturing and is not easy or economical to increase.

[0004] Many electronic products, such as personal computers and smartphones, store static important data in random access memory. Then, the OS is used to provide memory management services to protect the important data. By protecting data through the OS, existing hardware and software resources can be used to ensure the integrity of the data and prevent the data from being maliciously attacked. However, since the OS is large and complex, it exposes a larger attack surface and therefore poses a greater security risk than other software components. Once damaged, the data protected by the OS is also at risk.

[0005] Therefore, there is a need for improved methods and apparatus that can reliably protect the integrity of important data stored in computer memory while having the flexibility to easily change the amount of memory configured for write-once-read-many operations that can be used to store important data. It is therefore desirable to provide methods and apparatus that address at least some of the above-mentioned problems. Summary of the invention

[0006] It is an object of the present invention to provide improved methods and apparatus that can provide one-time programmable memory functionality without the costs or other limitations typically associated with conventional hardware-based write-once-read-many memories.

[0007] According to a first aspect, the above and other objects and advantages are obtained by an apparatus including a processor and a memory. The processor and the memory are used to provide: a first software process, the first software process is used to execute at a first privilege level; a second software process, the second software process is used to execute at a second privilege level, wherein the first privilege level is more restrictive than the second privilege level. The processor is used to: initialize a memory pool within the memory at the first privilege level; allocate a memory block at the first privilege level; the processor is used to: send a request to the second software process to write-protect the memory block; write-protect the allocated memory block at the second privilege level. The write-protected memory block has all the functions and security advantages of a conventional write-once-read-many memory, but in contrast, the apparatus can easily increase or decrease the amount of one-time programmable (OTP) memory without incurring the high cost and other disadvantages associated with hardware-based write-once-read-many memory.

[0008] In a first possible implementation of the apparatus provided in the first aspect, the processor is configured to receive a memory allocation request within the first software process, wherein the memory allocation request is sent by a software application. The software application sending the request is executed at the first privilege level or at a privilege level that is more restrictive than the first privilege level. This allows the first process to allocate and manage OTP memory for other applications executed within the apparatus.

[0009] In a possible implementation of the apparatus provided in the first aspect, the processor is configured to: receive a request to write data to the allocated memory block within the first process; and write the data to the allocated memory block at the first privilege level. This allows an application requesting allocation of OTP memory to initialize the OTP memory with required data.

[0010] In a possible implementation of the device provided in the first aspect, the first software process includes a kernel, and the second software process includes a virtual machine monitor. The processor is used to execute the kernel at the first privilege level and execute the virtual machine monitor at the second privilege level. This provides a convenient method to easily implement the novel OTP memory function disclosed herein for software applications in a computing device.

[0011] In a possible implementation of the device provided in the first aspect, the first software process includes a kernel, and the second software process includes a secure execution environment. The processor is used to execute the kernel at the first privilege level and execute the secure execution environment at the second privilege level. This provides an alternative method for implementing novel OTP memory functions in software of a computing device.

[0012] In a possible implementation manner of the apparatus provided in the first aspect, the apparatus comprises a mobile communication device. The OTP memory function is particularly useful when implemented in a mobile communication device (eg, a smart phone).

[0013] According to a second aspect, the above and other objects and advantages are obtained by a method comprising executing a first software process at a first privilege level and executing a second software process at a second privilege level, wherein the first privilege level is more restrictive than the second privilege level. A memory pool is initialized at the first privilege level, and a memory block is allocated at the first privilege level. The memory block is write-protected at the second privilege level. The write-protected memory block has all the functions and security advantages of a conventional write-once-read-many memory, but in contrast, the device can easily increase or decrease the amount of OTP memory without incurring the high cost and other disadvantages associated with hardware-based OTP memory.

[0014] In a possible implementation of the method provided in the second aspect, the method further includes: receiving a memory allocation request from a third software process within the first software process, wherein the third software process is executed at the first privilege level or at a privilege level that is more restrictive than the first privilege level. This allows the first process to provide OTP allocation services to other applications executed within the device.

[0015] In a possible implementation of the method provided in the second aspect, the method further includes: receiving a request to write data to the allocated memory block within the first software process; and writing the data to the allocated memory block at the second privilege level. This allows an application requesting allocation of OTP memory to initialize the OTP memory with required data.

[0016] In a possible implementation of the method provided in the second aspect, the first process includes a kernel, and the second process includes a virtual machine monitor. This provides a convenient method to easily implement the novel OTP memory function disclosed herein for software applications in a computing device.

[0017] In a fourth possible implementation of the method provided in the second aspect, or in any possible implementation of the first to third possible implementations of the second aspect, the first software process includes a kernel, and the second software process includes a secure execution environment. This provides an alternative method for implementing novel OTP memory functionality in software of a computing device.

[0018] In a possible implementation manner of the method provided in the second aspect, the method is executed in a mobile communication device.

[0019] According to a third aspect, the above and other objects and advantages are obtained by a non-transitory computer-readable medium having program instructions stored thereon, which, when executed by a processor, cause the processor to perform the method provided according to the second aspect and possible implementations.

[0020] These and other aspects, implementations and advantages of the exemplary embodiments will become apparent from the embodiments described herein when considered in conjunction with the accompanying drawings. It should be understood, however, that such description and drawings are for illustrative purposes only and are not intended to limit the invention; any limitations of the invention should be understood by reference to the appended claims. Additional aspects and advantages of the invention will be set forth in the subsequent description, and some aspects and advantages will be apparent from the description or may be learned by practicing the invention. In addition, aspects and advantages of the invention may be realized and obtained by the means or combinations specifically indicated in the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In the following detailed description of the present disclosure, the present invention will be explained in more detail with reference to example embodiments shown in the accompanying drawings, in which:

[0022] Figure 1 A block diagram of an exemplary computing device for providing one-time programmable (OTP) memory functionality provided by aspects of the disclosed embodiments is shown.

[0023] Figure 2 A software flow chart illustrating an exemplary method for providing one-time programmable memory functionality in a computing device provided by aspects of the disclosed embodiments. DETAILED DESCRIPTION

[0024] Figure 1A block diagram of an exemplary computing device 100 for providing one-time programmable (OTP) memory functionality in a computing device provided by aspects of the disclosed embodiments is shown. The computing device 100 can be advantageously incorporated into various types of computing devices (e.g., mobile phones, phablets, tablet computers, laptop computers, set-top boxes, televisions, automobiles, etc.), and can be advantageously used to provide one-time programmable memory functionality within the computing device 100. The computing device 100 includes a processor 102 communicatively coupled to a computer memory or storage 104. The processor 102 is used to read and execute program instructions stored in the storage 104.

[0025] The processor 102 may be a single processing device, or may include multiple processing devices, including special purpose devices, such as digital signal processing (DSP) devices, microprocessors, special processing devices, parallel processing cores, or general purpose computer processors. In some embodiments, the processor 102 may include a central processing unit (CPU) working in conjunction with a graphics processing unit (GPU), which may include a DSP or other dedicated graphics processing hardware. The processor 102 is used to read non-transient program instructions from the memory 104 and execute embodiments of the methods and processes disclosed herein.

[0026] The memory 104 may be any suitable type of computer memory capable of storing and retrieving computer program instructions and / or data. The memory 104 may be a combination of various types of volatile and non-volatile computer memory, such as read only memory (ROM), random access memory (RAM), magnetic or optical disks, or other types of computer operable memory capable of retaining computer program instructions and data.

[0027] The memory 104 is used to store software program instructions or software programs and any related data that may be useful to the computing device 100. The software programs stored in the memory 104 are organized into various software modules or components, which can be represented using terms based on the type or functionality provided by each software component. For example, the software components may include an operating system (OS), a virtual machine monitor, device or other hardware drivers, and / or various types of user applications, such as a media player, an email application, a banking application, etc.

[0028] The software components can be executed by the processor 102 individually or in combination within a collection of computing resources referred to as process spaces or processes 110, 112, 106. Each process (e.g., process A 110, process B 112, or user space 106) is maintained separately by the processor 102 and includes a collection of computing resources. The collection of computing resources associated with the process spaces 106, 110, 112 is accessible to software programs executed within the process, and may include resources such as virtual memory space and / or hardware components. The processor 102 is used to separate and isolate each process space 106, 110, 112 from other process spaces when necessary, so that programs executed in one process space can be prevented from accessing or modifying computing resources associated with different process spaces. As used herein, the term "process space" or "process" refers to a collection of computing resources accessible to one or more software programs executed within a process space.

[0029] In order to provide security and prevent one process (e.g., user space 106) from inadvertently or maliciously accessing or modifying computing resources belonging to a different process (e.g., process A 110), the processor 102 implements and enforces a system of privilege levels. A process executing at one privilege level is not allowed to view or access computing resources associated with a different process executing at the same privilege level or at a lower or more restrictive privilege level. A more restrictive privilege level is a privilege level that allows access to a smaller set of computing resources than other privilege levels. Conversely, a less restrictive privilege level is a privilege level that allows access to a larger set of computing resources than other privilege levels.

[0030] For example, a processor based on the Acorn RISK machine ARMv8-A architecture (herein referred to as the ARM architecture) provides four privilege levels (also referred to as exception levels). Exception level 0 (EL0) is called non-privileged execution and is the lowest privilege level (least privileged and most restricted), while exception level 3 (EL3) is the highest privilege level (most privileged and least restricted). In a computing device based on the ARM architecture, exception level 1 (EL1) is typically used to execute operating system processes, and exception level 2 (EL2) is used to provide virtual machine monitor support. A process executed at the lowest privilege level is allowed to access and modify computing resources associated with its own process, but is not allowed to access or modify computing resources associated with any other process executed on the computing device 100. The application 108 of the user space 106 is typically executed at the lowest privilege level EL0, which is the most restrictive privilege level.

[0031] In contrast, a process executing at the next higher privilege level (e.g., EL1 in the ARM example described above) can access and modify the computing resources of processes executing at the lowest privilege level (EL0), but cannot access, view, or modify the computing resources of any process executing at the same or higher privilege level (e.g., EL2 or EL3). Therefore, the lowest privilege level EL0 is more restrictive than the privilege level EL1.

[0032] In the apparatus 100, the process B 112 executes at a privilege level that is higher and less restrictive than the privilege level of the process A 110 or the user space process 106. The process A 110 executes at a privilege level that is lower and more restrictive than the privilege level of the process B 112, and the privilege level of the process A 110 is higher and less restrictive than the privilege level of the user space process 106. The user space process 106 executes at a privilege level that is lower and more restrictive than the privilege level of the process A 110 and the privilege level of the process B 112. This allows the process A 110 to access and modify the computing resources of all applications 108 executing in the user space process 106, but prevents the process A 110 from accessing or modifying any computing resources associated with the process B 112.

[0033] In some embodiments, the process A 110 may be an operating system for creating and managing the user space process 106. In this embodiment, the process A 110 executes at a higher privilege level than the user space process 106, thereby allowing the process A 110 to create, access, and destroy the user space process 106, while preventing any application 108 executed within the user space process 106 from accessing or modifying any computing resources associated with the process A 110.

[0034] To aid understanding, the exemplary computing device 100 is shown as using a single process at each privilege level: user space process 106, process A 110, and process B 112. Those skilled in the art will readily recognize that the computing device 100 may advantageously employ multiple processes at each privilege level, or have additional processes executing at other privilege levels, without departing from the spirit and scope of the present disclosure.

[0035] In one embodiment, the process B 112 may be a virtual machine monitor for creating and managing a special type of process space called a virtual machine. A virtual machine is a type of process space used to simulate a physical computer, and a virtual machine monitor is typically used to execute multiple virtual machines on a single computing device (e.g., the computing device 100). The process B 112 is executed at a higher privilege level than the process A 110 or the user space process 106, thereby preventing the user space process 106 (e.g., the user application 108) or the process A 110 (e.g., the operating system) from accessing or modifying computer resources reserved for the process B 112. This allows the virtual machine monitor (the process B 112) to isolate the process A 110 (e.g., the operating system) in a separate process space, thereby preventing the process A 110 from accessing or modifying computer resources reserved for the process B 112.

[0036] User applications 108 executing in the user space process 106 are not allowed to access memory management functions necessary to allocate or otherwise control the memory 104. Access to memory management functions (e.g., hardware memory controllers) is reserved for higher privileged processes, including the process A 110 and the process B 112. For example, in some embodiments, non-privileged processes such as the user space process 106 have an abstraction of the memory 104 (commonly referred to as virtual memory or virtual memory space) and cannot access, and in fact are not even aware of, the physical memory devices that make up the memory 104. The user space process 106 has no information about how the virtual memory space relates to the physical computer memory 104. When a lower privileged process (e.g., the user space process 106) requires memory management functions (e.g., memory allocation, initialization, etc.), the lower privileged process must send a request to a higher privileged process (e.g., the process A 110) (in some embodiments, the process A 110 may include an operating system) to perform the required memory operation for the lower privileged process.

[0037] In operation, as part of a system boot process, the computing device is configured to cause the process A 110 to initialize 150 a portion of the memory 104 as an OTP memory pool 114 for use as OTP memory. The OTP memory pool 114 is protected in a manner that prevents the application 108 or any application executed in a lower privileged user process 106 from accessing or modifying any data stored in the OTP memory pool 114.

[0038] When the process A 110 receives a request 152 for the OTP memory from the user application 108, a memory block 116 is reserved 154 in the OTP memory pool 114. The memory block 116 is available for use by the user application 108. In some embodiments, it is desirable to fill or initialize 156 the memory block 116 with data that needs to remain constant and unchanged for a long period of time.

[0039] The request 152 for OTP memory may be sent by a user application 116 that executes at a lower or more restrictive priority than the priority of the process A 110. Alternatively, the request 152 for OTP memory may be received from any software process that executes at a lower priority than the process A 110 or at the same priority as the process A 110. For example, a software program executing in the process A 110 may send the request 152 for OTP memory.

[0040] Because most or all of the data stored in the memory block 116 remains unchanged for a long time, it is an attractive target for malware programs or hackers to access or modify. In order to support the rich computing experience expected by the user application 108, the process A 110 typically includes a wide range of functions, such as those provided by a full-featured operating system kernel. Examples of rich operating system kernels include, for example, GOOGLE TM Developed Android OS, APPLE TM The operating system kernel provided by an operating system (OS) such as the iOS developed by the developer or the widely distributed LINUX OS. Unfortunately, the rich feature set provided by the operating system kernel results in a large and somewhat complex software program, which is generally determined to have an unacceptably large attack surface. Vulnerabilities in the operating system can pose security issues, especially when the data stored in the OTP memory block 116 includes sensitive confidential information (such as key material, account numbers, and access credentials).

[0041] In order to minimize the risk of unauthorized access or modification of data in the memory block 116, the memory block 116 is write-locked using the process B 112 executing at a higher privilege level than the process A 110. A request 158 ​​to write-protect the memory block 116 is sent to the process B 112, and in response, the process B 112 write-protects (160) the memory block 116. The processor 102 is configured to retain access to a memory management function that creates and removes a write lock on the higher privileged process B 112, thereby preventing the process A 110 and any user space process 106 from modifying data stored in the memory block 116. From the perspective of the process A 110 and the application 108 executing in the user space 106, the memory block 116 effectively becomes a one-time programmable memory.

[0042] To maintain a high level of security, the process B 112 may include a smaller and less complex software program that exposes a significantly smaller attack surface than the program code executed in the process A 110. Since the software executed in the process B 112 is more secure, the process B 112 can reliably maintain write protection for the OTP memory block 116.

[0043] To help understand, it is instructive to consider an embodiment of a computing device 100 in which the process A 110 is an operating system kernel and the process B 112 is a virtual machine monitor. It should be understood that the exemplary embodiments including an OS or kernel and a virtual machine monitor are presented in the following description only to help understand, and the embodiments and processes disclosed herein are not limited thereto and can be advantageously used with any type of software program executed in the process A 110 and the process B 112.

[0044] An OS is a class or type of software program that abstracts the underlying computer resources and provides services to ensure the normal operation of applications. Any suitable software program, such as Linux TM OS, Windows TM OS、Android TM , iOS, or other operating systems or application frameworks, are suitable for use as a kernel or OS kernel. An OS can be implemented as a single software program or with a central application to provide a larger set of functionality by taking advantage of a set of additional utilities and extensions to handle basic abstractions and services. As used herein, the term "kernel" or "OS kernel" refers to the central application portion of an operating system.

[0045] The kernel executed in the process A 110 is used to execute and manage the life cycle of the user space process 106 at an intermediate privilege level and allocate resources for it. The kernel executed in the process A 110 can be used to execute multiple user space processes 106, each of which has multiple application programs 108. The intermediate privilege level used to execute the kernel 110 is higher than the privilege level used to execute the user space process 106, thereby allowing the kernel process A 110 to load and / or start the application program 108 in the user space process 106, while preventing any application program 108 executed in the user space process 106 from accessing or damaging the kernel process A 110. The intermediate privilege level used to execute the kernel in the process A 110 is lower than that of the process B, thereby preventing the OS kernel from accessing or modifying computer resources and memory functions reserved for the process B 112.

[0046] In addition to presenting a relatively large attack surface, the size and complexity of an OS or OS kernel typically requires regular software updates. These updates may come from multiple sources and may affect multiple different functions of the OS. Therefore, updating the OS further increases the risk of damaging the OS or injecting malware into the OS.

[0047] A virtual machine monitor is a relatively small software component used to run one or more virtual machines (VMs) on a single hardware computing platform (e.g., computing device 100). The small size and stability of the virtual machine monitor allow the virtual machine monitor to be stored as firmware in a non-volatile memory area and executed in the process B 112 at a high privilege level in a dedicated portion of the memory 104. Since the process B 112 is executed at a higher privilege level than the process A 110 or the user process 106, the virtual machine monitor executed in the process B 112 is completely hidden from both the kernel process A 110 and the user space process 106, so that neither the kernel process A 110 nor the user space process 106 knows that the virtual machine monitor exists in the process B 112. This allows the virtual machine monitor to hide most of the computing resources and physical hardware included in the computing device 100, and to hide most of the memory management functions from the kernel executing in the process A 110 and the application 108 executing in the user process 106, thereby retaining the management and protection of the memory 104 to the virtual machine monitor.

[0048] The virtual machine monitor executing in the process B 112 ensures the integrity of the data stored in the memory block 116 by providing additional access control beyond that provided by the kernel executing in the process A 110. Therefore, the process B 112 can provide similar services and functions equivalent to hardware-based OTP memory without the added cost and size limitations associated with hardware-based OTP memory solutions.

[0049] During operation of the computing device 100, a situation may arise in which the entire OTP memory pool 114 has been allocated to a write-protected memory block 116. In conventional computing systems, the write-once, read-many memory pool consists of hardware-based memory, so increasing the size of the write-once, read-many memory pool is difficult, expensive, and generally impractical. In contrast, the computing device 100 may be configured such that the high-privileged process B 112 allocates additional memory 104 (e.g., RAM memory) to the OTP memory pool 114 and prevents it from being accessed by the process A 110 or the user process 106, thereby allowing the size of the OTP memory pool 114 to be dynamically increased or decreased as needed without any significant impact on the performance or cost of the computing device 100.

[0050] Figure 2A software flow chart of an exemplary method 200 for providing one-time programmable memory functionality in a computing device provided by aspects of the disclosed embodiments is shown. The exemplary method 200 is suitable for use in a computing device and provides secure OTP memory functionality without the cost and size limitations associated with hardware-based OTP memory solutions.

[0051] A first process executes at a first priority level (202) and a second process executes at a second priority level (202). The first priority level is lower than the second priority level and more restrictive. The process executing at the more restrictive priority level has less access to computing resources than the process executing at the less restrictive priority level, and thus, because the first software priority level is more restrictive than the second priority level, the first process has less access to computing resources than the second process.

[0052] For example, the second process may have access to a portion of a memory controller that is used to write-protect and remove write-protection from portions of computer memory. The first process, which has a more restrictive priority, may not be able to access the write-protect capability of the memory controller. Thus, the second process is able to write-protect a portion of memory, and the first process is unable to remove the write-protection.

[0053] A memory pool is then allocated or initialized (204) for use as the OTP memory pool. Initializing (204) the memory pool includes allocating or reserving a portion of memory for use as OTP memory and setting initial values ​​to each location in the memory pool when needed. In some embodiments, it may be desirable to allocate a memory pool in the physical memory of the computing device and use hardware-based memory controller functionality to reserve the memory for use as the OTP memory pool.

[0054] During operation, the first process may receive (206) a request to allocate OTP memory in the memory pool. This request may come from a user application or the first software process itself. The process sending the request for OTP memory should be executed at the same or lower and more restrictive privilege level as the first process. For example, the request may come from a user application executing at a lower privilege level that does not allow any memory allocation or write protection operations, and therefore the request will be treated as a more restrictive priority than the first priority or the second priority.

[0055] The first process then allocates (208) a memory block from the memory pool at the first priority level. Data or OTP values ​​are then written or set (210) in the allocated memory block. These values ​​may be provided by the application requesting the allocation of the OPT memory block, or these values ​​may be obtained or determined in other ways.

[0056] Once the value or data contained in the OTP memory block is set to the desired value, the memory block will be write protected at the second priority level (212). Since the write protection is applied by the second process executing at the second privilege level, any process (e.g., the first process or any user application) will be prohibited from modifying any value within the OTP memory block. As discussed above, the priority system protects the ability to write-protect or remove write protection from the memory block in the following manner: the second process executing at the second priority level is allowed to apply write protection to the memory block, but any lower priority process (e.g., the first process executing at the first privilege level or any user application executing at a lower or more restrictive privilege level) is prevented from removing write protection or modifying the value stored in the OTP memory block.

[0057] The computing device implements write protection to ensure (214) that the OPT memory block remains read-only and the value is not changed. The write protection is configured to remain in effect until the computing device is restarted and / or any software process executed on the computing device is restarted.

[0058] In some embodiments, the first software process may be an operating system kernel, such as the OS kernel described above, and the second process may be a virtual machine monitor type software application, such as a firmware-based virtual machine monitor. Since the virtual machine monitor is a smaller, more secure, and more stable software application than the OS kernel, the virtual machine monitor presents a smaller attack surface and can be considered to be safer or more trustworthy. This allows the virtual machine monitor to write-protect the OPT memory block and prevent the OS kernel from modifying any data stored in the OPT memory block.

[0059] As used herein, the term "priority" can be extended to cover different process states or execution environments. Certain computing devices are used to provide multiple execution environments. For example, the computing device may include a trusted execution environment (TEE) or a secure execution environment (SEE) and a normal world execution environment, also commonly referred to as a rich execution environment (REE). The SEE is a highly secure execution environment that uses hardware-based security to prevent data and programs stored in the SEE from being accessed by the REE. All communications between the SEE and the REE are strictly controlled by functions built into the processor and memory of the computing device. As a result, software and data protected in the SEE may not be accessed or tampered with by programs executed in the REE. As used herein, the term "higher priority" is used to describe the SEE, and the normal world execution environment or REE is referred to as having a more restrictive priority than the SEE.

[0060] In some embodiments, the first process that services the request for OTP memory is an application executed in the REE, such as an OS kernel, and the second process is a software program executed in the SEE and protected by it. The OTP memory block can then be write-protected in the SEE environment, thereby preventing any application (such as the first process) executed in the REE from updating or modifying the OTP memory block in any way.

[0061] Therefore, although the basic novel features of the invention as applied to the exemplary embodiments of the invention have been shown, described and pointed out herein, it should be understood that various omissions, substitutions and changes may be made to the form and details of the apparatus and methods shown and the operation of the apparatus by those skilled in the art without departing from the spirit and scope of the invention. Further, it is expressly intended that all combinations of elements that perform substantially the same function in substantially the same manner to achieve the same results are within the scope of the invention. In addition, it should be recognized that the structures and / or elements shown and / or described in conjunction with any form or embodiment of the invention disclosed may be incorporated into any other form or embodiment disclosed or described or suggested as a general item of design choice. Therefore, the invention is limited only to the scope described in the appended claims.

Claims

1. A device (100), characterized in that: The apparatus (100) comprises a processor (102) and a memory (104), wherein the processor (102) and the memory (104) are configured to provide: A first software process (110), the first software process (110) being configured to execute at a first privilege level; a second software process (112) configured to execute at a second privilege level, wherein the first privilege level is more restrictive than the second privilege level, The processor (102) is used for: Initializing a one-time programmable (OTP) memory pool (114) within the memory (104) at the first privilege level; Allocating a memory block in the OTP memory pool at the first privilege level (116); Sending a request to the second software process (112) to write-protect the memory block (116); write-protecting the allocated memory block (116) at the second privilege level; Wherein, in the case where the entire OTP memory pool is allocated to the write-protected memory block, the second software process is used to allocate additional memory to the OTP memory pool.

2. The device (100) according to claim 1, characterized in that The processor (102) is configured to receive a memory allocation request (152) within the first software process (110), wherein the memory allocation request is sent by a software application (108) executing at the first privilege level or at a privilege level that is more restrictive than the first privilege level.

3. The device (100) according to claim 1 or 2, characterized in that The processor (102) is configured to: receive, within the first process, a request to write data into the allocated memory block (116); and write (156) the data into the allocated memory block (116) at the first privilege level.

4. The device (100) according to claim 1 or 2, characterized in that The first software process (110) includes a kernel, the second software process (112) includes a virtual machine monitor, and the processor (102) is configured to execute the kernel at a first privilege level and execute the virtual machine monitor at a second privilege level.

5. The device (100) according to claim 1 or 2, characterized in that: The first software process (110) includes a kernel, the second software process (112) includes a secure execution environment, and the processor (102) is configured to execute the kernel at a first privilege level and execute the secure execution environment at the second privilege level.

6. The device (100) according to claim 1 or 2, characterized in that The apparatus (100) comprises a mobile communication device.

7. A method (200), characterized in that The method (200) comprises: executing (202) a first software process at a first privilege level and executing a second software process at a second privilege level; Initializing (204) an OTP memory pool at the first privilege level; Allocating (208) a memory block in the OTP memory pool at the first privilege level; write-protecting the memory block at the second privilege level (212), wherein the first privilege level is more restrictive than the second privilege level; Wherein, in the case where the entire OTP memory pool is allocated to the write-protected memory block, the second software process is used to allocate additional memory to the OTP memory pool.

8. The method (200) according to claim 7, characterized in that: The method (200) also includes receiving (206) a memory allocation request from a third software process within the first software process, wherein the third software process executes at the first privilege level or at a privilege level that is more restrictive than the first privilege level.

9. The method (200) according to claim 7 or 8, characterized in that: The method (200) also includes: receiving a request within the first software process to write data to the allocated memory block; and writing (210) the data to the allocated memory block at the first privilege level.

10. The method (200) according to claim 7 or 8, characterized in that: The first process includes a kernel, and the second process includes a virtual machine monitor.

11. The method (200) according to claim 7 or 8, characterized in that: The first software process includes a kernel and the second software process includes a secure execution environment.

12. The method (200) according to claim 7 or 8, characterized in that: The method is performed in a mobile communication device (300).

13. A non-transitory computer readable medium, characterized in that The non-transitory computer-readable medium has program instructions stored thereon, and when a processor executes the program instructions, the program instructions cause the processor to perform the method according to any one of claims 7 to 12.

Citation Information

Patent Citations

  • Memory introspection engine for integrity protection of virtual machines

    CN105190570A

  • Universal memory device having a profil storage unit

    CN1762025A