Testing kernel mode computer code by executing the computer code in user mode
AssigneeMicrosoft Technology Licensing, LLC
InventorsBarry C. BOND, Patrice GODEFROID
Life of this patent
Estimating the term…
Abstract
Described herein are technologies related to testing computer code for bugs, wherein the computer code is to run in kernel mode of an operating system. The computer code is executed in kernel mode of a first operating system, and content of memory that is mapped to kernel mode address space of the first operating system is transferred to user mode memory that is mapped to user mode address space of a second operating system. The computer code is executed in user mode and tested while being executed in user mode.
Claims20
A computing system comprising:
- a processor;
- and
- memory that stores instructions that, when executed by the processor, cause the processor to perform acts comprising:
- receiving a file generated by a computing device that is representative of content of kernel mode address space of an operating system executing on the computing device, wherein the content represented by the file comprises computer code that is to be tested for bugs;
- based upon the file, populating a portion of the memory with the content represented by the file, wherein the portion of the memory is mapped to user mode address space of a second operating system being executed by the processor;
- and
- responsive to populating the portion of the memory with the content represented by the file, testing the computer code for the bugs, wherein testing the computer-executable instructions for the bugs comprises:
- executing the computer code in the user mode address space based upon an input provided to the computer code;
- and
- generating an output that is indicative of whether the computer code crashed when executed with the input.
A method executed by a computing system that comprises at least one processor, the method comprising:
- executing computer code that is to be tested for bugs, the computer code executed in kernel mode of a first operating system;
- responsive to detecting that a break point has been triggered in the computer code when executing the computer code, generating a file that is representative of content of kernel mode memory mapped to kernel mode address space of the first operating system when the break point was triggered, wherein the break point has been set by a developer reviewing the computer code;
- based upon the file, populating user mode memory with the content represented by the file, wherein the user mode memory is mapped to user mode address space of a second operating system that is different from the first operating system, wherein the content in the user mode memory comprises the computer code;
- executing the computer code while the computer code is in the user mode memory;
- and
- identifying a bug in the computer code responsive to executing the computer code in the user mode memory.
A computer-readable storage medium comprising instructions that, when executed by a processor, cause the processor to perform acts comprising:
- receiving a file generated by a computing device that is representative of content of kernel mode memory mapped to kernel mode address space of an operating system executing on the computing device, wherein the content represented by the file comprises computer-executable instructions that are to be tested for bugs;
- based upon the file, populating user mode memory with the content represented by the file, wherein the user mode memory is mapped to user mode address space of a second operating system being executed by the processor;
- and
- responsive to populating the user mode memory with the content represented by the file, testing the computer-executable instructions for the bugs, wherein testing the computer-executable instructions for the bugs comprises:
- executing the computer-executable instructions in the user mode memory based upon an input provided to the computer-executable instructions;
- and
- generating an output that is indicative of whether the computer-executable instructions crash when executed with the input.
Dependencies are inferred from the claim text.