diff --git a/pkgs/os-specific/linux/kernel/crc-regression.patch b/pkgs/os-specific/linux/kernel/crc-regression.patch new file mode 100644 index 000000000000..623713d16a65 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/crc-regression.patch @@ -0,0 +1,24 @@ +See https://github.com/NixOS/nixpkgs/issues/6231 + +v3.14.31:crypto/crc32c.c is missing the MODULE_ALIAS_CRYPTO("crc32c"). +That's probably because crypto/crc32c.c was renamed to +crypto/crc32c_generic.c in commit +06e5a1f29819759392239669beb2cad27059c8ec and therefore fell through +the cracks when backporting commit +5d26a105b5a73e5635eae0629b42fa0a90e07b7b. + +So the affected kernels (all that backported the "crypto-" prefix +patches) need this additional patch: + +diff --git a/crypto/crc32c.c b/crypto/crc32c.c +index 06f7018c9d95..aae5829eb681 100644 +--- a/crypto/crc32c.c ++++ b/crypto/crc32c.c +@@ -167,6 +167,7 @@ static void __exit crc32c_mod_fini(void) + module_init(crc32c_mod_init); + module_exit(crc32c_mod_fini); + ++MODULE_ALIAS_CRYPTO("crc32c"); + MODULE_AUTHOR("Clay Haapala "); + MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations wrapper for lib/crc32c"); + MODULE_LICENSE("GPL"); diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index 6c8047ab1d4c..14c25374b3f0 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -82,4 +82,9 @@ rec { { name = "grsec-fix-path"; patch = ./grsec-path.patch; }; + + crc_regression = + { name = "crc-backport-regression"; + patch = ./crc-regression.patch; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7ed94373a12b..80ad6e13576c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8623,7 +8623,7 @@ let linux_3_10 = makeOverridable (import ../os-specific/linux/kernel/linux-3.10.nix) { inherit fetchurl stdenv perl buildLinux; - kernelPatches = [ kernelPatches.bridge_stp_helper ] + kernelPatches = [ kernelPatches.bridge_stp_helper kernelPatches.crc_regression ] ++ lib.optionals ((platform.kernelArch or null) == "mips") [ kernelPatches.mips_fpureg_emu kernelPatches.mips_fpu_sigill @@ -8633,7 +8633,7 @@ let linux_3_12 = makeOverridable (import ../os-specific/linux/kernel/linux-3.12.nix) { inherit fetchurl stdenv perl buildLinux; - kernelPatches = [ kernelPatches.bridge_stp_helper ] + kernelPatches = [ kernelPatches.bridge_stp_helper kernelPatches.crc_regression ] ++ lib.optionals ((platform.kernelArch or null) == "mips") [ kernelPatches.mips_fpureg_emu kernelPatches.mips_fpu_sigill @@ -8643,7 +8643,7 @@ let linux_3_14 = makeOverridable (import ../os-specific/linux/kernel/linux-3.14.nix) { inherit fetchurl stdenv perl buildLinux; - kernelPatches = [ kernelPatches.bridge_stp_helper ] + kernelPatches = [ kernelPatches.bridge_stp_helper kernelPatches.crc_regression ] ++ lib.optionals ((platform.kernelArch or null) == "mips") [ kernelPatches.mips_fpureg_emu kernelPatches.mips_fpu_sigill