IP Library Granted Patent US 6,928,536
Granted Patent B2
US 6,928,536 · App. 09/995,775 · Granted Aug 9, 2005

Dynamic execution layer interface for replacing instructions requiring unavailable hardware functionality with patch code and caching

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 6,928,536
App. No.
09/995,775
Granted
Aug 9, 2005
Kind
B2
Abstract

A system and method for dynamically patching code. In one embodiment, a method includes intercepting original program instructions during execution of the program using a software interface, determining whether associated instructions have been cached in a code cache of the software interface and, if so, executing the cached instructions from the code cache, if associated instructions have not been cached, determining if the original program instructions require unavailable hardware functionality, and dynamically replacing the original program instructions with replacement instructions that do not require unavailable hardware functionality if it is determined that the original program instructions require unavailable hardware functionality, the dynamic replacing including fetching replacing instructions, storing the replacement instructions in the code cache, and executing the replacement instructions from the code cache.

Claims (29)

1. A method for dynamically patching code, comprising:

gaining control over the execution of a program using a software interface;

intercepting original program instructions during execution of the program using the software interface;

determining whether associated instructions have been cached in a code cache of the software interface and, if so, executing the cached instructions from the code cache;

if associated instructions have not been cached, determining if the original program instructions require unavailable hardware functionality; and

dynamically replacing the original program instructions with replacement instructions that do not require unavailable hardware functionality if it is determined that the original program instructions require unavailable hardware functionality, the dynamic replacing comprising fetching replacement instructions, storing the replacement instructions in the code cache, and executing the replacement instructions from the code cache;

wherein original program instructions that do not require unavailable hardware functionality are not replaced with replacement instructions or translated.

2. The method of claim 1 , further comprising dynamically receiving information about unavailable hardware functionality and replacement instructions that are configured to replace original program instructions that require the unavailable hardware functionality.

3. The method of claim 1 , further comprising copying intercepted original program instructions that do not require unavailable hardware functionality to the software interface code cache such that substantially all execution ultimately occurs within the code cache.

4. The method of claim 1 , wherein dynamically replacing the original program instructions further comprises changing all references to replaced original program instructions such that the replacement instructions in the code cache are executed in lieu of the replaced original program instructions each time the replaced original program instructions would have been executed, thereby avoiding the need to again fetch replacement instructions for the original program instructions.

5. The method of claim 4 , wherein the replacement instructions comprise part of a patch that is made available to the software interface via an application programming interface.

6. A dynamic patching program stored on a computer-readable medium, the program comprising:

logic configured to gain control over execution of a program;

logic configured to intercept original program instructions during program execution;

logic configured to determine if associated instructions have been cached in a code cache controlled by the dynamic patching program;

logic configured to execute associated instructions that have been cached in the code cache;

logic configured to determine if an original program instruction requires unavailable hardware functionality; and

logic configured to dynamically replace original program instructions with a replacement instructions that do not require unavailable hardware functionality if it is determined that the program instructions require unavailable hardware functionality, wherein the logic configured to dynamically replace is configured to fetch a replacement instruction, store the replacement instruction in the code cache, and execute the replacement instruction from the code cache, wherein the logic configured to dynamically replace does not replace or translate original program instructions that do not require unavailable hardware functionality.

7. The program of claim 6 , further comprising logic configured to dynamically receive information about unavailable hardware functionality and replacement instructions that are configured to replace original program instructions that require the unavailable hardware functionality.

8. The program of claim 6 , further comprising logic configured to change all references to replaced original program instructions with references to replacement instructions such that replacement instructions in the code cache are executed in lieu of the replaced original program instructions without the need to again fetch the replacement instructions.

9. The program of claim 6 , further comprising logic configured to copy intercepted original program instructions that do not require unavailable hardware functionality to the code cache such that substantially all execution ultimately occurs within the code cache.

10. A dynamic execution layer interface (DELI) residing between an application and computing system hardware, comprising:

a transparent mode layer that is configured to gain control over the operation of the application and to fetch replacement instructions that are to replace existing application instructions;

a system control and configuration layer configured to provide policies for the replacement of existing application instructions, with the replacement instructions;

a core configured to, during execution of the application, receive policies for the replacement of existing application instructions, to determine whether the existing application instructions require unavailable hardware functionality, to receive replacement instructions to be executed in lieu of the existing application instructions that do require unavailable hardware functionality, to cache the replacement instructions, and to execute the replacement instructions, wherein existing application instructions that do not require unavailable hardware functionality are not translated or replaced; and

a code cache in which the replacement instructions are cached and from which the replacement instructions are executed.

11. The DELI of claim 10 , wherein the transparent mode layer is further configured to fetch application instructions from the application and wherein the core is further configured to cache fetched application instructions in the code cache.

12. The DELI of claim 10 , wherein the core is further configured to change all references to replaced original program instructions with references to replacement instructions such that replacement instructions in the code cache are executed in lieu of the replaced original program instructions without the need to again fetch the replacement instructions.

13. The DELI of claim 10 , wherein the core is further configured to copy intercepted original program instructions that do not require unavailable hardware functionality to the DELI code cache such that substantially all execution ultimately occurs within the code cache.

Assignments (5)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 6, 2021
From: OT PATENT ESCROW, LLC
To: VALTRUS INNOVATIONS LIMITED
Reel/Frame 056157/0492 →
PATENT ASSIGNMENT, SECURITY INTEREST, AND LIEN AGREEMENT Recorded Jan 26, 2021
From: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP; HEWLETT PACKARD ENTERPRISE COMPANY
To: OT PATENT ESCROW, LLC
Reel/Frame 055269/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 9, 2015
From: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 037079/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 30, 2003
From: HEWLETT-PACKARD COMPANY
To: HEWLETT-PACKARD DEVELOPMENT COMPANY L.P.
Reel/Frame 014061/0492 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 21, 2002
From: DUESTERWALD, EVELYN; FREUDENBERGER, STEFAN M.
To: HEWLETT-PACKARD COMPANY
Reel/Frame 012644/0179 →