Claims
- 1. A kernel module modification apparatus for adapting for a kernel on a target system a compiled kernel module corresponding to another kernel version which is different from the kernel on the target system, comprising:
a kernel analyzer adapted to extract from the kernel on the target system an error check measure and a kernel version identification; and a module adaptation component adapted to insert in the compiled kernel module an error check parameter corresponding to the error check measure extracted by the kernel analyzer from the kernel on the target system, and to replace a-version identification in the compiled kernel module with the kernel version identification extracted by the kernel analyzer from the kernel on the target system.
- 2. The apparatus of claim 1, wherein the compiled kernel module into which the error check parameter is inserted is binary.
- 3. The apparatus of claim 1, wherein the modified, compiled kernel module, which has inserted therein the error check parameter and bears the kernel version identification extracted from the kernel on the target system, is loadable into the kernel on the target system.
- 4. The apparatus of claim 1, wherein the error check measure includes one or more checksums extracted by the kernel analyzer from the kernel on the target system.
- 5. The apparatus of claim 1, wherein, the kernel analyzer locates a symbol table in the compiled kernel module and, for each symbol name in the symbol table, performs an analysis of the symbol name.
- 6. The apparatus of claim 5, wherein the symbol name analysis performed by the kernel analyzer includes comparing the symbol name to symbols in the kernel on the target system.
- 7. The apparatus of claim 6, wherein if the symbol name is matched to a symbol in the kernel on the target system, the kernel analyzer extracts a checksum associated with the matched symbol and the module adaptation component appends the extracted checksum to the symbol name in the symbol table of the compiled kernel module.
- 8. The apparatus of claim 5, wherein the module adaptation component adjusts one or more offsets of the symbol table, after the symbol names are analyzed.
- 9. The apparatus of claim 1, wherein the compiled kernel module is a loadable Linux kernel module.
- 10. A method for adapting for a kernel on a target system a compiled kernel module corresponding to another kernel version which is different from the kernel on the target system, comprising:
extracting from the kernel on the target system an error check measure and a kernel version identification; inserting in the compiled kernel module an error check parameter corresponding to the error check measure extracted from the kernel on the target system; and replacing a version identification in the compiled kernel module with the kernel version identification extracted from the kernel on the target system.
- 11. The method of claim 10, wherein the compiled kernel module into which the error check parameter is inserted is binary.
- 12. The method of claim 10, wherein the modified, compiled kernel module having inserted therein the error check parameter and bearing the kernel version identification extracted from the kernel on the target system is loadable into the kernel on the target system.
- 13. The method of claim 10, wherein the extracted error check measure includes one or more checksums extracted from the kernel on the target system.
- 14. The method of claim 10 further comprising locating a symbol table in the compiled kernel module and, for each symbol name in the symbol table, performing an analysis of the symbol name.
- 15. The method of claim 14, wherein the symbol name analysis includes comparing the symbol name to symbols in the kernel on the target system.
- 16. The method of claim 15, wherein if the symbol name is matched to a symbol in the kernel on the target system, a checksum associated with the matched symbol is extracted and then appended to the symbol name in the symbol table of the compiled kernel module.
- 17. The method of claim 14, wherein offsets of the symbol table are adjusted after the symbol names are analyzed.
- 18. The method of claim 10, wherein the compiled kernel module is a loadable Linux kernel module.
- 19. A system, comprising:
a processor; and a program storage device readable by the system, tangibly embodying a program of instructions executable by the machine to perform the method of claim 10.
- 20. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform the method of claim 10.
- 21. A computer data signal embodied in a transmission medium which embodies instructions executable by a computer to perform the method of claim 10.
CROSS-REFERENCE TO RELATED APPLICATION
[0001] This application claims the benefit of commonly assigned U.S. Provisional Application No. 60/373,120, filed Apr. 17, 2002 and entitled “APPARATUS AND METHOD FOR MODIFYING A KERNEL MODULE TO RUN ON MULTIPLE KERNEL VERSIONS”.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60373120 |
Apr 2002 |
US |
Continuations (1)
|
Number |
Date |
Country |
Parent |
10418769 |
Apr 2003 |
US |
Child |
10761543 |
Jan 2004 |
US |