IP Library Granted Patent US 9,170,803
Granted Patent B2
US 9,170,803 · App. 14/134,026 · Granted Oct 27, 2015

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,170,803
App. No.
14/134,026
Granted
Oct 27, 2015
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 (25)

1. A method, comprising:

loading, via the device, a patch function for an existing function within a kernel of an Operating System (OS);

setting, via the device, a flag for each kernel thread active within the Operating System (OS);

unsetting, via the device, each flag when any OS thread enters the kernel or when any OS thread exits the kernel; and

inspecting, via the device, each flag for each kernel thread that attempts to execute the existing function and when that flag is set pass that kernel thread to the existing function for execution but when that flag is unset pass that kernel thread to the patch function without halting the OS.

2. The method of claim 1 , wherein loading further includes installing the patch function as a loadable module within memory without stopping the OS,

3. The method of claim 1 , wherein setting further includes injecting a jump instruction at a location for the existing function within the kernel to initially execute to the existing function.

4. The method of claim 3 , wherein injecting further includes issuing a flush of cache on processors using the OS.

5. The method of claim 4 , wherein issuing further includes inserting a trampoline function at every remaining reference to the existing function within the kernel, the trampoline function permits each flag to be checked every time the existing function is called for execution by each kernel thread.

6. The method of claim 5 , wherein inserting further includes issuing a second flush of the cache.

7. The method of claim 6 , wherein issuing further includes using each trampoline function to send each kernel thread to the jump instruction at the first reference when that kernel thread's flag is set.

8. The method of claim 6 , wherein issuing further includes using each trampoline function to send each kernel thread to the patch function when that kernel thread's flag is unset.

9. The method of claim 6 , wherein issuing further includes modifying the jump instruction to jump to the patch function when every kernel thread has its flag unset.

10. The method of claim 9 , wherein modifying further includes replacing each trampoline function with a new jump instruction that jumps to the patch function when every kernel thread has its flag unset.

11. The method of claim 10 , wherein replacing further includes terminating the unsetting of each flag and the inspecting of each flag when every kernel thread has its flag unset.

12. The method of claim 1 , wherein unsetting further includes setting and unsetting an additional flag for each processing unit in a multi-processing unit environment while updating the OS with the patch function on a per processing unit basis.

13. A method, comprising:

inserting, via a device, labels before locations of functions within a kernel of an Operating System (OS) when the OS is compiled;

replacing, via the device, the labels with no operations (NOPs) when the OS is booted; and

loading, via the device, a patch function for a particular one of the functions; and

gradually migrating, via the device, all references to the particular one of the functions within the kernel to call the patch function using particular NOPs for the particular one of the functions without halting the OS during migration.

14. The method of claim 13 , wherein inserting further includes processing a counter instruction of a compiler that compiles the OS for inserting the labels.

15. The method of claim 14 , wherein replacing further includes using a list for the locations provided by the compiler to replace the labels with the NOPs.

16. The method of claim 15 , wherein using further includes maintaining the list for use when updating any of the functions within the OS.

17. The method of claim 13 , wherein loading further includes loading the patch function as a loadable module within memory of the device.

Assignments (8)
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 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 21, 2014
From: PAVLIK, VOJTECH; KOSINA, JIRI
To: NOVELL, INC.
Reel/Frame 033578/0942 →
GRANT OF PATENT SECURITY INTEREST (SECOND LIEN) Recorded Mar 12, 2014
From: NOVELL, INC.
To: CREDIT SUISSE AG, AS COLLATERAL AGENT
Reel/Frame 032439/0133 →
GRANT OF PATENT SECURITY INTEREST (FIRST LIEN) Recorded Mar 12, 2014
From: NOVELL, INC.
To: CREDIT SUISSE AG, AS COLLATERAL AGENT
Reel/Frame 032439/0103 →