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.
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.
There are security concerns associated with the kexec mechanism, as basically anything can be loaded and executed that way, due to the fact that new kernel to be executed is not required to be signed. In other words, 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. However, as of June 2014[update] there is an ongoing work on a solution for this problem.
- 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
- Hariprasad Nellitheertha (2004-05-04). "Reboot Linux faster using kexec". IBM. Archived from the original on 2013-01-21. Retrieved 2013-12-05.
- David Pendell (2008-08-16). "Reboot like a racecar with kexec". linux.com. Retrieved 2013-12-05.
- Matthew Garrett (2013-12-03). "Subverting security with kexec". dreamwidth.org. Retrieved 2013-12-05.
- Kees Cook (2013-12-10). "Live patching the kernel". outflux.net. Retrieved 2013-12-12.
- Jake Edge (2014-06-25). "Reworking kexec for signatures". LWN.net. Retrieved 2014-08-09.
|This Linux-related article is a stub. You can help Wikipedia by expanding it.|