Search Images Maps Play YouTube News Gmail Drive More »
Advanced Patent Search | Web History | Sign in

Patents

A system and method for automatically updating software components on a running computer system without requiring any interruption of service. A software module is hotpatched by loading a patch into memory and modifying an instruction in the original module to jump to the patch. A coldpatching technique places a coldpatch version of the module on disk for subsequent loading by processes, after hotpatching occurred. The coldpatch has the entry points to its functions at the same relative locations within the module as the hotpatch, which facilitates subsequent hotpatching. A hotpatch and coldpatch are automatically generated by deriving differences between changed and original binary files, and establishing the point to insert the jump. Validation is performed to ensure that the hotpatch is applied to the correct version, and that the coldpatch is replacing the correct version. Version management is also provided to control the number of patches via support rules.

Referenced by

Citing PatentFiling dateIssue dateOriginal AssigneeTitle
US6996635Aug 22, 2003Feb 7, 2006International Business Machines CorporationApparatus and method to activate transparent data storage drive firmware updates
US7325227Nov 12, 2003Jan 29, 2008System, method, and computer program product for identifying code development errors
US7389503Apr 16, 2004Jun 17, 2008International Business Machines CorporationApparatus and method to update code in an information storage and retrieval system while that system remains in normal operation
US7577848Jan 18, 2005Aug 18, 2009Microsoft CorporationSystems and methods for validating executable file integrity using partial image hashes
US7657886Jun 3, 2005Feb 2, 2010Hewlett-Packard Development Company, L.P.Mobile device with a MMU for faster firmware updates in a wireless network
US7689972Mar 21, 2005Mar 30, 2010Microsoft CorporationSystem and method for producing software patches
US7761638Apr 22, 2008Jul 20, 2010Microsoft CorporationDynamic creation of low-level interfaces
US7788661Mar 10, 2006Aug 31, 2010International Business Machines CorporationMethod and system for applying patches to a computer program concurrently with its execution
US7797752Dec 17, 2003Sep 14, 2010Method and apparatus to secure a computing environment
US7810085Mar 23, 2006Oct 5, 2010Microsoft CorporationRemoval of unnecessary read-to-update upgrades in software transactional memory
US7814077Apr 3, 2007Oct 12, 2010International Business Machines CorporationRestoring a source file referenced by multiple file names to a restore file
US7861237Mar 23, 2006Dec 28, 2010Microsoft CorporationReducing unnecessary software transactional memory operations on newly-allocated data
US7882333Nov 5, 2007Feb 1, 2011Dell Products L.P.Architectural enhancements to CPU microcode load mechanism using inter processor interrupt messages
US7886287Aug 27, 2003Feb 8, 2011Avaya Inc.Method and apparatus for hot updating of running processes
US7890946Jun 30, 2004Feb 15, 2011Microsoft CorporationEfficient patching
US7904901Nov 2, 2005Mar 8, 2011Parallels Holdings, Ltd.System and method for controlling installed third party software components
US7913243Jun 21, 2006Mar 22, 2011International Business Machines CorporationMethod and system for generating and applying patches to a computer program concurrently with its execution
US8032880Dec 20, 2005Oct 4, 2011Microsoft CorporationMulti-branch management for updating software
US8055096May 10, 2006Nov 8, 2011Research In Motion LimitedMethod and system for incremental patching of binary files
US8099726Mar 23, 2006Jan 17, 2012Microsoft CorporationImplementing strong atomicity in software transactional memory
US8108852Jul 30, 2004Jan 31, 2012KW-Software GmbHOnline modification of CIL code programs for industrial automation
US8140486Aug 5, 2010Mar 20, 2012International Business Machines CorporationRestoring a source file referenced by multiple file names to a restore file
US8156487Jul 2, 2009Apr 10, 2012Microsoft CorporationEfficient patching
US8205190Jan 29, 2008Jun 19, 2012Hewlett-Packard Development Company, L.P.Data processing system and method

Claims

1. In a computing environment, a method comprising:

