mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
Merge pull request #80008 from Mic92/fpu-backport
[backport-19.09] zfs: 0.8.2 -> 0.8.3
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
From b323e7a7ebb2327943851fa3fd139399eb24d3dd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
|
||||
Date: Mon, 13 Aug 2018 22:58:21 +0200
|
||||
Subject: [PATCH] build fixes needed for nixos
|
||||
|
||||
---
|
||||
module/Makefile.in | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/module/Makefile.in b/module/Makefile.in
|
||||
index 935bd2663..afb08df81 100644
|
||||
--- a/module/Makefile.in
|
||||
+++ b/module/Makefile.in
|
||||
@@ -44,15 +44,15 @@ clean:
|
||||
modules_install:
|
||||
@# Install the kernel modules
|
||||
$(MAKE) -C @LINUX_OBJ@ M=`pwd` $@ \
|
||||
- INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
|
||||
+ INSTALL_MOD_PATH=@prefix@/$(INSTALL_MOD_PATH) \
|
||||
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
|
||||
KERNELRELEASE=@LINUX_VERSION@
|
||||
@# Remove extraneous build products when packaging
|
||||
- kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
|
||||
- if [ -n "$(DESTDIR)" ]; then \
|
||||
+ kmoddir=@prefix@$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
|
||||
+ if [ -n "@prefix@" ]; then \
|
||||
find $$kmoddir -name 'modules.*' | xargs $(RM); \
|
||||
fi
|
||||
- sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
|
||||
+ sysmap=@prefix@$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
|
||||
if [ -f $$sysmap ]; then \
|
||||
depmod -ae -F $$sysmap @LINUX_VERSION@; \
|
||||
fi
|
||||
--
|
||||
2.19.2
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
, libtirpc
|
||||
, nfs-utils
|
||||
, gawk, gnugrep, gnused, systemd
|
||||
, smartmontools, sysstat, sudo
|
||||
|
||||
# Kernel dependencies
|
||||
, kernel ? null
|
||||
@@ -19,7 +20,7 @@ let
|
||||
|
||||
common = { version
|
||||
, sha256
|
||||
, extraPatches
|
||||
, extraPatches ? []
|
||||
, rev ? "zfs-${version}"
|
||||
, isUnstable ? false
|
||||
, incompatibleKernelVersion ? null }:
|
||||
@@ -55,6 +56,22 @@ let
|
||||
substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d"
|
||||
substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc"
|
||||
substituteInPlace ./cmd/zed/Makefile.am --replace "\$(sysconfdir)" "$out/etc"
|
||||
|
||||
substituteInPlace ./contrib/initramfs/hooks/Makefile.am \
|
||||
--replace "/usr/share/initramfs-tools/hooks" "$out/usr/share/initramfs-tools/hooks"
|
||||
substituteInPlace ./contrib/initramfs/Makefile.am \
|
||||
--replace "/usr/share/initramfs-tools" "$out/usr/share/initramfs-tools"
|
||||
substituteInPlace ./contrib/initramfs/scripts/Makefile.am \
|
||||
--replace "/usr/share/initramfs-tools/scripts" "$out/usr/share/initramfs-tools/scripts"
|
||||
substituteInPlace ./contrib/initramfs/scripts/local-top/Makefile.am \
|
||||
--replace "/usr/share/initramfs-tools/scripts/local-top" "$out/usr/share/initramfs-tools/scripts/local-top"
|
||||
substituteInPlace ./contrib/initramfs/scripts/Makefile.am \
|
||||
--replace "/usr/share/initramfs-tools/scripts" "$out/usr/share/initramfs-tools/scripts"
|
||||
substituteInPlace ./contrib/initramfs/scripts/local-top/Makefile.am \
|
||||
--replace "/usr/share/initramfs-tools/scripts/local-top" "$out/usr/share/initramfs-tools/scripts/local-top"
|
||||
substituteInPlace ./etc/systemd/system/Makefile.am \
|
||||
--replace '$(DESTDIR)$(systemdunitdir)' "$out"'$(DESTDIR)$(systemdunitdir)'
|
||||
|
||||
substituteInPlace ./etc/systemd/system/zfs-share.service.in \
|
||||
--replace "/bin/rm " "${coreutils}/bin/rm "
|
||||
|
||||
@@ -103,6 +120,7 @@ let
|
||||
installFlags = [
|
||||
"sysconfdir=\${out}/etc"
|
||||
"DEFAULT_INITCONF_DIR=\${out}/default"
|
||||
"INSTALL_MOD_PATH=\${out}"
|
||||
];
|
||||
|
||||
postInstall = optionalString buildKernel ''
|
||||
@@ -130,6 +148,13 @@ let
|
||||
(cd $out/share/bash-completion/completions; ln -s zfs zpool)
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
path="PATH=${makeBinPath [ coreutils gawk gnused gnugrep utillinux smartmontools sysstat sudo ]}"
|
||||
for i in $out/libexec/zfs/zpool.d/*; do
|
||||
sed -i "2i$path" $i
|
||||
done
|
||||
'';
|
||||
|
||||
outputs = [ "out" ] ++ optionals buildUser [ "lib" "dev" ];
|
||||
|
||||
meta = {
|
||||
@@ -154,13 +179,9 @@ in {
|
||||
# incompatibleKernelVersion = "4.20";
|
||||
|
||||
# this package should point to the latest release.
|
||||
version = "0.8.2";
|
||||
version = "0.8.3";
|
||||
|
||||
sha256 = "0miax0h2wg4b2kn8n93804faajy2n1sh25knyy2hg3k77nlr4pni";
|
||||
|
||||
extraPatches = [
|
||||
./build-fixes-0.8.patch
|
||||
];
|
||||
sha256 = "0viql8rnqr32diapkpdsrwm6xj8vw5vi4dk2x2m7s7g0q2zdkahw";
|
||||
};
|
||||
|
||||
zfsUnstable = common {
|
||||
@@ -168,13 +189,9 @@ in {
|
||||
# incompatibleKernelVersion = "4.19";
|
||||
|
||||
# this package should point to a version / git revision compatible with the latest kernel release
|
||||
version = "0.8.2";
|
||||
version = "0.8.3";
|
||||
|
||||
sha256 = "0miax0h2wg4b2kn8n93804faajy2n1sh25knyy2hg3k77nlr4pni";
|
||||
sha256 = "0viql8rnqr32diapkpdsrwm6xj8vw5vi4dk2x2m7s7g0q2zdkahw";
|
||||
isUnstable = true;
|
||||
|
||||
extraPatches = [
|
||||
./build-fixes-0.8.patch
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15762,7 +15762,7 @@ in
|
||||
# when adding a new linux version
|
||||
kernelPatches.cpu-cgroup-v2."4.11"
|
||||
kernelPatches.modinst_arg_list_too_long
|
||||
kernelPatches.export_kernel_fpu_functions
|
||||
kernelPatches.export_kernel_fpu_functions."4.14"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -15770,13 +15770,16 @@ in
|
||||
kernelPatches =
|
||||
[ kernelPatches.bridge_stp_helper
|
||||
kernelPatches.modinst_arg_list_too_long
|
||||
kernelPatches.export_kernel_fpu_functions
|
||||
kernelPatches.export_kernel_fpu_functions."4.14"
|
||||
];
|
||||
};
|
||||
|
||||
# Update this when adding the newest kernel major version!
|
||||
linux_latest = callPackage ../os-specific/linux/kernel/linux-5.4.nix {
|
||||
kernelPatches = [ kernelPatches.bridge_stp_helper ];
|
||||
kernelPatches = [
|
||||
kernelPatches.bridge_stp_helper
|
||||
kernelPatches.export_kernel_fpu_functions."5.3"
|
||||
];
|
||||
};
|
||||
|
||||
linux_testing = callPackage ../os-specific/linux/kernel/linux-testing.nix {
|
||||
|
||||
Reference in New Issue
Block a user