git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit43a737b81cd3f41f1df0f4f0bef25e048ac9155a authorClemens Fruhwirth <clemens@endorphin.org> dateSat 23 Jun 2018, 14:39 (8 years ago) parent01847b7
2 files changed+5−5
pkgs/os-specific/linux/spl/default.nix+1−1 pkgs/os-specific/linux/zfs/default.nix+4−4
pkgs/os-specific/linux/spl/default.nix+1−1
@@ -25,7 +25,7 @@ let
2525
2626 nativeBuildInputs = [ autoreconfHook ] ++ kernel.moduleBuildDependencies;
2727
28− hardeningDisable = [ "pic" ];
28+ hardeningDisable = [ "fortify" "stackprotector" "pic" ];
2929
3030 preConfigure = ''
3131 substituteInPlace ./module/spl/spl-generic.c --replace /usr/bin/hostid hostid
pkgs/os-specific/linux/zfs/default.nix+4−4
@@ -61,7 +61,7 @@ let
6161 # for zdb to get the rpath to libgcc_s, needed for pthread_cancel to work
6262 NIX_CFLAGS_LINK = "-lgcc_s";
6363
64− hardeningDisable = [ "pic" ];
64+ hardeningDisable = [ "fortify" "stackprotector" "pic" ];
6565
6666 preConfigure = ''
6767 substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs"
@@ -157,7 +157,7 @@ in {
157157 # to be adapted
158158 zfsStable = common {
159159 # comment/uncomment if breaking kernel versions are known
160− incompatibleKernelVersion = "4.16";
160+ incompatibleKernelVersion = null;
161161
162162 # this package should point to the latest release.
163163 version = "0.7.9";
@@ -176,7 +176,7 @@ in {
176176
177177 zfsUnstable = common rec {
178178 # comment/uncomment if breaking kernel versions are known
179− incompatibleKernelVersion = "4.16";
179+ incompatibleKernelVersion = null;
180180
181181 # this package should point to a version / git revision compatible with the latest kernel release
182182 version = "2018-05-22";
@@ -199,7 +199,7 @@ in {
199199 # also remove boot.zfs.enableLegacyCrypto
200200 zfsLegacyCrypto = common {
201201 # comment/uncomment if breaking kernel versions are known
202− incompatibleKernelVersion = "4.16";
202+ incompatibleKernelVersion = null;
203203
204204 # this package should point to a version / git revision compatible with the latest kernel release
205205 version = "2018-02-01";