IP Library Granted Patent US 9,652,221
Granted Patent B2
US 9,652,221 · App. 14/867,819 · Granted May 16, 2017

Runtime patching of an operating system (OS) without stopping execution

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 9,652,221
App. No.
14/867,819
Granted
May 16, 2017
Kind
B2
Abstract

Techniques for runtime patching of an OS without stopping execution of the OS are presented. When a patch function is needed, it is loaded into the OS code. Threads of the OS that are in kernel mode have a flag set and a jump is inserted at a location of an old function. When the old function is accessed, the jump uses a trampoline to check the flag, if the flag is set, processing returns to the old function; otherwise processing jumps to a given location of the patch. Flags are unset when exiting or entering the kernel mode.

Claims (28)

1. A method, comprising:

monitoring threads of an Operating System (OS);

compiling the OS to uniquely label an existing function and a replacement function before the monitoring; and

gradually transitioning the treads from accessing an existing function to accessing a replacement function as the threads enter or exit kernel processing within the OS using labels that identify the existing function and the replacement function without halting the OS, wherein gradually transitioning includes using flags set on each of the threads that are initially set to access the existing function, and each flag is unset for each of the threads when each of the threads enter or exit the kernel processing of the OS, a thread of the threads having an unset flag identifying that said thread is to access the replacement function.

2. The method of claim 1 , wherein monitoring further includes installing the replacement function as a loadable module within the OS before the monitoring.

3. The method of claim 1 , wherein compiling further includes flushing the cache of processors using the OS before the monitoring.

4. The method of claim 1 , wherein flagging further includes directing by the OS any flagged thread to access the replacement function.

5. The method of claim 1 , wherein flagging further includes directing by the OS any thread that has not been flagged to access the existing function instead of the replacement function.

6. The method of claim 1 , wherein gradually transitioning further includes removing the existing function from the OS when each thread has entered or exited kernel processing.

7. The method of claim 1 , wherein gradually transitioning further includes migrating all threads over time to the replacement function without halting the OS, without stopping the OS, and without rebooting the OS.

8. A method, comprising:

compiling a distributed server-based Operating System (OS) to uniquely label an existing function and a patch function of the OS;

initiating the OS on multiple processors of a distributed server;

loading the patch function to the existing function within the OS;

transitioning threads processing within the OS from the existing function to the patch function once any thread transitions enter or exit kernel processing within the OS using labels that identify the existing function and the patch function without halting the OS, wherein the transitioning threads processing includes using flags set on each of the threads that are initially set to access the existing function, and each flag is unset for each of the threads when each of the threads enter or exit the kernel processing of the OS, a thread of the threads having an unset flag identifying that said thread is to access the patch function.

9. The method of claim 8 , wherein initiating further includes flushing caches associated with the multiple processors.

10. The method of claim 8 , wherein loading further includes loading the patch function as a loadable module installable within the OS while the OS is executing on the multiple processors.

11. The method of claim 8 , wherein transitioning further includes retiring the existing function from the OS once each thread has transitioned to the patch function.

12. The method of claim 8 , wherein transitioning further includes migrating all the threads to the patch function while the OS is executing on the multiple processors.

13. The method of claim 12 , wherein migrating further includes migrating all the threads to the patch function without halting the OS, without stopping the OS, and without rebooting the OS.

14. A system, comprising:

multiple hardware processors configured and cooperating to execute on a distributed server and to execute a distributed Operating System (OS); and

the OS, wherein the OS is configured to

i) uniquely label an existing function and a replacement function installed within the OS, and

ii) gradually transition threads from accessing the existing function to accessing the replacement function once any thread transitions enter or exit kernel processing within the OS using labels that identify the existing function and the replacement function without halting the OS, wherein the gradually transition threads includes using flags set on each of the threads that are initially set to access the existing function, and each flag is unset for each of the threads when each of the threads enter or exit the kernel processing of the OS, a thread of the threads having an unset flag identifying that said thread is to access the replacement function.

15. The server of claim 14 , wherein the OS is further configured to iii) retire the existing function once all threads accessing the existing function are transitioned to the replacement function.

16. The server of claim 14 , wherein the OS is further configured, in ii), to: gradually transition the threads from accessing the existing function to accessing the replacement function for the existing functions without halting the OS, without stopping the OS, and without rebooting the OS.

17. The server of claim 14 , wherein the OS is further configured, in i), to: maintain consistency in the processing of the threads within the OS during migrating.

Assignments (5)
RELEASE OF SECURITY INTEREST REEL/FRAME 044183/0718 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC (F/K/A ENTIT SOFTWARE LLC); BORLAND SOFTWARE CORPORATION; MICRO FOCUS (US), INC.; SERENA SOFTWARE, INC; ATTACHMATE CORPORATION; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.); NETIQ CORPORATION
Reel/Frame 062746/0399 →
RELEASE OF SECURITY INTEREST RECORDED AT REEL/FRAME - : 044183/0718 Recorded Mar 18, 2019
From: JPMORGAN CHASE BANK, N.A.
To: SUSE LLC
Reel/Frame 048628/0436 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 20, 2019
From: MICRO FOCUS SOFTWARE INC.
To: SUSE LLC
Reel/Frame 048379/0548 →
SECURITY INTEREST Recorded Oct 11, 2017
From: ATTACHMATE CORPORATION; BORLAND SOFTWARE CORPORATION; NETIQ CORPORATION; MICRO FOCUS (US), INC.; MICRO FOCUS SOFTWARE, INC.; ENTIT SOFTWARE LLC; ARCSIGHT, LLC; SERENA SOFTWARE, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 044183/0718 →
CHANGE OF NAME Recorded Sep 13, 2016
From: NOVELL, INC.
To: MICRO FOCUS SOFTWARE INC.
Reel/Frame 040020/0703 →