From fc3871aa8ad6d9dbfff9bc3be5c131576e0fe8e5 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Thu, 10 Oct 2024 21:08:20 +0200 Subject: [PATCH 1/2] linux/common-config: enable support for crashkernel dumps Signed-off-by: Sefa Eyeoglu --- pkgs/os-specific/linux/kernel/common-config.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 0676294533a8..5cc96ec5fdc4 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -45,8 +45,8 @@ let options = { debug = { - # Necessary for BTF - DEBUG_INFO = whenOlder "5.18" yes; + # Necessary for BTF and crashkernel + DEBUG_INFO = yes; DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT = whenAtLeast "5.18" yes; # Reduced debug info conflict with BTF and have been enabled in # aarch64 defconfig since 5.13 @@ -64,7 +64,7 @@ let RCU_TORTURE_TEST = no; SCHEDSTATS = yes; DETECT_HUNG_TASK = yes; - CRASH_DUMP = option no; + CRASH_DUMP = yes; # Easier debugging of NFS issues. SUNRPC_DEBUG = yes; # Provide access to tunables like sched_migration_cost_ns @@ -85,6 +85,9 @@ let # Export known printks in debugfs PRINTK_INDEX = whenAtLeast "5.15" yes; + + # Enable crashkernel support + PROC_VMCORE = yes; }; power-management = { From d8b5f031dc448652ae800a7aa10bfd1313ffa0cc Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Thu, 10 Oct 2024 21:08:36 +0200 Subject: [PATCH 2/2] nixos/crashdump: remove redundant kernel patch Signed-off-by: Sefa Eyeoglu --- nixos/modules/misc/crashdump.nix | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/nixos/modules/misc/crashdump.nix b/nixos/modules/misc/crashdump.nix index b0f75d9caaa3..b2464e57d3a0 100644 --- a/nixos/modules/misc/crashdump.nix +++ b/nixos/modules/misc/crashdump.nix @@ -60,17 +60,6 @@ in "nmi_watchdog=panic" "softlockup_panic=1" ]; - kernelPatches = [ { - name = "crashdump-config"; - patch = null; - extraConfig = '' - CRASH_DUMP y - DEBUG_INFO y - PROC_VMCORE y - LOCKUP_DETECTOR y - HARDLOCKUP_DETECTOR y - ''; - } ]; }; }; }