Skip to content

Commit 1f805c0

Browse files
authored
Linux Hardened Kernel Updates 2024-12-14 (NixOS#365214)
2 parents 169063d + c9d3bcd commit 1f805c0

File tree

6 files changed

+34
-13
lines changed

6 files changed

+34
-13
lines changed

nixos/tests/kernel-generic.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ let
4141
linux_6_1_hardened
4242
linux_6_6_hardened
4343
linux_6_11_hardened
44+
linux_6_12_hardened
4445
linux_rt_5_4
4546
linux_rt_5_10
4647
linux_rt_5_15

pkgs/os-specific/linux/kernel/common-config.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,15 +531,16 @@ let
531531
};
532532

533533
# Enable Rust and features that depend on it
534+
# Use a lower priority to allow these options to be overridden in hardened/config.nix
534535
rust = lib.optionalAttrs withRust {
535-
RUST = yes;
536+
RUST = lib.mkDefault yes;
536537

537538
# These don't technically require Rust but we probably want to get some more testing
538539
# on the whole DRM panic setup before shipping it by default.
539540
DRM_PANIC = whenAtLeast "6.12" yes;
540541
DRM_PANIC_SCREEN = whenAtLeast "6.12" (freeform "kmsg");
541542

542-
DRM_PANIC_SCREEN_QR_CODE = whenAtLeast "6.12" yes;
543+
DRM_PANIC_SCREEN_QR_CODE = lib.mkDefault (whenAtLeast "6.12" yes);
543544
};
544545

545546
sound =
@@ -1255,7 +1256,7 @@ let
12551256
LIRC = yes;
12561257

12571258
SCHED_CORE = whenAtLeast "5.14" yes;
1258-
SCHED_CLASS_EXT = whenAtLeast "6.12" yes;
1259+
SCHED_CLASS_EXT = lib.mkDefault (whenAtLeast "6.12" yes);
12591260

12601261
LRU_GEN = whenAtLeast "6.1" yes;
12611262
LRU_GEN_ENABLED = whenAtLeast "6.1" yes;

pkgs/os-specific/linux/kernel/hardened/config.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ assert (lib.versionAtLeast version "4.9");
3838
DEBUG_PLIST = whenAtLeast "5.2" yes;
3939
DEBUG_SG = yes;
4040
DEBUG_VIRTUAL = yes;
41+
# Set in common config as whenAtLeast "6.12" yes; Currently errors during config
42+
SCHED_CLASS_EXT = whenAtLeast "6.12" (option yes);
4143
SCHED_STACK_END_CHECK = yes;
4244

4345
REFCOUNT_FULL = whenOlder "5.4.208" yes;
@@ -116,4 +118,7 @@ assert (lib.versionAtLeast version "4.9");
116118

117119
# not needed for less than a decade old glibc versions
118120
LEGACY_VSYSCALL_NONE = yes;
121+
122+
RUST = option yes; # Yes currently erros on 6.12
123+
DRM_PANIC_SCREEN_QR_CODE = whenAtLeast "6.12" (option yes);
119124
}

