Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kexec : block arbitrary kexec load #3120

Merged
merged 1 commit into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/KERNEL-DUMPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ At the moment, the only architecture supported for capturing kernel dumps is x86

Once `kexec` is called the system kernel is ready to handle a system crash by jumping to a dump-capture kernel in case of a panic.

**Note**: `kexec` load happens as a one-time operation via an early boot service and then immediately any further `kexec` gets blocked by writing to `/proc/sys/kernel/kexec_load_disabled`.

## EVE-OS behaviour in case of a system crash (kernel panic)

After successfully loading the dump-capture kernel as previously described in the introduction, the system will reboot into the dump-capture kernel if a system crash is triggered. Trigger points are located in panic(), die(), die_nmi() and in the sysrq handler (ALT-SysRq-c). After the dump-capture kernel is booted, the file `/proc/vmcore` is used to get access to the memory of the crashed system kernel.
Expand Down
5 changes: 5 additions & 0 deletions pkg/dom0-ztools/rootfs/etc/init.d/000-kexec
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ if cat /proc/cmdline | grep -q crashkernel; then
#
kexec -p --reuse-cmdline --command-line="irqpoll nr_cpus=1 reset_devices nomodule" /boot/kernel
fi

#
# In any case, block further kexec load
#
echo 1 > /proc/sys/kernel/kexec_load_disabled