The present disclosure relates to processor mode locking.
Cloud computing is network-based computing in which typically large collections of servers housed in data centers or “server farms” provide computational resources and data storage as needed to remote end users. Some cloud computing services provide access to software applications such as word processors and other commonly used applications to end users who interface with the applications through web browsers or other client-side software. Users' electronic data files are usually stored in the server farm rather than on the users' computing devices. Maintaining software applications and user data on the server farm simplifies management of end user computing devices. Some cloud computing services allow end users to execute software applications in virtual machines.
In general, one innovative aspect of the subject matter described in this specification can be embodied in methods that include the actions of operating a processor in the data processing apparatus in a first processing mode; setting one or more control bits of a control register of the processor to configure the processor to operate in a different second processing mode; providing a virtual register in a virtual machine executing on the data processing apparatus, the virtual register having one or more locking bits corresponding to the control bits of the control register; setting a value of the one or more locking bits of the virtual register; and in response to setting the value of the one or more locking bits, preventing the processor from being configured to operate in the first processing mode. Other embodiments of this aspect include corresponding systems, apparatus, and computer programs.
These and other aspects can optionally include one or more of the following features. An attempt to change the value of the one or more control bits of the control register can be intercepted. Setting the value of the one or more locking bits further can include indicating a monitoring of the value of the one or more control bits. Operating the processor can include operating the processor in the first processing mode during booting of an operating system of the processor. The first processing mode can be a 16-bit processing mode and the second processing mode can be a 32-bit processing mode. The first processing mode can be a 16-bit processing mode and the second processing mode can be a 64-bit processing mode. In response to setting the value of the one or more locking bits, the processor can be configured to operate only in the second processing mode.
Particular embodiments of the subject matter described in this specification can be implemented so as to realize one or more of the following advantages. A computing device is able to change from operating under a first processing mode to operating under a second processing mode. Once the computing device is operating under the second processing mode, the computing device is prevented from operating again under the first processing mode.
The details of one or more embodiments of the subject matter described in this specification are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims.
Each host machine executes a host operating system or other software that virtualizes the underlying host machine hardware and manages concurrent execution of one or more virtual machines. For example, the host operating system 106 is managing virtual machine (VM) 110 and VM 112, while host OS 108 is managing a single VM 114. Each VM includes a simulated version of the underlying host machine hardware and referred to as virtual hardware (e.g., virtual hardware 110a, 112a and 114a). Software that is executed by the virtual hardware is referred to as guest software. In some implementations, guest software cannot determine if it is being executed by virtual hardware or by a physical host machine. If guest software executing in a VM, or the VM itself, malfunctions or aborts, other VMs executing on the host machine will not be affected. A host machine's microprocessor(s) can include processor-level mechanisms to enable virtual hardware to execute software applications efficiently by allowing guest software instructions to be executed directly on the host machine's microprocessor without requiring code-rewriting, recompilation, or instruction emulation.
Each VM (e.g., VMs 110, 112 and 114) is allocated a set of virtual memory pages from the virtual memory of the underlying host operating system and is allocated virtual disk blocks from one or more virtual disk drives for use by the guest software executing on the VM. For example, host operating system 106 allocates memory pages and disk blocks to VM 110 and VM 112, and host operating system 108 does the same for VM 114. In some implementations, a given VM cannot access the virtual memory pages assigned to other VMs. For example, VM 110 cannot access memory pages that have been assigned to VM 112. A virtual disk drive can be persisted across VM restarts. Virtual disk blocks are allocated on physical disk drives coupled to host machines or available over the internal network 116, for example. In addition to virtual memory and disk resources, VMs can be allocated network addresses through which their respective guest software can communicate with other processes reachable through the internal network 116 or the Internet 122. For example, guest software executing on VM 110 can communicate with guest software executing on VM 112 or VM 114. In some implementations, each VM is allocated one or more unique Internet Protocol (IP) version 4 or version 6 addresses. In some implementations, each VM is allocated one or more media access control (MAC) addresses. In some implementations, each VM shares a TCP/UDP (Transmission Control Protocol/User Datagram Protocol) port space in a network address translation (NAT) fashion. Other address schemes are possible. The VM IP addresses are visible on the internal network 116 and, in some implementations, are visible on the Internet 122 if the addresses are advertised using a suitable routing protocol, for instance.
A VM's guest software can include a guest operating system (e.g., guest operating systems 110b, 112b and 114b) which is software that controls the execution of respective guest software applications (e.g., guest applications 110c, 112c and 114c), within the VM and provides services to those applications. For example, a guest operating system could be a variation of the UNIX operating system. Other operating systems are possible. Each VM can execute the same guest operating system or different guest operating systems. In further implementations, a VM does not require a guest operating system in order to execute guest software applications. A guest operating system's access to resources such as networks and virtual disk storage is controlled by the underlying host operating system. In some implementations, a hypervisor can be employed as a hardware virtualization technique that allows multiple operating systems to run concurrently on a host machine. Type 1 (or native, bare metal) hypervisors run directly on the host's hardware to control the hardware and to manage guest operating systems and type 2 (or hosted) hypervisors run within a conventional operating system environment.
By way of illustration, and with reference to virtual machine 110, when the guest application 110c or guest operating system 110b attempts to perform an input/output operation on a virtual disk, initiate network communication, or perform a privileged operation, for example, the virtual hardware 110a is interrupted so that the host operating system 106 can perform the action on behalf of the virtual machine 110. The host operating system 106 can perform these actions with a process that executes in kernel process space 106b, user process space 106a, or both.
The kernel process space 106b is virtual memory reserved for the host operating system 106's kernel 106d which can include kernel extensions and device drivers, for instance. The kernel process space has elevated privileges (sometimes referred to as “supervisor mode”); that is, the kernel 106d can perform certain privileged operations that are off limits to processes running in the user process space 106a. Examples of privileged operations include access to different address spaces, access to special functional processor units in the host machine such as memory management units, and so on. The user process space 106a is a separate portion of virtual memory reserved for user mode processes. User mode processes cannot perform privileged operations directly.
The host machine 202 can operate utilizing differing processing modes, e.g. 16-bit, 32-bit, 64-bit, and so on. The processing mode of the processor 203 relates to the data and the memory addressed by the processor 203. In some examples, the processor 203 operating in the 16-bit processing mode processes data and memory addresses that are represented by 16 bits; and likewise, the processor 203 operating in the 32-bit processing mode processes data and memory addresses that are represented by 32 bits.
In some examples, during booting of the host operating system 204, the processor 203 operates in one processing mode (e.g., the 16-bit processing mode). After booting of the host operating system 204, the processor 203 can be configured to operate in another processing mode (e.g., the 32-bit or 64-bit processing mode). Switching to the other processing mode can enable the processor 203 to operate at a higher processing rate and increase the number of locations in memory the processor 203 can address, for example. The value of one or more adjacent or non-adjacent control bits of the control register 208 controls selection of the processing mode of the processor 203. In some implementations, the value of a single control bit (e.g., control bit 214) configures the processing mode of the processor 203. The control register 208 can be a 32-bit register, for example, with the control bit 214 being the 31st bit. Other control register widths are possible. Setting the control bit 214 to the have the value of “1,” for example, configures the processor 203 to operate in the particular processing mode (e.g., the 16-bit processing mode) during booting of the system 200. To switch to the other processing mode, e.g. 32-bit or 64-bit, the value of the control bit 214 is changed. For example, setting the control bit 214 to have the value of “0” indicates that the processor 203 utilizes the other processing mode (e.g., the 32-bit or 64-bit processing mode). In some examples, the processor 203 controls setting of the control bit 214. In some other examples, the host operating system 204 controls setting of the control bit 214.
During booting of the host operating system 204, the processor 203 can operate in an initial processing mode. In some examples, the control bit 214 is set to “1,” as shown in
In some examples, the initial processing mode of the processor 203 could result in security vulnerability issues with the system 200. Thus, minimizing the use of the initial processing mode by the processor 203 can minimize or mitigate the security vulnerability issues. In some implementations, the processor 203 employs the initial processing mode only when needed, such as during booting of the host operating system 204. In some examples, the initial processing mode is 16-bit processing mode. To prevent the processor 203 from being configured to use the initial processing mode after having being configured into a different processing mode, the value of the control bit(s) (e.g., control bit 214) is monitored such that only the later processing mode is utilized.
In some implementations, the virtual register 400 is a 32-bit register, with a locking bit 402 set as the 31st bit of the virtual register 400. Other register widths are possible. In further implementations, setting the locking bit 402 to have the value of “0” indicates enabling of the monitoring module 210 to monitor of the value of the control bit 214 and to detect attempts to change the value of the control bit 214. Setting the locking bit 402 to have the value of “1” indicates disabling of the monitoring module 210 from monitoring of the value of the control bit 214. In some examples, the VM 206 controls setting of the locking bit 402.
To that end, when the value of the locking bit 402 is set to indicate that the monitoring module 210 monitors the value of the control bit 214, the processor 203 employs only a selected processing mode (e.g., the later processing mode after booting of the host operating system 204). When an attempt to change the value of the control bit 214 is made resulting in the processor 203 switching processing modes (e.g., the processor 203 switching from the other processing mode to the particular processing mode), the interceptor module 212 intercepts the attempt. Upon intercepting an attempt, the system 200 prevents the control bit 214 from being changed such that the processor 203 does not change processing modes. In some examples, when the interceptor module 212 intercepts the attempt, an alert can be triggered to indicate an intrusion of the system 100. In some examples, when the interceptor module 212 intercepts the attempt, any processing by the processor 203 is ceased.
Embodiments of the subject matter and the operations described in this specification can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions, encoded on computer storage medium for execution by, or to control the operation of, data processing apparatus. Alternatively or in addition, the program instructions can be encoded on an artificially-generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus. A computer storage medium can be, or be included in, a computer-readable storage device, a computer-readable storage substrate, a random or serial access memory array or device, or a combination of one or more of them. Moreover, while a computer storage medium is not a propagated signal, a computer storage medium can be a source or destination of computer program instructions encoded in an artificially-generated propagated signal. The computer storage medium can also be, or be included in, one or more separate physical components or media (e.g., multiple CDs, disks, or other storage devices).
The operations described in this specification can be implemented as operations performed by a data processing apparatus on data stored on one or more computer-readable storage devices or received from other sources.
The term “data processing apparatus” encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, a system on a chip, or multiple ones, or combinations, of the foregoing The apparatus can include special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit). The apparatus can also include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or a combination of one or more of them. The apparatus and execution environment can realize various different computing model infrastructures, such as web services, distributed computing and grid computing infrastructures.
A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, object, or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.
The processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform actions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).
Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a processor for performing actions in accordance with instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), to name just a few. Devices suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
To provide for interaction with a user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input. In addition, a computer can interact with a user by sending documents to and receiving documents from a device that is used by the user; for example, by sending web pages to a web browser on a user's client device in response to requests received from the web browser.
Embodiments of the subject matter described in this specification can be implemented in a computing system that includes a back-end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front-end component, e.g., a client computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the subject matter described in this specification, or any combination of one or more such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (“LAN”) and a wide area network (“WAN”), an inter-network (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks).
The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. In some embodiments, a server transmits data (e.g., an HTML page) to a client device (e.g., for purposes of displaying data to and receiving user input from a user interacting with the client device). Data generated at the client device (e.g., a result of the user interaction) can be received from the client device at the server.
While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any inventions or of what may be claimed, but rather as descriptions of features specific to particular embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.
Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
Thus, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In certain implementations, multitasking and parallel processing may be advantageous.
Number | Date | Country | |
---|---|---|---|
61432526 | Jan 2011 | US |