pkgs/os-specific/linux/kernel/hardened/patches.json

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,31 @@
4242
"6.11": {
4343
"patch": {
4444
"extra": "-hardened1",
45-
"name": "linux-hardened-v6.11.10-hardened1.patch",
46-
"sha256": "10m3xkanix9yhj95p1qr5dk3gydq1hbnbnibrlp4ag9yqd5ki7d4",
47-
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.11.10-hardened1/linux-hardened-v6.11.10-hardened1.patch"
45+
"name": "linux-hardened-v6.11.11-hardened1.patch",
46+
"sha256": "09y9bglln7br53pwzb3yqafkaklfwn1hx5qpwp6x1s817bj7bhxx",
47+
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.11.11-hardened1/linux-hardened-v6.11.11-hardened1.patch"
4848
},
49-
"sha256": "0xzynjyyr16my0wrla4ggpjbh4g7nsqixaimz5hrsqlhaa8q9hab",
50-
"version": "6.11.10"
49+
"sha256": "1z2913y38clnlmhvwj49h7p4pic24s4d8np7nmd4lk7m2xz8w532",
50+
"version": "6.11.11"
51+
},
52+
"6.12": {
53+
"patch": {
54+
"extra": "-hardened1",
55+
"name": "linux-hardened-v6.12.4-hardened1.patch",
56+
"sha256": "0807n36inzq82m8m279q6sfnh7cn2nwkqnf6hi5kw9k9z0x20a8l",
57+
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.12.4-hardened1/linux-hardened-v6.12.4-hardened1.patch"
58+
},
59+
"sha256": "0lhisw9sy0b38j1nifcgjm8w9864qx3hg6b7f6z2311x8chzhdbg",
60+
"version": "6.12.4"
5161
},
5262
"6.6": {
5363
"patch": {
5464
"extra": "-hardened1",
55-
"name": "linux-hardened-v6.6.63-hardened1.patch",
56-
"sha256": "1nsg9f6fgh1yfa95gwrdh8g8kwywbczl2rv8j06qsk0y6b79kmw1",
57-
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.6.63-hardened1/linux-hardened-v6.6.63-hardened1.patch"
65+
"name": "linux-hardened-v6.6.64-hardened1.patch",
66+
"sha256": "12zm0irxdl9iqihpnk9vwxqrraak3mf894s5pa7y62qan3xghc57",
67+
"url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.6.64-hardened1/linux-hardened-v6.6.64-hardened1.patch"
5868
},
59-
"sha256": "0d8q0vwv3lcix3wiq2n53rir3h298flg2l0ghpify4rlh2s4l1fi",
60-
"version": "6.6.63"
69+
"sha256": "1cbag4wzv5fpjdcl0rpp158ch1q17rfz2qxm1xjjyhnblqzxjpq6",
70+
"version": "6.6.64"
6171
}
6272
}

pkgs/top-level/all-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12422,6 +12422,8 @@ with pkgs;
1242212422
linux_6_6_hardened = linuxKernel.kernels.linux_6_6_hardened;
1242312423
linuxPackages_6_11_hardened = linuxKernel.packages.linux_6_11_hardened;
1242412424
linux_6_11_hardened = linuxKernel.kernels.linux_6_11_hardened;
12425+
linuxPackages_6_12_hardened = linuxKernel.packages.linux_6_12_hardened;
12426+
linux_6_12_hardened = linuxKernel.kernels.linux_6_12_hardened;
1242512427

1242612428
# GNU Linux-libre kernels
1242712429
linuxPackages-libre = linuxKernel.packages.linux_libre;

pkgs/top-level/linux-kernels.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ in {
276276
linux_6_1_hardened = hardenedKernelFor kernels.linux_6_1 { };
277277
linux_6_6_hardened = hardenedKernelFor kernels.linux_6_6 { };
278278
linux_6_11_hardened = hardenedKernelFor kernels.linux_6_11 { };
279+
linux_6_12_hardened = hardenedKernelFor kernels.linux_6_12 { };
279280

280281
} // lib.optionalAttrs config.allowAliases {
281282
linux_4_14 = throw "linux 4.14 was removed because it will reach its end of life within 23.11";
@@ -675,6 +676,7 @@ in {
675676
linux_6_1_hardened = recurseIntoAttrs (packagesFor kernels.linux_6_1_hardened);
676677
linux_6_6_hardened = recurseIntoAttrs (packagesFor kernels.linux_6_6_hardened);
677678
linux_6_11_hardened = recurseIntoAttrs (packagesFor kernels.linux_6_11_hardened);
679+
linux_6_12_hardened = recurseIntoAttrs (packagesFor kernels.linux_6_12_hardened);
678680

679681
linux_zen = recurseIntoAttrs (packagesFor kernels.linux_zen);
680682
linux_lqx = recurseIntoAttrs (packagesFor kernels.linux_lqx);

0 commit comments

Comments
 (0)