nixbld: lock Linux kernel version to 4.19.79

On newer kernel versions (somewhere before 4.19.89) the shitty iwlwifi driver would crash
the machine every few days with a message like:

Dec 25 12:22:25 nixbld kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000068
Dec 25 12:22:25 nixbld kernel: PGD 0 P4D 0
Dec 25 12:22:25 nixbld kernel: Oops: 0002 [#1] SMP PTI
Dec 25 12:22:25 nixbld kernel: CPU: 2 PID: 15625 Comm: kworker/2:1 Not tainted 4.19.90 #1-NixOS
Dec 25 12:22:25 nixbld kernel: Hardware name: EVGA INTERNATIONAL CO.,LTD Default string/121-KS-E375, BIOS 1.07 03/15/2018
Dec 25 12:22:25 nixbld kernel: Workqueue: events iwl_mvm_add_new_dqa_stream_wk [iwlmvm]
Dec 25 12:22:25 nixbld kernel: RIP: 0010:iwl_trans_pcie_txq_enable+0x5b/0x460 [iwlwifi]
Dec 25 12:22:25 nixbld kernel: Code: 63 c6 4c 8b ac c7 40 91 00 00 f0 48 0f ab 87 40 a1 00 00 73 0d 80 3d 6b 65 03 00 00 0f 84 cb 03 00 00 44 89 c7 e8 15 c7 14 ce <49> 89 45 68 4d 85 e4 0f 84 eb 02 00>
Dec 25 12:22:25 nixbld kernel: RSP: 0018:ffffa47386937c30 EFLAGS: 00010202
Dec 25 12:22:25 nixbld kernel: RAX: 0000000000002710 RBX: 000000000000001f RCX: 0000000000000000
Dec 25 12:22:25 nixbld kernel: RDX: 3ffffffffffffffe RSI: 000000000000001f RDI: 0000000000002710
Dec 25 12:22:25 nixbld kernel: RBP: 0000000000000000 R08: 0000000000002710 R09: 0000000000000001
Dec 25 12:22:25 nixbld kernel: R10: 0000000000000004 R11: ffff916f0a199ff0 R12: 0000000000000000
Dec 25 12:22:25 nixbld kernel: R13: 0000000000000000 R14: 0000000000000000 R15: ffff916f08480018
Dec 25 12:22:25 nixbld kernel: FS:  0000000000000000(0000) GS:ffff916f36280000(0000) knlGS:0000000000000000
Dec 25 12:22:25 nixbld kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Dec 25 12:22:25 nixbld kernel: CR2: 0000000000000068 CR3: 0000000834e0a004 CR4: 00000000003606e0
Dec 25 12:22:25 nixbld kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Dec 25 12:22:25 nixbld kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Dec 25 12:22:25 nixbld kernel: Call Trace:
Dec 25 12:22:25 nixbld kernel:  iwl_mvm_enable_txq+0x230/0x3b0 [iwlmvm]
Dec 25 12:22:25 nixbld kernel:  ? iwl_mvm_add_new_dqa_stream_wk+0x897/0x13b0 [iwlmvm]
Dec 25 12:22:25 nixbld kernel:  iwl_mvm_add_new_dqa_stream_wk+0x897/0x13b0 [iwlmvm]
Dec 25 12:22:25 nixbld kernel:  ? entry_SYSCALL_64_stage2+0xf/0x10
Dec 25 12:22:25 nixbld kernel:  ? __switch_to_asm+0x41/0x70
Dec 25 12:22:25 nixbld kernel:  ? __switch_to_asm+0x41/0x70
Dec 25 12:22:25 nixbld kernel:  ? __switch_to_asm+0x41/0x70
Dec 25 12:22:25 nixbld kernel:  ? __switch_to+0x8c/0x440
Dec 25 12:22:25 nixbld kernel:  ? __switch_to_asm+0x41/0x70
Dec 25 12:22:25 nixbld kernel:  ? __switch_to_asm+0x35/0x70
Dec 25 12:22:25 nixbld kernel:  process_one_work+0x206/0x400
Dec 25 12:22:25 nixbld kernel:  worker_thread+0x2d/0x3e0
Dec 25 12:22:25 nixbld kernel:  ? process_one_work+0x400/0x400
Dec 25 12:22:25 nixbld kernel:  kthread+0x112/0x130
Dec 25 12:22:25 nixbld kernel:  ? kthread_bind+0x30/0x30
Dec 25 12:22:25 nixbld kernel:  ret_from_fork+0x35/0x40
This commit is contained in:
Sebastien Bourdeauducq 2019-12-25 14:38:08 +08:00
parent bde01362f7
commit e34a070124
1 changed files with 12 additions and 0 deletions

View File

@ -27,6 +27,18 @@ in
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
# work around iwl driver bug in newer kernels
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_4_19.override {
argsOverride = rec {
src = pkgs.fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "0d2bcg0krahia2ylgqaxdppyr9idq2pi6y1si6h8n9sg6rj3a57i";
};
version = "4.19.79";
modDirVersion = version;
};
});
security.apparmor.enable = true; security.apparmor.enable = true;
security.pam.yubico = { security.pam.yubico = {