In computing, kexec (coming from kernel execution, 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.
- 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.
|This computing article is a stub. You can help Wikipedia by expanding it.|