Kernel and some kernel boot drivers need licensing information including licensing policies as early as phase0 initialization of kernel. Examples are maximum number of licensed processors, maximum memory amount, etc. Conventionally, licensing information is hard coded into components for the kernel and components that are booted early in the initialization process. In other words, kernel defaults are hard coded into the code. The licensing information dictates what the kernel and early boot components can do. Because the licensing information is hard coded, it is generally unchangeable and inflexible. It would be desirable for the licensing information to be changeable and flexible.
A cache is provided that stores licensing policies and information for components. The cache is available during initialization and startup of the operating system, for use by the kernel and early boot components (e.g., encrypted file system (EFS), video drivers, audio drivers, etc.). Kernel and early boot components can then call a kernel application programming interface (API) to query the policy values. The policy values are read from a registry value into memory very early in the boot sequence. Using the kernel cache, the system may be started with proper licensable limits.
The cache is created during the build process and written into the registry to help get the system booted. Once system is running, the kernel cache may be created or re-created. During runtime, the information is put into the kernel memory. When the system is shut down, the information in the kernel memory is lost. However, the information is also cached in the registry, so it is available during a subsequent boot. On subsequent reboots, the most up-to-date cache is in place for kernel components to query.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
A cache is provided that stores licensing policies and information for components. The cache is centrally located and contains the information that globally dictates how components should behave. The cache is available early in the boot cycle, such as during initialization and startup of the operating system, for use by the kernel and early boot components. Kernel and early boot components can then call a kernel API to query the policy values. The policy values are read from a registry value into memory very early in the boot sequence. Using the kernel cache, the system may be started with proper licensable limits.
Exemplary Computing Arrangement
Numerous other general purpose or special purpose computing system environments or configurations may be used. Examples of well known computing systems, environments, and/or configurations that may be suitable for use include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, embedded systems, distributed computing environments that include any of the above systems or devices, and the like.
Computer-executable instructions, such as program modules, being executed by a computer may be used. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Distributed computing environments may be used where tasks are performed by remote processing devices that are linked through a communications network or other data transmission medium. In a distributed computing environment, program modules and other data may be located in both local and remote computer storage media including memory storage devices.
With reference to
Computer 110 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 110 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CDROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by computer 110. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer readable media.
The system memory 130 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 131 and random access memory (RAM) 132. A basic input/output system 133 (BIOS), containing the basic routines that help to transfer information between elements within computer 110, such as during start-up, is typically stored in ROM 131. RAM 132 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 120. By way of example, and not limitation,
The computer 110 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media discussed above and illustrated in
The computer 110 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 180. The remote computer 180 may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 110, although only a memory storage device 181 has been illustrated in
When used in a LAN networking environment, the computer 110 is connected to the LAN 171 through a network interface or adapter 170. When used in a WAN networking environment, the computer 110 typically includes a modem 172 or other means for establishing communications over the WAN 173, such as the Internet. The modem 172, which may be internal or external, may be connected to the system bus 121 via the user input interface 160, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 110, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
Cache with Licensing Data
A licensing policy cache is a cache comprising software licensing policy values that resides in kernel memory. Kernel components, and other early boot components, may query policy values in this cache via a callable interface, e.g., an application programming interface (API), such as a QueryLicensingPolicyValue API, described further herein. A kernel cache registry is a copy of the latest version of the licensing policy cache that is stored in the protected registry. This is used to populate the licensing policy cache at boot time. Software licensing kernel code is code that resides in the kernel to manage the licensing policy cache and licensing policy queries, for example.
License files may be, for example, eXtensible Rights Markup Language (XrML) files that specify rights to software and may specify various types of conditions on the exercise of those rights. XrML is a type of XML whose syntax is specifically designed to describe rights and policies for digital goods. Thus, the policy values provide proper licensable limits, for example.
A flow diagram of an example method using the cache 210 is shown in
During initialization and startup of the operating system, at step 320, the kernel and early boot components access the data in the cache, e.g., to retrieve policy information. Kernel mode components may query licensing information directly from the kernel cache via a call. For example, kernel and early boot components may call a kernel API to query the policy values in the cache. The system is then started with the licensable limits set by the policy values in the cache, at step 330.
Desirably, the cache is created during the build process and written into the registry to help get the system booted. Once the system is running, the kernel cache may be created or re-created. During runtime, the information is put into the kernel memory. When the system is shut down, the information in the kernel memory is lost. However, the information is also cached in the registry, so it is available during a subsequent boot. On subsequent reboots, the most up-to-date cache is in place for kernel components to query.
Whenever new licenses are installed, the entire cache may be re-calculated. If the system is booted, any new licensing values as a result of new licenses desirably will be available to kernel and early boot components.
An API 240 is exposed that allows application software (such as application 135) to query the policy values that have been read from a registry value into memory very early in the boot sequence. The manner in which a kernel API, such as kernel API 240, may be used by an application is described with reference to
An example QueryLicensingPolicyValue API is provided as:
To update the data in the policy cache, an update policy cache API may be called, which then calls an update license data API to perform the cache update. To update license data, an API such as UpdateLicenseData may be used:
Kernel APIs facilitate kernel componentization by enabling kernel components to query the kernel licensing policies. The components of an operating system may query licensing information by using an API, for example. The APIs may be built into the kernel. Kernel and kernel drivers are componentized along with user mode components. The same concept may be applied to the kernel model components. Kernel mode components and kernel mode drivers desirably have means to query licensing policies.
Examples of the impacted kernel licensing policies include changing the maximum number of processors, the maximum available memory, and enabling or disabling kernel-mode features such as encrypted file system or dynamic volumes support.
Example settings that describe the kernel configuration in the registry that are conventionally fixed may be included in the kernel policy cache. Among these are:
It is desirable to prevent users from modifying the contents of the kernel memory cache, and to notify a user if a tamper condition is detected. Kernel cache protection is provided against tampering.
Additionally, in an embodiment, tamper conditions should result in the kernel code emptying the kernel policy cache, at step 615. The kernel cache registry is desirably not written in response to a tamper; only the in memory kernel policy cache should be emptied. This allows queries at the next boot and components to receive the same policy values that they would have if the system were properly shutdown prior to the tamper.
Notification is provided to the operating system kernel component of changes to policy values.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.