automatically installing a hotpatch for at least one process that is running a first instance of a software code module, the hotpatch comprising a first software code patch that includes changed code with respect to code in the first instance and location information for jumping from a location in the first instance to the first software code patch; and
providing a second mechanism by which processes that request to run an instance of the software code module and that are not running the first instance of the software code module will execute a second instance of the software code module, the second instance comprising a second software code patch and a jump mechanism for jumping from a location in the second instance to the second software code patch.

2. The method of claim 1 wherein installing the hotpatch includes loading the first patch in memory and atomically placing an instruction into the first instance based on the location information, the instruction jumping to the first patch when executed.

3. The method of claim 2 wherein at least one other processor is executing code in the computing environment, and wherein atomically placing the instruction includes suspending each other processor from executing until the instruction has been placed in the first instance.

4. The method of claim 1 wherein providing a second mechanism comprises, installing a coldpatch file on a storage device, the coldpatch file comprising a loadable image of the patch, and a loadable image of the software module with an instruction to jump to the patch, and wherein the request to run an instance of the software code module will load the second instance and the second patch.

5. The method of claim 4 further comprising, validating the coldpatch as appropriate for patching the software code module before storing the coldpatch file.

6. The method of claim 4 wherein installing the coldpatch file comprises, in an atomic operation, renaming an existing file having an existing name to another name and renaming the coldpatch file to the existing name.

7. The method of claim 6 wherein the atomic operation occurs after copying the coldpatch file to the storage device.

8. The method of claim 1 wherein providing the second mechanism comprises, dynamically generating the second instance of the software code module from an original image of the software module and an image of the software code patch of the hotpatch.

9. The method of claim 1 wherein providing a hotpatch comprises, generating the hotpatch from an existing code module and a changed code module.

10. The method of claim 9 wherein providing the second mechanism comprises generating a coldpatch file, the coldpatch file comprising the existing code module and the software code patch.

11. The method of claim 1 further comprising, validating the hotpatch as appropriate for patching the first instance of the software code module.

12. The method of claim 11 wherein validating the hotpatch comprises, evaluating a hash value associated with the hotpatch against a hash value associated with the first instance of the software code module.

13. The method of claim 1 wherein a plurality of hotpatch versions are available, and further comprising, selecting a version as the hotpatch.

14. The method of claim 1 wherein providing the second mechanism comprises loading a coldpatch, the coldpatch comprising the patch and the software module, the software module having an instruction to jump to the patch.

15. The method of claim 14, further comprising, hotpatching a running instance of the coldpatch with another hotpatch, the other hotpatch comprising a third software code patch that includes changed code with respect to code in the coldpatch and location information for jumping from a location in the running instance of the coldpatch to the third software code patch.

16. The method of claim 1, further comprising, automatically installing a third software code patch for the process that is running the first instance of a software code module that was patched with the first patch.

17. The method of claim 1 wherein the hotpatch further comprises additional location information for jumping from another location in the first instance to other software code in the first software code patch.

18. A computer-readable medium having computer-executable instructions for performing the method of claim 1.

19. In a computing environment, a method comprising:

in response to a request to patch a running instance of a software module:
(a) automatically performing a validation to determine whether a hotpatch file that may be used to patch the running instance includes data that is appropriate for patching the running instance, the data including a patch; and
(b) if the validation indicates that the data is appropriate, automatically installing the patch, including loading the patch in memory and modifying code in the running instance to jump to the patch.

20. The method of claim 19 wherein performing the validation comprises comparing a file name of a file corresponding to the running instance to be patched.

21. The method of claim 19 wherein performing the validation comprises, comparing code bytes in the hotpatch with code bytes in the running instance to be patched.

22. The method of claim 19 wherein performing the validation comprises, evaluating a hash value associated with the hotpatch against a hash value associated with the running instance of the software code module.

23. The method of claim 22 wherein the hash value associated with the hotpatch comprises a hash of at least part of a program execution header.

24. The method of claim 22 wherein the hash value associated with the hotpatch comprises a hash of at least part of a program execution header, and wherein performing the validation further comprises, comparing code bytes in the hotpatch with code bytes in the running instance to be patched.

