dynamic software updating

Uses your system voice; voice and rate in settings.

Q5318928Snapshot

≈ 5 min read

Names in other languages

  • УкраїнськаДинамічне оновлення програмного забезпечення
  • Englishdynamic software updating

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

In computer science, dynamic software updating (DSU) is a field of research pertaining to upgrading programs while they are running. DSU is not currently widely used in industry. However, researchers have developed a wide variety of systems and techniques for implementing DSU. These systems are commonly tested on real-world programs. Current operating systems and programming languages are typically not designed with DSU in mind. As such, DSU implementations commonly either utilize existing tools, or implement specialty compilers. These compilers preserve the semantics of the original program, but instrument either the source code or object code to produce a dynamically updateable program. Researchers compare DSU-capable variants of programs to the original program to assess safety and performance overhead.

In computer science, dynamic software updating (DSU) is a field of research pertaining to upgrading programs while they are running. DSU is not currently widely used in industry. However, researchers have developed a wide variety of systems and techniques for implementing DSU. These systems are commonly tested on real-world programs. Current operating systems and programming languages are typically not designed with DSU in mind. As such, DSU implementations commonly either utilize existing tools, or implement specialty compilers. These compilers preserve the semantics of the original program, but instrument either the source code or object code to produce a dynamically updateable program. Researchers compare DSU-capable variants of programs to the original program to assess safety and performance overhead.

Implementation

DSU systems must load new code into a running program, and transform existing state into a format that is understood by the new code. Since many motivational use-cases of DSU are time-critical (for example, deploying a security fix on a live and vulnerable system), DSU systems must provide adequate update availability. Some DSU systems also attempt to ensure that updates are safe before applying them. There is no one canonical solution to any of these problems. Typically, a DSU system that performs well in one problem area does so at a trade-off to others. For example, empirical testing of dynamic updates indicates that increasing the number of update points results in an increased number of unsafe updates.

Ksplice, kpatch and kGraft

Ksplice is a DSU system that targets only the Linux kernel, making itself one of the specialized DSU systems that support an operating system kernel as the target program. Ksplice uses source-level diffs to determine changes between current and updated versions of the Linux kernel, and then uses binary rewriting to insert the changes into the running kernel. Ksplice was maintained by a commercial venture founded by its original authors, Ksplice Inc., which was acquired by Oracle Corporation in July 20111.

Ksplice is used on a commercial basis and exclusively in the Oracle Linux distribution. SUSE developed kGraft as an open-source alternative for live kernel patching, and Red Hat did likewise with kpatch. They both allow function-level changes to be applied to a running Linux kernel, while relying on live patching mechanisms established by ftrace.

The primary difference between kGraft and kpatch is the way they ensure runtime consistency of the updated code sections while hot patches are applied. kGraft and kpatch were submitted for inclusion into the Linux kernel mainline in April 2014 and May 2014, respectively, and the minimalistic foundations for live patching were merged into the Linux kernel mainline in kernel version 4.0, which was released on April 12, 2015.

Since April 2015, there is ongoing work on porting kpatch and kGraft to the common live patching core provided by the Linux kernel mainline. However, implementation of the function-level consistency mechanisms, required for safe transitions between the original and patched versions of functions, has been delayed because the call stacks provided by the Linux kernel may be unreliable in situations that involve assembly code without proper stack frames; as a result, the porting work remains in progress .

In an attempt to improve the reliability of kernel's call stacks, a specialized sanity-check userspace utility has also been developed with the purpose of checking kernel's compile-time object files and ensuring that the call stack is always maintained; it also opens up a possibility for achieving more reliable call stacks as part of the kernel oops messages.

External links

Ksplice homepage Ginseng Project Page and Source Code/ UpStare Paper/ PoLUS paper Erlang homepage Katana homepage Whitepaper blog post on Visual C++ patching

Text derived from https://en.wikipedia.org/w/index.php?oldid=1375072733 under CC BY-SA 4.0; modifications have been made.

References

1 claim could not be tied to a specific sentence and is listed in the table below instead.

  1. ↩Wikipedia “dynamic software updating” revision 1375072733 · retrieved 2026-10-20 date of foundation (×1) · confidence 0.95 revision URL