about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2019-10-02 19:33:51 +0100
committerJörg Thalheim <joerg@thalheim.io>2019-10-03 11:13:28 +0100
commit96097ab665fb1b908e416ba7e39ecbf0bb6b14d0 (patch)
treec43bbdc3307826b5f0cde19fde8f73532ed4f056 /pkgs/os-specific
parent1ba3f3f00fc24ffaa2b9f075d66f738831f7a392 (diff)
downloadnixlib-96097ab665fb1b908e416ba7e39ecbf0bb6b14d0.tar
nixlib-96097ab665fb1b908e416ba7e39ecbf0bb6b14d0.tar.gz
nixlib-96097ab665fb1b908e416ba7e39ecbf0bb6b14d0.tar.bz2
nixlib-96097ab665fb1b908e416ba7e39ecbf0bb6b14d0.tar.lz
nixlib-96097ab665fb1b908e416ba7e39ecbf0bb6b14d0.tar.xz
nixlib-96097ab665fb1b908e416ba7e39ecbf0bb6b14d0.tar.zst
nixlib-96097ab665fb1b908e416ba7e39ecbf0bb6b14d0.zip
linux: update fpu patches for 5.3
At the moment we experience bad instabilities with linux 5.3:

https://github.com/zfsonlinux/zfs/issues/9346

as the zfs-native method of disabling the FPU is buggy.
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_4_14.patch (renamed from pkgs/os-specific/linux/kernel/export_kernel_fpu_functions.patch)0
-rw-r--r--pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch42
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix10
3 files changed, 50 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions.patch b/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_4_14.patch
index 205497aee2da..205497aee2da 100644
--- a/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions.patch
+++ b/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_4_14.patch
diff --git a/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch b/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch
new file mode 100644
index 000000000000..dc9ca64bdc1f
--- /dev/null
+++ b/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions_5_3.patch
@@ -0,0 +1,42 @@
+From 1e010beda2896bdf3082fb37a3e49f8ce20e04d8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
+Date: Thu, 2 May 2019 05:28:08 +0100
+Subject: [PATCH] x86/fpu: Export kernel_fpu_{begin,end}() with
+ EXPORT_SYMBOL_GPL
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We need these symbols in zfs as the fpu implementation breaks userspace:
+
+https://github.com/zfsonlinux/zfs/issues/9346
+Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
+---
+ arch/x86/kernel/fpu/core.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
+index 12c70840980e..352538b3bb5d 100644
+--- a/arch/x86/kernel/fpu/core.c
++++ b/arch/x86/kernel/fpu/core.c
+@@ -102,7 +102,7 @@ void kernel_fpu_begin(void)
+ 	}
+ 	__cpu_invalidate_fpregs_state();
+ }
+-EXPORT_SYMBOL_GPL(kernel_fpu_begin);
++EXPORT_SYMBOL(kernel_fpu_begin);
+ 
+ void kernel_fpu_end(void)
+ {
+@@ -111,7 +111,7 @@ void kernel_fpu_end(void)
+ 	this_cpu_write(in_kernel_fpu, false);
+ 	preempt_enable();
+ }
+-EXPORT_SYMBOL_GPL(kernel_fpu_end);
++EXPORT_SYMBOL(kernel_fpu_end);
+ 
+ /*
+  * Save the FPU state (mark it for reload if necessary):
+-- 
+2.23.0
+
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index b80320db282e..fa5b168389bc 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -59,8 +59,14 @@
   };
 
   export_kernel_fpu_functions = {
-    name = "export_kernel_fpu_functions";
-    patch = ./export_kernel_fpu_functions.patch;
+    "4.14" = {
+      name = "export_kernel_fpu_functions";
+      patch = ./export_kernel_fpu_functions_4_14.patch;
+    };
+    "5.3" = {
+      name = "export_kernel_fpu_functions";
+      patch = ./export_kernel_fpu_functions_5_3.patch;
+    };
   };
 
   # patches from https://lkml.org/lkml/2019/7/15/1748