25. The method of claim 19 wherein modifying code in the running instance to jump to the patch comprises swapping into memory a modified page from a non-volatile storage.

26. The method of claim 19 further comprising, installing a coldpatch file on a storage device in place of an existing module file from which the running instance of the software code module was loaded, the coldpatch file comprising an image of the patch and an image of the existing module file.

27. The method of claim 26 further comprising, loading an instance of the software module from the coldpatch file in storage, including loading an instance of a patch and a modified instance of the existing module, wherein the modified instance jumps to the patch instance instead of executing another section of code.

28. The method of claim 26 wherein modifying code in the running instance to jump to the patch comprises swapping into memory a page from the coldpatch file.

29. The method of claim 26 further comprising, automatically performing another validation to determine whether the coldpatch file that may be loaded is appropriate for storing in place of the existing module file.

30. The method of claim 26 further comprising, storing a hash value associated with the hotpatch in coldpatch data, and performing another validation, including attempting to evaluate a hash value associated with the hotpatch against a hash value associated with the running instance of the software code module, determining that the coldpatch data is present, and accessing the hash value stored in the coldpatch data to perform the evaluation.

31. The method of claim 26 further comprising, performing another validation including file checksum validation to verify that the coldpatch file is appropriate for replacing the existing module file.

32. The method of claim 26 further comprising generating the coldpatch file from a copy of the existing module file.

33. The method of claim 32 further comprising, validating that the coldpatch file matches the existing module file by obtaining a hash value indicative of the copy of the existing file from which the coldpatch file was generated, and comparing it with a hash value obtained from the existing module file.

34. The method of claim 19 further comprising, receiving a request to load another instance of the software module, and in response to the request, dynamically generating and loading a modified module based on an image of the patch and an image of the existing module file, wherein when executed, the modified module includes code that jumps to code in the patch.

35. The method of claim 19 further comprising, performing another validation to evaluate the modified code in the running instance.

36. The method of claim 19 wherein the validation does not initially indicate that the data is appropriate, and further comprising, determining whether the patch corresponds to a coldpatch, and if so, determining whether a jump instruction that should jump to the patch is pointing within the same module.

37. The method of claim 19 wherein at least one other processor is executing code in the computing environment, and wherein modifying code in the running instance to jump to the patch occurs after suspending all but one processor from executing in the running instance until the code is modified.

38. The method of claim 19 wherein modifying code in the running instance to jump to the patch comprises modifying at least two locations in the running instance, each modified location being changed to jump to a respective location in the patch.

39. A computer-readable medium having computer-executable instructions for performing the method of claim 19.

40. In a computing environment, a system comprising:

a first data structure comprising a first software module having functions at defined entry points with respect to the first software module;
a second data structure comprising a second software module having functions at defined entry points with respect to the second module, including a modified function that is changed with respect to a function in the first file; and
a patch generation tool that reads the first and second data structures to generate a patch that includes the modified function, the patch generation tool further configured to generate patching information on how to change at least one instruction in a loaded instance of the first software module to jump to the modified function in a loaded instance of the patch.

41. The system of claim 40 wherein the patch generation tool packages the patch and patching information in a hotpatch.

42. The system of claim 40 wherein the patch generation tool stores data in the hotpatch from which a version of the hotpatch can be determined.

43. The system of claim 40 wherein the patch generation tool that reads the first and second data structures further generates a coldpatch file, the coldpatch file comprising a modified image of the first software module and an image of the patch, the modified image of the first software module comprising an instruction such that when the modified image of the first software module is loaded and the instruction is executed, the instruction transfers the execution to a loaded instance of the patch image.

44. The system of claim 40 wherein the patch generation tool stores data associated with the coldpatch file from which a version of the coldpatch file can be determined.

45. The system of claim 40 wherein the patch generation tool packages the patch and patching information in a hotpatch file, and stores the hotpatch file and coldpatch file in a package.

46. The system of claim 45 further comprising, transferring the package to an installer on a remote computer system.

47. The system of claim 46 wherein the installer interprets the package to load the patch in the hotpatch for processes currently running an instance of the first software module, and for modifying code in the instance to jump to the patch, and further interprets the package to save the coldpatch file to automatically load for processes that will later request an instance of the software module.

