×

Patching functions in use on a running computer system

  • US 10,310,863 B1
  • Filed: 07/31/2013
  • Issued: 06/04/2019
  • Est. Priority Date: 07/31/2013
  • Status: Active Grant
First Claim
Patent Images

1. A method comprising:

  • receiving a call to an original function;

    modifying, by a processing device, the original function to call a hot patch function to transfer execution control from the original function to a replacement function by changing an initial instruction in the original function that specifies no operation to be executed to specifying that the call to the hot patch function is to be executed, wherein the hot patch function is conditionally applied to replace the original function in view of a number of calls to the original function that have been received by applying the hot patch function for a particular call for every defined number of calls that have been received and not applying the hot patch function for remaining calls for every defined number of calls that have been received;

    changing, by the processing device, a value of a pointer, in a data structure identifying a plurality of original functions used by an operating system, from an original memory location associated with the original function to a replacement memory location associated with the replacement function;

    executing, by the processing device, the replacement function using the pointer to the replacement memory location associated with the replacement function in the data structure identifying the plurality of original functions used by the operating system; and

    returning, by the processing device, to a caller of the original function in response to executing the replacement function.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×