Or would that go against the monolithic kernel paradigm of the Linux kernel?<p>Edit: There's this flag in kexec: "--load-preserve-context Load the new kernel and preserve context of current kernel during kexec."
You are describing Kernel Live Patching [1][2][3][4] most commonly used in VPS providers to minimize downtime but keep the fleet patched for security issues. There are some limitations listed in some of the documents below.<p>[1] - <a href="https://wiki.archlinux.org/title/Kernel_live_patching" rel="nofollow">https://wiki.archlinux.org/title/Kernel_live_patching</a><p>[2] - <a href="https://www.redhat.com/en/topics/linux/what-is-linux-kernel-live-patching" rel="nofollow">https://www.redhat.com/en/topics/linux/what-is-linux-kernel-...</a><p>[3] - <a href="https://docs.aws.amazon.com/linux/al2023/ug/live-patching.html" rel="nofollow">https://docs.aws.amazon.com/linux/al2023/ug/live-patching.ht...</a><p>[4] - <a href="https://wiki.alpinelinux.org/wiki/Kernel_live_patching" rel="nofollow">https://wiki.alpinelinux.org/wiki/Kernel_live_patching</a>