48. The system of claim 47 wherein the installer saves the coldpatch file via an atomic double rename operation in which an existing file having an existing name is renamed to another name and the coldpatch file is renamed to the existing name.

49. The system of claim 40 wherein the patch generation tool generates the patch to include another modified function, the patch generation tool further configured to generate patching information on how to change at least one other instruction in the loaded instance of the first software module to jump to the other modified function in the loaded instance of the patch.

50. In a computing environment, a system comprising:

a memory loaded with an instance of a software module;
an automatic patch installer that receives a patch request, and in response to the patch request, the installer configured to:
access data including a patch;
access information associated with the patch;
load the patch into the memory; and
interpret the information associated with the patch to modify the loaded instance by placing an instruction therein such that when the instruction is executed, the flow of execution will transfer from the loaded instance to the patch.

51. The system of claim 50 wherein the installer is further configured to validate that the patch is appropriate for patching the loaded instance, before loading the patch and modifying the loaded instance.

52. The system of claim 50 wherein in response to a request to load another instance of the software module, the installer dynamically generates and loads a modified software module based on an image of the patch and an image of the software module, wherein when executed, the modified module includes code that jumps to code in the patch.

53. The system of claim 50 further comprising a storage device, and wherein in response to the patch request, the installer stores a coldpatch file on the storage device, the file including an image of the patch and a modified image of the software module that includes a modified instruction, such that when the coldpatch file is loaded and the modified instruction is executed, the flow of execution will transfer to a loaded instance of the patch.

54. The system of claim 53 wherein the installer is further configured to validate the coldpatch file before storing the file.

55. The system of claim 53 further comprising a loader mechanism that receives a request to load another instance of the software module, and in response, loads an instance of the coldpatch file.

56. The system of claim 55 wherein in response to another patch request, the installer hotpatches the loaded instance of the coldpatch with another hotpatch, the other hotpatch comprising another software code patch that includes changed code with respect to code in the coldpatch and location information for jumping from a location in the running instance of the coldpatch to the other software code patch.

57. The system of claim 53 wherein the installer saves the coldpatch file via an atomic double rename operation in which an existing file having an existing name is renamed to another name and the coldpatch file is renamed to the existing name.

58. The system of claim 57 wherein the atomic double rename operation occurs after copying the coldpatch file to the storage device.

59. The system of claim 50 further comprising a patch generator that generates the patch from an original image of the software module and an image of a modified image of the software module.

60. The system of claim 50 wherein a plurality of processors are executing in the computing environment, and wherein before the loaded instance is modified, the installer suspends all but one processor from executing in the loaded instance.

61. The system of claim 50 wherein in response to another patch request, the installer loads another patch and further modifies the loaded instance that was modified by placing another instruction therein such that when the other instruction is executed, the flow of execution will transfer from the loaded instance to the other patch.

62. The system of claim 50 wherein in response to the patch request, the automatic patch installer further interprets the information associated with the patch to modify another location in the loaded instance by placing another instruction therein such that when the other instruction is executed, the flow of execution will transfer from the other location in the loaded instance to another location in the patch.

63. In a computing environment, a method comprising:

performing a validation to determine whether a selected hotpatch version is appropriate for patching a first instance of a software module, and if so, installing the selected hotpatch version for processes running the first instance, including a) loading a first patch that is present in the hotpatch version, and b) modifying a routine in the first instance of the software module to jump to a routine in the patch when executed;
performing a validation to determine whether a selected coldpatch version is appropriate for replacing a stored image of a software module, and if so, storing the selected coldpatch version, the selected coldpatch version comprising an image of the patch, and an image of the software module with a routine modified therein to jump to a routine in the patch when executed; and
in response to a request to load an instance of the software module, loading the coldpatch as a second instance.

64. The method of claim 63 wherein a plurality of processors are executing in the computing environment, and further comprising, suspending all but one processor before modifying the routine.

65. The method of claim 63 further comprising modifying another routine in the first instance of the software module to jump to another routine in the patch when executed.