From 43a737b81cd3f41f1df0f4f0bef25e048ac9155a Mon Sep 17 00:00:00 2001 From: Clemens Fruhwirth Date: Sat, 23 Jun 2018 14:39:13 +0200 Subject: Disable fortify and stackprotector hardening for spl/zfs. Linux 4.16 introduces a stackprotector detection script that returns different results for the kernel compilation run and the spl/zfs compilation run, as the setting for hardening are different. This results in a broken ABI between spl/zfs and the compiled kernel, breaking ZFS. Also disabling the fortify and stackprotector hardening, as we do for the kernel, fixes that. --- pkgs/os-specific/linux/spl/default.nix | 2 +- pkgs/os-specific/linux/zfs/default.nix | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'pkgs') diff --git a/pkgs/os-specific/linux/spl/default.nix b/pkgs/os-specific/linux/spl/default.nix index 778f00d2a95..af3df245fe6 100644 --- a/pkgs/os-specific/linux/spl/default.nix +++ b/pkgs/os-specific/linux/spl/default.nix @@ -25,7 +25,7 @@ let nativeBuildInputs = [ autoreconfHook ] ++ kernel.moduleBuildDependencies; - hardeningDisable = [ "pic" ]; + hardeningDisable = [ "fortify" "stackprotector" "pic" ]; preConfigure = '' substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index c44d64b8fa8..6eac54ddf65 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -61,7 +61,7 @@ let # for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work NIX_CFLAGS_LINK = "-lgcc_s"; - hardeningDisable = [ "pic" ]; + hardeningDisable = [ "fortify" "stackprotector" "pic" ]; preConfigure = '' substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs" @@ -157,7 +157,7 @@ in { # to be adapted zfsStable = common { # comment/uncomment if breaking kernel versions are known - incompatibleKernelVersion = "4.16"; + incompatibleKernelVersion = null; # this package should point to the latest release. version = "0.7.9"; @@ -176,7 +176,7 @@ in { zfsUnstable = common rec { # comment/uncomment if breaking kernel versions are known - incompatibleKernelVersion = "4.16"; + incompatibleKernelVersion = null; # this package should point to a version / git revision compatible with the latest kernel release version = "2018-05-22"; @@ -199,7 +199,7 @@ in { # also remove boot.zfs.enableLegacyCrypto zfsLegacyCrypto = common { # comment/uncomment if breaking kernel versions are known - incompatibleKernelVersion = "4.16"; + incompatibleKernelVersion = null; # this package should point to a version / git revision compatible with the latest kernel release version = "2018-02-01"; -- cgit 1.4.1