From Wikipedia, the free encyclopedia
Jump to: navigation, search

In computing, kexec (abbreviated from kernel execution, and derived from the Unix/Linux kernel call exec) is a mechanism of the Linux kernel that allows "live" booting of a new kernel "over" the currently running kernel. Essentially, kexec skips the bootloader stage (hardware initialization phase by the system firmware, BIOS or UEFI) and directly loads the new kernel into memory, where it starts executing immediately. This avoids the long times associated with a full reboot, and can help systems to meet high-availability requirements by minimizing downtime.[1][2]

While feasible, implementing a mechanism such as kexec raises two major challenges:

  • Memory of the currently running kernel is overwritten by the new kernel, while the old one is still executing.
  • The new kernel will usually expect all physical devices to be in a well-defined state, as they are after a system reboot, when the BIOS, UEFI or system firmware resets them to a "sane" state. Bypassing a real reboot may leave devices in an unknown state, and the new kernel will have to recover from that.

The kexec mechanism has associated security concerns as the new kernel to be executed is not required to be signed. Thus, despite a robust in-kernel mechanism for ensuring that only signed Linux kernel modules can be inserted into the running kernel, root user can still load arbitrary code via kexec and execute it.[3][4] As of June 2014, work continues on a solution for this problem.[5]

See also[edit]

  • kdump (Linux) – Linux kernel's crash dump mechanism, which internally uses kexec
  • kGraft – Linux kernel live patching technology developed by SUSE
  • kpatch – Linux kernel live patching technology developed by Red Hat
  • Ksplice – Linux kernel live patching technology developed by Ksplice, Inc. and later bought by Oracle


  1. ^ Hariprasad Nellitheertha (2004-05-04). "Reboot Linux faster using kexec". IBM. Archived from the original on 2013-01-21. Retrieved 2013-12-05. 
  2. ^ David Pendell (2008-08-16). "Reboot like a racecar with kexec". Retrieved 2013-12-05. 
  3. ^ Matthew Garrett (2013-12-03). "Subverting security with kexec". Retrieved 2013-12-05. 
  4. ^ Kees Cook (2013-12-10). "Live patching the kernel". Retrieved 2013-12-12. 
  5. ^ Jake Edge (2014-06-25). "Reworking kexec for signatures". Retrieved 2014-08-09. 

External links[edit]