From 5fc58c6b7a27f7705453643254ec1a090bfe649b Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 15 Sep 2024 21:02:47 +0300 Subject: [PATCH 1/2] linux_6_11: init at 6.11 --- pkgs/os-specific/linux/kernel/common-config.nix | 7 +++++++ pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++++ pkgs/top-level/aliases.nix | 2 ++ pkgs/top-level/linux-kernels.nix | 11 ++++++++++- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index c0bc223b9a05..2a7672465d81 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -460,6 +460,9 @@ let # Enable AMD secure display when available DRM_AMD_SECURE_DISPLAY = whenAtLeast "5.13" yes; + # Enable AMD image signal processor + DRM_AMD_ISP = whenAtLeast "6.11" yes; + # Enable new firmware (and by extension NVK) for compatible hardware on Nouveau DRM_NOUVEAU_GSP_DEFAULT = whenAtLeast "6.8" yes; @@ -736,6 +739,10 @@ let # Enable stack smashing protections in schedule() # See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v4.8&id=0d9e26329b0c9263d4d9e0422d80a0e73268c52f SCHED_STACK_END_CHECK = yes; + + # Enable separate slab buckets for user controlled allocations + # See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=67f2df3b82d091ed095d0e47e1f3a9d3e18e4e41 + SLAB_BUCKETS = whenAtLeast "6.11" yes; } // lib.optionalAttrs stdenv.hostPlatform.isx86_64 { # Enable Intel SGX X86_SGX = whenAtLeast "5.11" yes; diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 5007b5bf8ccc..ce729e618e43 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -38,5 +38,9 @@ "6.10": { "version": "6.10.10", "hash": "sha256:1kcvh1g3p1sj4q34ylcmm43824f97z4k695lcxnzp7pbnlsyg1z6" + }, + "6.11": { + "version": "6.11", + "hash": "sha256:0bnbvadm4wvnwzcq319gsgl03ijvvljn7mj8qw87ihpb4p0cdljm" } } diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 8d13703498d2..896c8a419ded 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -861,6 +861,7 @@ mapAliases ({ linuxPackages_6_8 = linuxKernel.packages.linux_6_8; linuxPackages_6_9 = linuxKernel.packages.linux_6_9; linuxPackages_6_10 = linuxKernel.packages.linux_6_10; + linuxPackages_6_11 = linuxKernel.packages.linux_6_11; linuxPackages_rpi0 = linuxKernel.packages.linux_rpi1; linuxPackages_rpi02w = linuxKernel.packages.linux_rpi3; linuxPackages_rpi1 = linuxKernel.packages.linux_rpi1; @@ -890,6 +891,7 @@ mapAliases ({ linux_6_8 = linuxKernel.kernels.linux_6_8; linux_6_9 = linuxKernel.kernels.linux_6_9; linux_6_10 = linuxKernel.kernels.linux_6_10; + linux_6_11 = linuxKernel.kernels.linux_6_11; linux_rpi0 = linuxKernel.kernels.linux_rpi1; linux_rpi02w = linuxKernel.kernels.linux_rpi3; linux_rpi1 = linuxKernel.kernels.linux_rpi1; diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 3e910943790e..cbcee495efd8 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -194,6 +194,14 @@ in { ]; }; + linux_6_11 = callPackage ../os-specific/linux/kernel/mainline.nix { + branch = "6.11"; + kernelPatches = [ + kernelPatches.bridge_stp_helper + kernelPatches.request_key_helper + ]; + }; + linux_testing = let testing = callPackage ../os-specific/linux/kernel/mainline.nix { # A special branch that tracks the kernel under the release process @@ -629,6 +637,7 @@ in { linux_6_1 = recurseIntoAttrs (packagesFor kernels.linux_6_1); linux_6_6 = recurseIntoAttrs (packagesFor kernels.linux_6_6); linux_6_10 = recurseIntoAttrs (packagesFor kernels.linux_6_10); + linux_6_11 = recurseIntoAttrs (packagesFor kernels.linux_6_11); } // lib.optionalAttrs config.allowAliases { linux_4_9 = throw "linux 4.9 was removed because it will reach its end of life within 22.11"; # Added 2022-11-08 linux_4_14 = throw "linux 4.14 was removed because it will reach its end of life within 23.11"; # Added 2023-10-11 @@ -697,7 +706,7 @@ in { packageAliases = { linux_default = packages.linux_6_6; # Update this when adding the newest kernel major version! - linux_latest = packages.linux_6_10; + linux_latest = packages.linux_6_11; linux_mptcp = throw "'linux_mptcp' has been moved to https://github.com/teto/mptcp-flake"; linux_rt_default = packages.linux_rt_5_15; linux_rt_latest = packages.linux_rt_6_6; From 4e54a5a38a40315bb4b71bff068d10bc5d9fc4c4 Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 15 Sep 2024 21:14:52 +0300 Subject: [PATCH 2/2] linuxPackages_6_11.perf: fix build --- pkgs/os-specific/linux/kernel/perf/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/perf/default.nix b/pkgs/os-specific/linux/kernel/perf/default.nix index 17f1fc2da464..15f92157e147 100644 --- a/pkgs/os-specific/linux/kernel/perf/default.nix +++ b/pkgs/os-specific/linux/kernel/perf/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation { # Fix 6.10.0 holding pkg-config completely wrong. # Patches from perf-tools-next, should be in 6.11 or hopefully backported. - patches = lib.optionals (lib.versionAtLeast kernel.version "6.10") [ + patches = lib.optionals (lib.versions.majorMinor kernel.version == "6.10") [ (fetchpatch { url = "https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/patch/?id=0f0e1f44569061e3dc590cd0b8cb74d8fd53706b"; hash = "sha256-9u/zhbsDgwOr4T4k9td/WJYRuSHIfbtfS+oNx8nbOlM=";