Techniques for untrusted code execution using processor sandbox support
By introducing sandbox support and a sandbox manager into computing devices, the isolation and protection of untrusted code is achieved, which solves the problem of difficulty in isolating the sandbox domain and the local domain in the existing technology, and improves performance and security.
Patent Information
- Application Number
- CN201811131137.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-09-29
- Filing Date
- 2018-09-27
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2038-09-27
AI Technical Summary
When existing computing devices execute untrusted code, it is difficult to effectively isolate the sandbox domain and the local domain, leading to potential malicious attacks and performance losses, and software isolation technology brings large software overhead.
By introducing sandbox support in the processor, allowing the execution of user-level code in local processor mode, and providing memory protection by creating and managing sandbox domains in the virtual address space through a sandbox manager, allowing execution within the sandbox domain Untrusted code while denying memory access outside the sandbox domain to achieve sandbox isolation.
Improves isolation and performance for untrusted code, reduces the need for context switches and permission level changes, reduces software overhead, and increases control over untrusted code, especially in workloads with frequent cross-boundary interactions.
Smart Images

Figure CN109726549B_ABST
Abstract
Description
Background Art
[0001] A typical computing device may execute many small, untrusted code components. For example, a computing device may execute plug-ins, applets, applications, or other third-party code components downloaded from the Internet. In current computing devices, untrusted code may be separated from trusted code by process boundaries or ring boundaries. Intel® page protection keys may protect a small number (e.g., 16) of domains of a process address space from accidental read or write memory accesses, such as those caused by programming errors. Page protection keys may not protect against malicious attackers who manipulate the protection keys themselves. Typical computing devices may also implement software-based isolation to execute untrusted code within user processes. For example, Google® Native Client (NaCl) implements a custom toolchain to ensure that code executed within a software-based sandbox cannot jump out of the sandbox except through a specific trampoline routine. BRIEF DESCRIPTION OF THE DRAWINGS
[0002] The concepts described herein are illustrated in the accompanying drawings by way of example and not by way of limitation. For simplicity and clarity of illustration, the elements illustrated in the drawings are not necessarily drawn to scale. Where deemed appropriate, reference numerals have been repeated in the drawings to indicate corresponding or similar elements.
[0003] Figure 1 is a simplified block diagram of at least one embodiment of a computing device for untrusted code execution;
[0004] Figure 2 It can be Figure 1 A simplified block diagram of at least one embodiment of an environment established by a computing device;
[0005] Figure 3A and Figure 3B It can be Figure 1 to Figure 2 A simplified flowchart of at least one embodiment of a method for untrusted code execution performed by a computing device of
[0006] Figure 4 It can be Figure 1 to Figure 2 A simplified flow chart of at least one embodiment of a method for exception handling performed by a computing device of the present invention. DETAILED DESCRIPTION
[0007] Although the concepts of the present disclosure are susceptible to various modifications and alternative forms, specific embodiments thereof have been shown by way of example in the drawings and will be described in detail herein. However, it should be understood that the concepts of the present disclosure are not intended to be limited to the specific forms disclosed, but on the contrary, all modifications, equivalents and alternatives consistent with the present disclosure and the appended claims are intended to be covered.
[0008] References in the specification to "one embodiment," "an embodiment," "an illustrative embodiment," and the like indicate that the described embodiment may include a particular feature, structure, or characteristic, but each embodiment may or may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases do not necessarily refer to the same embodiment. In addition, when a particular feature, structure, or characteristic is described in conjunction with an embodiment, it is claimed that it is within the knowledge of those skilled in the art to implement such feature, structure, or characteristic in conjunction with other embodiments (whether or not explicitly described). In addition, it should be understood that items included in a list in the form of "at least one of A, B, and C" may mean (A); (B); (C); (A and B); (A and C); (B and C); or (A, B, and C). Similarly, items listed in the form of "at least one of A, B, or C" may mean (A); (B); (C); (A and B); (A and C); (B and C); or (A, B, and C).
[0009] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. A machine-readable storage medium may be embodied as any storage device, mechanism, or other physical structure for storing or transmitting information in a form readable by a machine (e.g., volatile or non-volatile memory, a media disk, or other media device).
[0010] In the figures, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, such features may be arranged in a manner and / or order different from that shown in the illustrative figures. In addition, the inclusion of structural or method features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, such features may not be included or may be combined with other features.
[0011] Reference now Figure 1, in an illustrative embodiment, a computing device 100 for untrusted code execution is shown. As shown, the computing device 100 includes a processor 120, which includes sandbox support 122. In use, as described in more detail below, the computing device 100 executes non-privileged code (e.g., user-level code) from a local domain in a local processor mode. The computing device 100 can add memory pages to one or more sandbox domains, and then use the sandbox support 122 to jump to an entry point within the sandbox domain. The computing device 100 executes code within the sandbox domain in a sandbox processor mode, where memory access outside the sandbox domain and certain processor instructions are not allowed. The computing device 100 can jump back to the local domain using the sandbox support 122. The local domain and the sandbox domain can be included in the same virtual address space. Therefore, the computing device 100 can enable user-level configuration and management of multiple untrusted sandbox domains. The computing device 100 can provide memory protection for different domains in the same address space without requiring potentially expensive context switches or permission level changes (e.g., ring level changes, hypercalls, or other security boundary crossings). Therefore, the computing device 100 can improve performance for certain applications, especially for workloads that frequently interact across boundaries. In addition, the computing device 100 can perform sandbox isolation without requiring a large amount of dedicated tool chain support (e.g., without requiring a large amount of changes to the compiler, linker, or other tool chain components), and by removing software overhead, can provide improved performance over software isolation techniques alone.
[0012] Computing device 100 may be embodied as any type of computing or computer device capable of performing the functions described herein, including without limitation, a computer, a multiprocessor system, a server, a rack-mount server, a blade server, a laptop, a notebook computer, a tablet computer, a wearable computing device, a network appliance, a web appliance, an embedded system, a distributed computing system, a processor-based system, and / or a consumer electronic device. Figure 1 As shown in , computing device 100 illustratively includes processor 120, input / output subsystem 124, memory 126, data storage device 128, and communication subsystem 130. Of course, in other embodiments, computing device 100 may include other or additional components, such as components commonly found in servers (e.g., various input / output devices). In addition, in some embodiments, one or more of the illustrative components may be incorporated into another component, or otherwise form a part of another component. For example, in some embodiments, memory 126 or portions thereof may be incorporated into processor 120.
[0013] The processor 120 may be embodied as any type of processor capable of performing the functions described herein. The processor 120 may be embodied as a single-core or multi-core processor, a digital signal processor, a microcontroller, or other processor or processing / control circuitry. As shown, the processor 120 includes sandbox support 122. The sandbox support 122 may be embodied as any hardware, firmware, microcode, other resources of the processor 120 that provide sandbox protection as further described below. For example, the sandbox support 122 may include instruction set architecture (ISA) extensions, model-specific registers, and / or other processor features to support configuration of, entry into, and exit from, a sandbox domain, and implementation of sandbox protection.
[0014] Similarly, memory 126 may be embodied as any type of volatile or non-volatile memory or data storage capable of performing the functions described herein. In operation, memory 126 may store various data and software used during operation of computing device 100, such as operating systems, applications, programs, libraries, and drivers. Memory 126 is communicatively coupled to processor 120 via I / O subsystem 124, which may be embodied as lines and / or components that facilitate input / output operations with processor 120, memory 126, and other components of computing device 100. For example, I / O subsystem 124 may be embodied as or otherwise include a memory controller hub, an input / output control hub, a firmware device, communication links (i.e., point-to-point links, bus links, wires, cables, optical guides, printed circuit board traces, etc.), and / or other components and subsystems to facilitate input / output operations. In some embodiments, I / O subsystem 124 may form part of a system on a chip (SoC) and be incorporated on a single integrated circuit chip along with processor 120 , memory 126 , and other components of computing device 100 .
[0015] The data storage device 128 may be embodied as any type of one or more devices configured for short-term or long-term storage of data, such as, for example, memory devices and circuits, memory cards, hard disk drives, solid-state drives, or other data storage devices. The communication subsystem 130 of the computing device 100 may be embodied as any communication circuit, device, or collection thereof capable of enabling communication between the computing device 100 and other remote devices over a network. The communication subsystem 130 may be configured to enable such communication using any one or more communication technologies (e.g., wired or wireless communications) and associated protocols (e.g., Ethernet, Bluetooth®, Wi-Fi®, WiMAX, etc.).
[0016] As shown, computing device 100 may also include one or more peripheral devices 132. Peripheral devices 132 may include any number of additional input / output devices, interface devices, and / or other peripheral devices. For example, in some embodiments, peripheral devices 132 may include a display, a touch screen, a graphics circuit, a keyboard, a mouse, a speaker system, a microphone, a network interface, and / or other input / output devices, interface devices, and / or peripheral devices.
[0017] Reference now Figure 2 In the illustrative embodiment, the computing device 100 establishes an environment 200 during operation. The illustrative environment 200 includes a trusted domain manager 206, a system manager 212, and a sandbox support 122 of the processor 120. As shown, the sandbox support 122 further includes a sandbox enforcement engine 216, a configuration engine 218, a sandbox jump engine 220, and a sandbox exit engine 222. The various components of the environment 200 may be embodied as hardware, firmware, processor microcode, software, or a combination thereof. Thus, in some embodiments, one or more of the components of the environment 200 may be embodied as a circuit or collection of electronic devices (e.g., trusted domain manager circuit 206, system manager circuit 212, sandbox enforcement circuit 216, configuration circuit 218, sandbox jump circuit 220, and / or sandbox exit circuit 222). It should be understood that in such embodiments, one or more of the trusted domain manager circuit 206, the system manager circuit 212, the sandbox enforcement circuit 216, the configuration circuit 218, the sandbox jump circuit 220, and / or the sandbox exit circuit 222 may form part of one or more of the processor 120, the I / O subsystem 124, and / or other components of the computing device 100. Additionally, in some embodiments, one or more of the illustrative components may form part of another component and / or one or more of the illustrative components may be independent of each other.
[0018] The trusted domain manager 206 may execute in a non-privileged operating mode (e.g., user mode or ring level 3). The trusted domain manager 206 is configured to execute code included in the local domain 208 in the non-privileged local processor mode. The trusted domain manager 206 is further configured to call the sandbox_allocate instruction to add one or more memory pages to the corresponding sandbox domain 202 when in the local processor mode, and may be configured to call the sandbox_free instruction to remove one or more memory pages from the corresponding sandbox domain 202 when in the local processor mode. The trusted domain manager 206 may be configured to configure a sandbox state for the sandbox domain 202, and to call the sandbox_set_state instruction to set the sandbox state for the sandbox domain 202 when in the local processor mode. The trusted domain manager 206 is further configured to call the sandbox_jump instruction to enter the specified sandbox domain 202 when in the local processor mode.
[0019] The trusted domain manager 206 is further configured to, in response to calling the sandbox_jump instruction, execute code included in the sandbox domain 202 in the non-privileged sandbox processor mode. The sandbox domain 202 is included in the same virtual address space as the local domain 208, such as in the same process. Memory pages included in the sandbox domain 202 are not included in the local domain 208. The illustrative environment 200 includes two sandbox domains 202a, 202b; however, in other embodiments, the environment may include any number of sandbox domains 202. Code included in the sandbox domain 202 may call the sandbox_exit instruction to exit the sandbox domain 202 while executing in the sandbox processor mode.
[0020] The sandbox enforcement engine 216 is configured to enforce the sandbox processor mode by generating an exception in response to a sandbox violation. The sandbox enforcement engine 216 may be configured to allow access to memory included in the current sandbox domain 202 while executing in the sandbox processor mode, and to deny access to memory not included in the current sandbox domain 202 (e.g., in the local domain 208 and / or other sandbox domains 202). The sandbox enforcement engine 216 may deny read access, write access, and execute access to memory not included in the current sandbox domain 202, such as by generating a page fault exception. The sandbox enforcement engine 216 may be further configured to deny execution of one or more prohibited instructions while executing in the sandbox processor mode, such as by generating a general protection fault exception. The prohibited instructions may include, for example, all system call related instructions.
[0021] The configuration engine 218 is configured to configure a state control block 224 in the memory 126 in response to calling the sandbox_set_state instruction. The state control block 224 may be embodied as a per-thread data structure in the memory 126. The state control block 224 is managed by the processor 120. The state control block 224 may be located in the normal domain 208 or in kernel space, or may not be accessible to software executed by the computing device 100 in some embodiments. The state control block 224 may not be directly modified by any sandbox domain 202. The state control block 224 may be configured to include a stack pointer pointing to a sandbox domain 202, an entry point within a sandbox domain 202, or other sandbox states. The configuration engine 218 may also be configured to add memory pages or remove memory pages from the sandbox domain 202 in response to calling the sandbox_allocate instruction or the sandbox_free instruction, respectively.
[0022] The sandbox jump engine 220 is configured to set the sandbox bit in the state control block 224, store the return address in the state control block 224, load the execution state from the state control block 224, and jump to the entry point within the sandbox domain 202 in response to calling the sandbox_jump instruction. The return address stored in the state control block 224 points to an address within the local domain 208. The sandbox exit engine 222 is configured to clear the sandbox bit in the state control block 224, and jump to the return address stored in the state control block 224 in response to calling the sandbox_exit instruction.
[0023] The system manager 212 may be embodied as or otherwise include an operating system, a hypervisor, a virtual machine monitor, and / or other privilege management components of the computing device 100. Thus, the system manager 212 may be executed in a privileged operating mode (e.g., kernel mode or ring level 0). The system manager 212 is configured to execute a kernel exception handler 214 in a privileged processor mode in response to an exception generated by the processor 120. The system manager 212 may be configured to call a non-privileged exception handler 210 in a non-privileged local processor mode in response to the execution of the kernel exception handler 214. The trusted domain manager 206 may be further configured to read a sandbox status register of the processor 120 in response to executing the non-privileged exception handler 210 and determine whether the exception originated from the non-privileged sandbox processor mode. If the exception originated from the sandbox processor mode, the trusted domain manager 206 may be further configured to call a sandbox_jump processor instruction to enter the non-privileged sandbox processor mode to execute the sandbox domain exception handler 204. Trusted domain manager 206 may perform one or more checks before entering non-privileged sandbox processor mode. For example, if an exception is generated by untrusted code attempting to exit sandbox domain 202, trusted domain manager 206 may not pass control back to sandbox domain exception handler 204.
[0024] Reference now Figure 3A and 3B In use, the computing device 100 may execute the method 300 for untrusted code execution. It should be understood that in some embodiments, the operations of the method 300 may be performed by Figure 2 1. The method 300 begins at block 302, where the computing device 100 executes code from the local domain 208 in a user-level local processor mode. For example, the processor 120 may execute in a non-privileged mode such as ring level 3. The processor 120 executes code in the normal domain 208 without enabling the sandbox, such as clearing the sandbox bit of the state control block 224.
[0025] In block 304, the computing device 100 calls the sandbox_allocate instruction to add one or more memory pages to the sandbox domain 202. For example, an application executing in the normal domain 208 may add memory pages associated with a downloaded applet, plug-in, or other untrusted code to the sandbox domain 202. The computing device 100 may call the instruction with one or more parameters including a linear address or other identifier of the memory page to be added to the sandbox domain 202 and a domain identifier of the sandbox domain 202. The processor 120 may use any technique to track or otherwise add memory pages to the sandbox domain 202. The computing device 100 may call the sandbox_allocate instruction multiple times to add additional memory pages to the sandbox domain 202. If the memory page has already been allocated to a different sandbox domain 202, the processor 120 may return an error.
[0026] In block 306, the computing device 100 configures state for the sandbox domain 202. The computing device 100 may, for example, configure initial values to be loaded into all general registers of the processor 120 upon entering the sandbox domain 202. The computing device 100 may configure state in the memory 126, such as in an in-memory data structure in the normal domain 208. In block 308, the computing device 100 sets a stack pointer value (e.g., RSP, ESP, or other stack pointer register). The stack pointer value points to an address within the sandbox domain 202 that will be used for stack space during execution in the sandbox domain 202. In block 310, the computing device 100 sets an entry point (e.g., RIP, EIP, or other instruction pointer register). The entry point may be embodied as an address within the sandbox domain 202.
[0027] In block 312, the computing device 100 calls the sandbox_set_state processor instruction to set the state for the sandbox domain 202. The computing device 100 may call the instruction with one or more parameters, including a pointer to a data structure including the state and a domain identifier of the sandbox domain 202. In block 314, the processor 120 configures the state control block 224 based on the provided state data. The processor 120 may, for example, copy one or more values to the state control block 224, including a stack pointer value and an entry point value.
[0028] In block 316, the computing device 100 calls the sandbox_jump instruction to switch to the sandbox domain 202 at the entry point address. The sandbox_jump instruction may be executed in a non-privileged (e.g., user mode) local processor mode. The computing device 100 may call an instruction with one or more parameters, including a linear address or other identifier of a storage page in the sandbox domain 202. For example, the parameters may be used to indicate when the sandbox domain 202 is first entered, when the sandbox domain 202 is entered to return to a saved state in the sandbox, and / or when an exception handler in the sandbox domain 202 is executed. In those examples, the parameters may identify the state control block 224, and the state control block 224 may include a normal entry point, an exception handling entry point, and an exception bit. When the exception bit is cleared, the processor 120 may jump to the normal entry point, and when the exception bit is set, the processor 120 may jump to the exception handling entry point.
[0029] In block 318, in response to calling the sandbox_jump instruction, the processor 120 sets the sandbox bit in the state control block 224. Setting the sandbox bit indicates that the processor 120 is executing in a sandbox mode and therefore enforces sandbox protection. In block 320, the processor 120 stores the return address in the state control block 224. The return address can be any address within the local domain 208 at which local (i.e., non-sandbox) execution can be resumed. For example, the return address can be the address of the next instruction after the sandbox_jump instruction. In block 322, the processor 120 loads the state from the state control block 224. For example, the processor 120 can load values for all general registers, including the stack pointer and the instruction pointer, from the state control block 224. In block 324, the processor 120 jumps to the entry point address within the sandbox domain 202.
[0030] In block 326, if Figure 3B As shown in , the computing device 100 executes code from the sandbox domain 202 in a user-level sandbox processor mode. For example, the processor 120 may execute in a non-privileged mode such as ring level 3. The computing device 100 may execute the sandbox domain 202 in the same virtual address space as the local domain 208 (e.g., in the same processing space), and thus may continue to execute without context switching or ring level transitions. While executing in the sandbox mode, the processor 120 enforces sandbox protections.
[0031] In block 328, the processor 120 allows code and / or data access to memory pages within the current sandbox domain 202. For example, the processor 120 may allow read, write, and execute access to memory addresses within the current sandbox domain 202. Of course, the processor 120 may continue to apply page table (or extended page table) permissions to memory accesses. In block 330, the processor 120 may deny code and / or data access to memory pages outside the current sandbox domain. For example, Figure 2 As shown in FIG. 1 , when executing in sandbox domain 202a, processor 120 may deny read, write, and execute access to memory locations within local domain 208 or within any other sandbox domain 202 (e.g., sandbox domain 202b). Processor 120 may deny access by generating an exception such as a page fault exception. Figure 4 A method for exception handling that may be performed by computing device 100 is described.
[0032] In block 332, the processor 120 may deny execution of one or more prohibited instructions. Prohibited instructions may include instructions that generate a software interrupt or otherwise attempt to exit user-level code, such as SYSCALL, INT, VMCALL, or similar instructions. Prohibited instructions may also include instructions that flush caches, such as RDTSC. Prohibited instructions may also include instructions that manage the sandbox domain 202, such as sandbox_allocate, sandbox_free, sandbox_set_state, or sandbox_jump. The processor 120 may deny execution of prohibited instructions by generating an exception such as a general protection fault exception. The following is in conjunction with Figure 4 A method for exception handling that may be performed by computing device 100 is described.
[0033] The computing device 100 continues to execute user mode code from the sandbox domain 202 in the user-level sandbox processor mode until, in block 334, the computing device 100 calls the sandbox_exit instruction to switch to the local domain 208 at the return address previously stored in the state control block 224. Calling the sandbox_exit instruction can be a unique technique for sandbox code to request an exit from the sandbox domain 202 (e.g., without generating an exception or other error). For example, the sandbox_exit instruction can be called to request a privileged service from the normal domain (e.g., request a file to open, read, write, or close, allocate or deallocate memory, or perform other privileged operations). The local domain 208 code can apply one or more security policies or otherwise determine whether to service the request from the sandbox 204. Note: Timer interrupts (e.g., time slice expiration) and other interrupts to the kernel can be processed in kernel mode without generating an exit from the sandbox domain. In some embodiments, the kernel may not be aware of the existence of the sandbox domain 204. The sandbox_exit instruction can be called without any additional parameters. In block 336, in response to executing the sandbox_exit instruction, the processor 120 clears the sandbox bit in the state control block 224. Clearing the sandbox bit indicates that the processor 120 is executing in native mode and therefore sandbox protection is not enforced. In block 338, the processor 120 jumps to the return address stored in the state control block 224.
[0034] In block 340, in some embodiments, the computing device 100 may call the sandbox_free instruction to remove one or more memory pages from the sandbox domain 202. For example, after execution of the untrusted code is completed, an application executing in the normal domain 208 may remove memory pages associated with an applet, plug-in, or other untrusted code downloaded from the sandbox domain 202. The computing device 100 may call the instruction with one or more parameters including a linear address or other identifier of the memory page to be removed from the sandbox domain 202 and a domain identifier of the sandbox domain 202. The processor 120 may use any technique to remove memory pages from the sandbox domain 202. The computing device 100 may call the sandbox_free instruction multiple times to remove additional memory pages from the sandbox domain 202. After removing any memory pages, the method 300 loops back to block 302, as shown in FIG. Figure 3A to continue executing untrusted code.
[0035] Reference now Figure 4 In use, the computing device 100 may execute the method 400 for exception handling. It should be understood that in some embodiments, the operation of the method 400 may be performed by Figure 2The method 400 begins at block 402, where the computing device 100 generates an exception, fault, interrupt, trap, or other exceptional condition. The exception may be generated while executing in sandbox mode, for example, in response to a sandbox violation, or in other circumstances.
[0036] In block 404, the processor 120 calls the kernel exception handler 214. The processor 120 may perform a typical interrupt handling process, such as by pushing an interrupt frame onto the kernel stack and then calling the exception handler 214 in a privileged processor mode such as ring level 0. Because the kernel exception handler 214 executes in privileged mode, the processor 120 does not enforce sandbox protection. In block 406, the kernel exception handler 214 calls the sandbox handler in user mode. For example, the kernel exception handler 214 may call the local domain exception handler 210. The local domain exception handler 210 may be registered with the kernel exception handler 214 by the local domain 208 and may therefore be trusted. The kernel exception handler 214 may clear the sandbox bit in the state control block 224, allowing user mode code to execute in normal mode (rather than sandbox mode).
[0037] In block 408, the local domain exception handler 212 reads the sandbox state model specific register (MSR) of the processor 120 to determine whether the exception originated from the sandbox domain 202. When an exception is generated, the processor 120 sets the sandbox state MSR to indicate whether the exception originated from the sandbox domain 202. In block 410, the kernel exception handler 214 determines whether the exception originated from the sandbox domain 202. If not, the method 400 branches forward to block 422, as described below. If the exception does originate from the sandbox domain 202, the method 400 proceeds to block 412.
[0038] In block 412, the user-mode native code sandbox handler 210 handles the sandbox exception. For example, the handler 210 may release or otherwise unload the sandbox domain 202 that generated the exception or otherwise handle the sandbox exception. In some embodiments, the user-mode native code sandbox handler 210 may perform one or more checks or other security policy determinations to determine whether to allow the exception to be handled by the sandbox domain 202. For example, the sandbox domain 202 may be allowed to handle the exception unless the exception is caused by code in the sandbox domain 202 attempting to exit the sandbox.
[0039] In block 414, the local domain exception handler 212 reads the sandbox handler field of the SCB to determine whether a sandbox exception handler has been specified. For example, the sandbox handler may be configured by the local domain to point to the sandbox exception handler 204 within the sandbox domain 204. In block 416, the local domain handler 212 determines whether to call the sandbox exception handler. For example, if the sandbox exception handler is not specified, the sandbox handler field may be null or otherwise invalid. Alternatively, the local domain handler 210 may determine whether to call the sandbox exception handler based on one or more security policies or other factors. If the sandbox exception handler will not be called, the method 400 branches to block 422, as described below. If the sandbox exception handler will be called, the method 400 proceeds to block 418.
[0040] In block 418, the user mode native exception handler 210 may call the sandbox exception handler 204. The sandbox exception handler 204 may be called in sandbox mode, for example, by calling a sandbox_jump instruction. The sandbox exception handler 204 may execute any suitable exception handling routine. After the native code sandbox handler 210 and / or the sandbox exception handler 204 handles the exception, the method 400 branches to block 420, where the computing device 100 returns from handling the exception. After returning, the method 400 is completed.
[0041] Referring back to blocks 408, 412, if the exception does not originate from a sandbox or the sandbox exception handler is not called, method 400 may branch to block 422. In block 422, computing device 100 executes a default exception handling routine. For example, computing device 100 may terminate the user-level process that generated the exception or perform other management operations. After executing the default exception handling routine, method 400 branches to block 420, where computing device 100 returns from handling the exception. After returning, method 400 is completed.
[0042] Although Figure 4 The local domain exception handler 210 is shown to read the sandbox status MSR and determine whether to call the sandbox exception handler, but it should be understood that in some embodiments, those operations may be performed by one or more other components of the computing device 100. For example, in some embodiments, those operations may be performed by the kernel exception handler 214.
[0043] It should be understood that in some embodiments, the method 300 and / or 400 may be embodied as various instructions stored on a computer-readable medium, which may be executed by the processor 120 and / or other components of the computing device 100 to cause the computing device 100 to perform the corresponding method 300 and / or 400. The computer-readable medium may be embodied as any type of medium that can be read by the computing device 100, including but not limited to the memory 126, the data storage device 128, the firmware device, other memory or data storage device of the computing device 100, the portable medium readable by the peripheral device 132 of the computing device 100, and / or other media.
[0044] Example
[0045] The following provides illustrative examples of the technology disclosed herein. Embodiments of the technology may include any one or more and any combination of the following examples.
[0046] Example 1 includes a computing device for untrusted code execution, the computing device including a trusted domain manager to: execute code included in a local domain of a first virtual address space in a non-privileged local processor mode; during the execution of the code in the local processor mode, call a first processor instruction to add a memory page to a first sandbox domain of the first virtual address space, wherein the memory page is not included in the local domain; during the execution of the code in the local processor mode, call a second processor instruction to enter the first sandbox domain in response to the call of the first processor instruction; and execute the code included in the first sandbox domain in the non-privileged sandbox processor mode in response to the call of the second processor instruction.
[0047] Example 2 includes the subject matter of Example 1, and wherein executing code included in a first sandbox domain in a non-privileged sandbox processor mode includes: allowing, by a processor of the computing device, access to memory included in the first sandbox domain; and denying, by the processor of the computing device, access to memory not included in the first sandbox domain.
[0048] Example 3 includes the subject matter of any of Examples 1 and 2, and wherein denying access to the memory comprises denying read access, write access, and execute access to the memory not included in the first sandbox domain.
[0049] Example 4 includes the subject matter of any of Examples 1-3, and wherein denying access to memory not included in the first sandbox domain comprises generating, by the processor, a page fault exception.
[0050] Example 5 includes the subject matter of any of Examples 1-4, and wherein executing code included in the first sandbox domain in the non-privileged sandbox processor mode comprises denying, by a processor of the computing device, execution of prohibited instructions.
[0051] Example 6 includes the subject matter of any of Examples 1-5, and wherein denying execution of the prohibited instruction comprises generating, by the processor, a general protection fault exception.
[0052] Example 7 includes the subject matter of any of Examples 1-6, and wherein the trusted domain manager further: configures a sandbox state for a first sandbox domain during execution of user mode code in local processor mode; and in response to the configuration of the sandbox state, calls a third processor instruction to set the sandbox state for the first sandbox domain; wherein calling the second processor instruction includes: calling the second processor instruction in response to calling the third processor instruction.
[0053] Example 8 includes the subject matter of any of Examples 1-7, and wherein the sandbox state indicates a stack pointer within the first sandbox domain and an entry point within the first sandbox domain.
[0054] Example 9 includes the subject matter of any of Examples 1-8, and further comprising a processor, wherein the processor comprises a configuration engine to configure a state control block in a memory of the computing device with a sandbox state in response to an invocation of the third processor instruction.
[0055] Example 10 includes the subject matter of any of Examples 1-9, and further includes a processor, wherein the processor includes a sandbox jump engine to: in response to the invocation of the second processor instruction, set a sandbox bit in a memory of the computing device; in response to the invocation of the second processor instruction, store a return address in the memory of the computing device; in response to the invocation of the second processor instruction, load an execution state from the memory of the computing device; and in response to the invocation of the second processor instruction, jump to an entry point within the first sandbox domain.
[0056] Example 11 includes the subject matter of any of Examples 1-10, and wherein loading the execution state comprises: loading a stack pointer from a memory to a stack pointer register of the processor; and loading an entry point from the memory to an instruction pointer register of the processor.
[0057] Example 12 includes the subject matter of any of Examples 1-11, and wherein: setting the sandbox bit comprises setting a sandbox bit of a state control block in a memory of the computing device; storing the return address comprises storing the return address in the state control block; and loading the execution state comprises loading the execution state from the state control block.
[0058] Example 13 includes the subject matter of any of Examples 1-12, and wherein: executing code in the sandbox processor mode includes: calling a third processor instruction to exit the first sandbox domain; and the trusted domain manager further executes the code included in the local domain of the first virtual address space in the non-privileged local processor mode in response to the call of the third processor instruction.
[0059] Example 14 includes the subject matter of any of Examples 1-13, and further includes a processor, wherein: the processor includes a sandbox jump engine to set a sandbox bit in a memory of the computing device in response to an invocation of the second processor instruction; and the processor includes a sandbox exit engine to clear the sandbox bit in the memory in response to an invocation of the third processor instruction.
[0060] Example 15 includes the subject matter of any of Examples 1-14, and further includes a processor, wherein: the processor includes a sandbox jump engine to store a return address pointing to the local domain in a memory of the computing device in response to an invocation of the second processor instruction; and the processor includes a sandbox exit engine to jump to the return address in response to an invocation of the third processor instruction.
[0061] Example 16 includes the subject matter of any of Examples 1-15, and further includes: a processor comprising a sandbox enforcement engine to generate an exception during execution of code included in a first sandbox domain in an unprivileged sandbox processor mode; and a system manager to (i) execute a kernel exception handler in a privileged processor mode in response to the generation of the exception, and (ii) call an unprivileged exception handler in an unprivileged local processor mode in response to the execution of the kernel exception handler; wherein the trusted domain manager further: (i) reads a sandbox status register of the processor in response to the execution of the unprivileged exception handler, and (ii) determines whether the exception originates from the unprivileged sandbox processor mode in response to the reading of the sandbox status register.
[0062] Example 17 includes the subject matter of any of Examples 1-16, and wherein the trusted domain manager further: during execution of the non-privileged exception handler in native processor mode, calls a second processor instruction to enter the non-privileged sandbox processor mode.
[0063] Example 18 includes a method for untrusted code execution, the method comprising: executing, by a computing device in a non-privileged local processor mode, code included in a local domain of a first virtual address space; while executing the code in the local processor mode, calling, by the computing device, a first processor instruction to add a memory page to a first sandbox domain of the first virtual address space, wherein the memory page is not included in the local domain; while executing the code in the local processor mode, calling, by the computing device, a second processor instruction to enter the first sandbox domain in response to calling the first processor instruction; and executing, by the computing device in the non-privileged sandbox processor mode, the code included in the first sandbox domain in response to calling the second processor instruction.
[0064] Example 19 includes the subject matter of Example 18, and wherein executing code included in the first sandbox domain in a non-privileged sandbox processor mode comprises: allowing, by a processor of the computing device, access to memory included in the first sandbox domain; and denying, by the processor of the computing device, access to memory not included in the first sandbox domain.
[0065] Example 20 includes the subject matter of any of Examples 18 and 19, and wherein denying access to the memory comprises denying read access, write access, and execute access to the memory not included in the first sandbox domain.
[0066] Example 21 includes the subject matter of any of Examples 18-20, and wherein denying access to memory not included in the first sandbox domain comprises generating, by the processor, a page fault exception.
[0067] Example 22 includes the subject matter of any of Examples 18-21, and wherein executing code included in the first sandbox domain in the non-privileged sandbox processor mode comprises: denying, by a processor of the computing device, execution of prohibited instructions.
[0068] Example 23 includes the subject matter of any of Examples 18-22, and wherein denying execution of the prohibited instruction comprises generating, by the processor, a general protection fault exception.
[0069] Example 24 includes the subject matter of any of Examples 18-23, and further includes: while executing user mode code in local processor mode, configuring a sandbox state for a first sandbox domain by a computing device; and in response to configuring the sandbox state, calling a third processor instruction by the computing device to set the sandbox state for the first sandbox domain; wherein calling the second processor instruction includes: calling the second processor instruction in response to calling the third processor instruction.
[0070] Example 25 includes the subject matter of any of Examples 18-24, and wherein the sandbox state indicates a stack pointer within the first sandbox domain and an entry point within the first sandbox domain.
[0071] Example 26 includes the subject matter of any of Examples 18-25, and further comprising, in response to invoking the third processor instruction, configuring, by a processor of the computing device, a state control block in a memory of the computing device with a sandbox state.
[0072] Example 27 includes the subject matter of any of Examples 18-26, and further comprises: in response to calling the second processor instruction, setting, by a processor of the computing device, a sandbox bit in a memory of the computing device; in response to calling the second processor instruction, storing, by the processor, a return address in the memory of the computing device; in response to calling the second processor instruction, loading, by the processor, an execution state from the memory of the computing device; and in response to calling the second processor instruction, jumping, by the processor, to an entry point within the first sandbox domain.
[0073] Example 28 includes the subject matter of any of Examples 18-27, and wherein loading the execution state comprises: loading a stack pointer from the memory to a stack pointer register of the processor; and loading the entry point from the memory to an instruction pointer register of the processor.
[0074] Example 29 includes the subject matter of any of Examples 18-28, and wherein: setting the sandbox bit comprises setting a sandbox bit of a state control block in a memory of the computing device; storing the return address comprises storing the return address in the state control block; and loading the execution state comprises loading the execution state from the state control block.
[0075] Example 30 includes the subject matter of any of Examples 18-29, and further includes: while executing code in the sandbox processor mode, calling a third processor instruction by the computing device to exit the first sandbox domain; and in response to calling the third processor instruction, executing code included in the local domain of the first virtual address space in a non-privileged local processor mode by the computing device.
[0076] Example 31 includes the subject matter of any of Examples 18-30, and further comprises: in response to invoking the second processor instruction, setting, by a processor of the computing device, a sandbox bit in a memory of the computing device; and in response to invoking the third processor instruction, clearing, by the processor, the sandbox bit in the memory.
[0077] Example 32 includes the subject matter of any of Examples 18-31, and further includes: in response to calling the second processor instruction, storing, by the processor, a return address pointing to the local domain in a memory of the computing device; and in response to calling the third processor instruction, jumping, by the processor to the return address.
[0078] Example 33 includes the subject matter of any of Examples 18-32, and further includes: generating an exception by a processor of a computing device while executing code included in a first sandbox domain in a non-privileged sandbox processor mode; in response to generating the exception, executing a kernel exception handler in privileged processor mode by the computing device; in response to executing the kernel exception handler, calling a non-privileged exception handler in a non-privileged local processor mode by the computing device; in response to executing the non-privileged exception handler, reading a sandbox status register of the processor by the computing device; and in response to reading the sandbox status register, determining by the computing device whether the exception originates from the non-privileged sandbox processor mode.
[0079] Example 34 includes the subject matter of any of Examples 18-33, and further comprising: while executing the non-privileged exception handler in the native processor mode, invoking, by the computing device, a second processor instruction to enter the non-privileged sandbox processor mode.
[0080] Example 35 includes a computing device comprising: a processor; and a memory having a plurality of instructions stored therein that, when executed by the processor, cause the computing device to perform the method of any one of claims 18-34.
[0081] Example 36 includes one or more non-transitory computer-readable storage media including a plurality of instructions stored thereon that, in response to being executed, cause a computing device to perform the method of any of claims 18-34.
[0082] Example 37 includes a computing device comprising means for performing the method of any of claims 18-34.
[0083] Example 38 includes a computing device for untrusted code execution, the computing device comprising: a device for executing code included in a local domain of a first virtual address space in a non-privileged local processor mode; a device for invoking a first processor instruction by the computing device to add a memory page to a first sandbox domain of the first virtual address space while executing the code in the local processor mode, wherein the memory page is not included in the local domain; a device for invoking a second processor instruction by the computing device to enter the first sandbox domain in response to invoking the first processor instruction while executing the code in the local processor mode; and a device for executing the code included in the first sandbox domain in a non-privileged sandbox processor mode in response to invoking the second processor instruction.
[0084] Example 39 includes the subject matter of Example 38, and wherein the apparatus for executing code included in a first sandbox domain in a non-privileged sandbox processor mode comprises: apparatus for allowing, by a processor of a computing device, access to memory included in the first sandbox domain; and apparatus for denying, by the processor of the computing device, access to memory not included in the first sandbox domain.
[0085] Example 40 includes the subject matter of any of Examples 38 and 39, and wherein the means for denying access to the memory comprises: means for denying read access, write access, and execute access to the memory not included in the first sandbox domain.
[0086] Example 41 includes the subject matter of any of Examples 38-40, and wherein means for denying access to memory not included in the first sandbox domain comprises means for generating, by the processor, a page fault exception.
[0087] Example 42 includes the subject matter of any of Examples 38-41, and wherein the means for executing code included in the first sandbox domain in a non-privileged sandbox processor mode comprises: means for denying, by a processor of the computing device, execution of prohibited instructions.
[0088] Example 43 includes the subject matter of any of Examples 38-42, and wherein the means for denying execution of a prohibited instruction comprises: means for generating, by the processor, a general protection fault exception.
[0089] Example 44 includes the subject matter of any of Examples 38-43, and further includes: a device for configuring a sandbox state for a first sandbox domain by a computing device while executing user mode code in local processor mode; and a device for calling a third processor instruction to set the sandbox state for the first sandbox domain in response to configuring the sandbox state; wherein the device for calling the second processor instruction includes: a device for calling the second processor instruction in response to calling the third processor instruction.
[0090] Example 45 includes the subject matter of any of Examples 38-44, and wherein the sandbox state indicates a stack pointer within the first sandbox domain and an entry point within the first sandbox domain.
[0091] Example 46 includes the subject matter of any of Examples 38-45, and further comprising means for configuring, by a processor of the computing device, a state control block in a memory of the computing device with a sandbox state in response to invoking a third processor instruction.
[0092] Example 47 includes the subject matter of any of Examples 38-46, and further includes: means for setting, by a processor of the computing device, a sandbox bit in a memory of the computing device in response to invoking the second processor instruction; means for storing, by the processor, a return address in the memory of the computing device in response to invoking the second processor instruction; means for loading, by the processor, an execution state from the memory of the computing device in response to invoking the second processor instruction; and means for jumping, by the processor, to an entry point within the first sandbox domain in response to invoking the second processor instruction.
[0093] Example 48 includes the subject matter of any of Examples 38-47, and wherein the means for loading the execution state comprises: means for loading a stack pointer from a memory to a stack pointer register of a processor; and means for loading an entry point from the memory to an instruction pointer register of the processor.
[0094] Example 49 includes the subject matter of any of Examples 38-48, and wherein: the means for setting the sandbox bit comprises: means for setting the sandbox bit of a state control block in a memory of a computing device; the means for storing the return address comprises: means for storing the return address in the state control block; the means for loading the execution state comprises: means for loading the execution state from the state control block.
[0095] Example 50 includes the subject matter of any of Examples 38-49, and further includes: an apparatus for invoking a third processor instruction by a computing device to exit a first sandbox domain while executing code in a sandbox processor mode; and an apparatus for executing code included in a local domain of a first virtual address space in a non-privileged local processor mode in response to invoking the third processor instruction.
[0096] Example 51 includes the subject matter of any of Examples 38-50, and further includes: means for setting, by a processor of the computing device, a sandbox bit in a memory of the computing device in response to invoking a second processor instruction; and means for clearing, by the processor, the sandbox bit in the memory in response to invoking a third processor instruction.
[0097] Example 52 includes the subject matter of any of Examples 38-51, and further includes: means for storing, by the processor, a return address pointing to a local domain in a memory of the computing device in response to calling a second processor instruction; and means for jumping, by the processor, to the return address in response to calling a third processor instruction.
[0098] Example 53 includes the subject matter of any of Examples 38-52, and further includes: a device for generating an exception by a processor of a computing device while executing code included in a first sandbox domain in a non-privileged sandbox processor mode; a device for executing a kernel exception handler in a privileged processor mode in response to generating the exception; a device for calling a non-privileged exception handler in a non-privileged local processor mode in response to executing the kernel exception handler; a device for reading a sandbox status register of a processor in response to executing the non-privileged exception handler; and a device for determining whether the exception originated from the non-privileged sandbox processor mode in response to reading the sandbox status register.
[0099] Example 54 includes the subject matter of any of Examples 38-53, and further comprises: means for invoking, by the computing device, a second processor instruction to enter a non-privileged sandbox processor mode while executing the non-privileged exception handler in a native processor mode.
Claims
1. A computing device for untrusted code execution, the computing device comprising a trusted domain manager to: executing code included in a local domain of the first virtual address space in a non-privileged local processor mode; During execution of the code in the native processor mode, invoking a first processor instruction to add a memory page to a first sandbox domain of a first virtual address space, wherein the memory page is not included in the native domain; During execution of the code in native processor mode, calling a second processor instruction to enter the first sandbox domain in response to a call by the first processor instruction; and In response to the invocation of the second processor instruction, executing code included in the first sandbox domain in a non-privileged sandbox processor mode, Wherein executing the code included in the first sandbox domain in the non-privileged sandbox processor mode comprises: Access is permitted, by a processor of the computing device, to memory included in the first sandbox domain.
2. The computing device of claim 1 , wherein executing code included in the first sandbox domain in the non-privileged sandbox processor mode further comprises: Access is denied, by a processor of the computing device, to memory not included in the first sandbox domain.
3. The computing device of claim 2, wherein denying access to the memory comprises: Read access, write access, and execute access are denied to memory not included in the first sandbox domain.
4. The computing device of claim 1 , wherein executing code included in the first sandbox domain in the non-privileged sandbox processor mode comprises: Execution of prohibited instructions is denied by a processor of the computing device.
5. The computing device of claim 1 , wherein the trusted domain manager further: During execution of user mode code in local processor mode, configuring a sandbox state for a first sandbox domain; as well as In response to the configuration of the sandbox state, invoking a third processor instruction to set the sandbox state for the first sandbox domain; The calling of the second processor instruction includes: calling the second processor instruction in response to the calling of the third processor instruction.
6. The computing device of claim 1 , further comprising a processor, wherein the processor comprises a sandbox jump engine to: In response to the invocation of the second processor instruction, setting a sandbox bit in a memory of the computing device; storing a return address in a memory of the computing device in response to the invocation of the second processor instruction; In response to the invocation of the second processor instruction, loading the execution state from a memory of the computing device; as well as In response to the call of the second processor instruction, a jump is made to an entry point within the first sandbox domain.
7. The computing device of claim 6, wherein loading the execution state comprises: Load the stack pointer from memory into the processor's stack pointer register; as well as Load the entry point from memory into the processor's instruction pointer register.
8. The computing device of claim 1, wherein: Executing code in the sandbox processor mode includes: invoking a third processor instruction to exit the first sandbox domain; and The trusted domain manager further executes code included in the local domain of the first virtual address space in a non-privileged local processor mode in response to the call of the third processor instruction.
9. The computing device of claim 8, further comprising a processor, wherein: The processor includes a sandbox jump engine to set a sandbox bit in a memory of the computing device in response to an invocation of a second processor instruction; as well as The processor includes a sandbox exit engine to clear the sandbox bit in the memory in response to an invocation of the third processor instruction.
10. The computing device of claim 1, further comprising: a processor comprising a sandbox enforcement engine to generate an exception during execution of code included in a first sandbox domain in a non-privileged sandbox processor mode; as well as a hypervisor to (i) execute a kernel exception handler in a privileged processor mode in response to generation of an exception, and (ii) invoke a non-privileged exception handler in a non-privileged native processor mode in response to execution of the kernel exception handler; The trusted domain manager further: (i) reads a sandbox status register of the processor in response to execution of the unprivileged exception handler, and (ii) determines whether the exception originates from an unprivileged sandbox processor mode in response to the reading of the sandbox status register.
11. The computing device of claim 10, wherein the trusted domain manager further invokes the second processor instruction during execution of the non-privileged exception handler in the native processor mode to enter the non-privileged sandbox processor mode.
12. A method for untrusted code execution, the method comprising: executing, by the computing device in a non-privileged local processor mode, code included in a local domain of the first virtual address space; While executing code in a local processor mode, invoking, by a computing device, a first processor instruction to add a memory page to a first sandbox domain of a first virtual address space, wherein the memory page is not included in the local domain; While executing code in the native processor mode, invoking, by the computing device, a second processor instruction to enter the first sandbox domain in response to invoking the first processor instruction; as well as In response to invoking the second processor instruction, executing, by the computing device in a non-privileged sandbox processor mode, code included in the first sandbox domain, Wherein executing the code included in the first sandbox domain in the non-privileged sandbox processor mode includes: allowing access to the memory included in the first sandbox domain by the processor of the computing device.
13. The method of claim 12, wherein executing code included in the first sandbox domain in the non-privileged sandbox processor mode further comprises: Access is denied, by a processor of the computing device, to memory not included in the first sandbox domain.
14. The method of claim 12, wherein executing code included in the first sandbox domain in the non-privileged sandbox processor mode comprises: Execution of prohibited instructions is denied by a processor of the computing device.
15. The method according to claim 12, further comprising: While executing the user mode code in the local processor mode, configuring, by the computing device, a sandbox state for the first sandbox domain; as well as In response to configuring the sandbox state, invoking, by the computing device, a third processor instruction to set the sandbox state for the first sandbox domain; Wherein calling the second processor instruction comprises: calling the second processor instruction in response to calling the third processor instruction.
16. The method according to claim 12, further comprising: In response to invoking the second processor instruction, setting, by a processor of the computing device, a sandbox bit in a memory of the computing device; storing, by the processor, the return address in a memory of the computing device in response to invoking the second processor instruction; In response to invoking the second processor instruction, loading, by the processor, the execution state from a memory of the computing device; as well as In response to calling the second processor instruction, a jump is made by the processor to an entry point within the first sandbox domain.
17. The method according to claim 12, further comprising: While executing code in the sandbox processor mode, invoking, by the computing device, a third processor instruction to exit the first sandbox domain; as well as In response to invoking the third processor instruction, code included in the local domain of the first virtual address space is executed by the computing device in a non-privileged local processor mode.
18. The method according to claim 12, further comprising: generating, by a processor of the computing device, an exception while executing code included in the first sandbox domain in a non-privileged sandbox processor mode; In response to generating the exception, executing, by the computing device in a privileged processor mode, a kernel exception handler; In response to executing the kernel exception handler, invoking, by the computing device in the non-privileged local processor mode, a non-privileged exception handler; In response to executing the unprivileged exception handler, reading, by the computing device, a sandbox status register of the processor; as well as In response to reading the sandbox status register, a determination is made by the computing device whether the exception originated from a non-privileged sandbox processor mode.
19. A computing device for untrusted code execution, the computing device comprising: means for executing, in a non-privileged local processor mode, code included in a local domain of a first virtual address space; means for invoking, by a computing device while executing code in a local processor mode, a first processor instruction to add a memory page to a first sandbox domain of a first virtual address space, wherein the memory page is not included in the local domain; means for invoking, by the computing device, a second processor instruction to enter a first sandbox domain in response to invoking the first processor instruction while executing code in a native processor mode; as well as means for executing code included in the first sandbox domain in a non-privileged sandbox processor mode in response to invoking a second processor instruction, Wherein the means for executing code included in a first sandbox domain in a non-privileged sandbox processor mode includes: means for allowing, by a processor of the computing device, access to a memory included in the first sandbox domain.
20. The computing device of claim 19, wherein the means for executing code included in the first sandbox domain in the non-privileged sandbox processor mode further comprises: Means for denying, by a processor of the computing device, access to memory not included in the first sandbox domain.
21. The computing device of claim 19, wherein the means for executing code included in the first sandbox domain in a non-privileged sandbox processor mode comprises: Means for denying, by a processor of a computing device, execution of prohibited instructions.
22. The computing device of claim 19, further comprising: means for configuring, by the computing device, a sandbox state for a first sandbox domain while executing user mode code in local processor mode; as well as means for, in response to configuring the sandbox state, invoking a third processor instruction to set the sandbox state for the first sandbox domain; Wherein the means for invoking the second processor instruction comprises means for invoking the second processor instruction in response to invoking the third processor instruction.
23. The computing device of claim 19, further comprising: means for setting, by a processor of the computing device, a sandbox bit in a memory of the computing device in response to invoking the second processor instruction; means for storing, by the processor, the return address in a memory of the computing device in response to invoking the second processor instruction; means for loading, by the processor, the execution state from a memory of the computing device in response to invoking the second processor instruction; as well as Means for jumping, by the processor, to an entry point within the first sandbox domain in response to invoking the second processor instruction.
24. The computing device of claim 19, further comprising: means for invoking, by the computing device, a third processor instruction to exit the first sandbox domain while executing code in the sandbox processor mode; as well as Means for executing code included in the local domain of the first virtual address space in a non-privileged native processor mode in response to invoking a third processor instruction.
25. The computing device of claim 19, further comprising: means for generating, by a processor of the computing device, an exception while executing code included in a first sandbox domain in a non-privileged sandbox processor mode; means for executing a kernel exception handler in a privileged processor mode in response to generating an exception; means for invoking a non-privileged exception handler in a non-privileged native processor mode in response to executing the kernel exception handler; means for reading a sandbox status register of the processor in response to executing the unprivileged exception handler; as well as Means for determining, in response to reading the sandbox status register, whether an exception originated from a non-privileged sandbox processor mode.
26. A machine-readable storage medium comprising a plurality of instructions stored thereon, the instructions, in response to being executed, causing a computing device to perform the method of any one of claims 12-18.
27. A computer program product comprising a plurality of instructions which, in response to being executed, cause a computing device to perform the method of any one of claims 12-18.
