Bug#930238: unblock: zfs-linux/0.7.12-2+deb10u1 [t-p-u]

2019-06-16 Thread Philipp Kern

On 2019-06-15 11:04, Paul Gevers wrote:

On 14-06-2019 12:50, Aron Xu wrote:

I have tested the package in a virtual machine on amd64 for
linux/4.19.37-3 (buster) and a locally built updated linux kernel that
breaks zfs-linux/0.7.12-2. The dkms package builds fine with both of
the versions and zpool create/export/import works fine. Therefore,
please unblock the t-p-u update for buster, thanks.


I am probably asking a very stupid question, but ...

The changes in the patch are in the source code. Do these dkms package
work is such a way that the binaries are compiled every time that a
kernel gets updated? I.e. a change in the source that checks for the
kernel version actually results in a binary that works for that source?


The whole point of dkms is to make sure that kernel modules available as 
source are made available to all installed kernels. So as long as the 
ABI version of the kernel changes (in Ubuntu with every upload, for us 
much more rarely) the module is recompiled. The corollary here is that 
it is not recompiled if the ABI version did not change because the 
module is assumed to still be compatible.


(Our kernel maintainers also regularly ignore certain ABI changes they 
do not consider to actually be part of the ABI they support.)


Kind regards
Philipp Kern



Bug#930238: unblock: zfs-linux/0.7.12-2+deb10u1 [t-p-u]

2019-06-15 Thread Paul Gevers
Hi Mo, Aron,

On 14-06-2019 12:50, Aron Xu wrote:
> I have tested the package in a virtual machine on amd64 for
> linux/4.19.37-3 (buster) and a locally built updated linux kernel that
> breaks zfs-linux/0.7.12-2. The dkms package builds fine with both of
> the versions and zpool create/export/import works fine. Therefore,
> please unblock the t-p-u update for buster, thanks.

I am probably asking a very stupid question, but ...

The changes in the patch are in the source code. Do these dkms package
work is such a way that the binaries are compiled every time that a
kernel gets updated? I.e. a change in the source that checks for the
kernel version actually results in a binary that works for that source?

Paul



signature.asc
Description: OpenPGP digital signature


Bug#930238: unblock: zfs-linux/0.7.12-2+deb10u1 [t-p-u]

2019-06-14 Thread Aron Xu
Hi,

I have tested the package in a virtual machine on amd64 for
linux/4.19.37-3 (buster) and a locally built updated linux kernel that
breaks zfs-linux/0.7.12-2. The dkms package builds fine with both of
the versions and zpool create/export/import works fine. Therefore,
please unblock the t-p-u update for buster, thanks.

Regards,
Aron



Bug#930238: unblock: zfs-linux/0.7.12-2+deb10u1 [t-p-u]

2019-06-13 Thread Paul Gevers
Control: tags -1 moreinfo

Hi Mo,

On 09-06-2019 05:41, Mo Zhou wrote:
> Following
> https://www.debian.org/doc/manuals/developers-reference/ch05.en.html#t-p-u
> I've not uploaded it yet but asking for permission first.

Thanks.

> Fix a GRAVE stable RC due to linux's unexporting several
> fpu-related symbols:
> 
>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929929
> 
> This is the very only purpose of this upload.
> The solution in this upload is cherry-picked from upstream,
> which directly disable the SIMD thing for linux (>= 4.19.38).
> 
> I scanned the rest historical patches we have applied to
> zfs 0.7.12. Some of them fix crashes and segfaults but they
> don't look fatal enough and would inflate the debdiff hence
> incur rejection. Let's forget them.
> 
> I've tested this patch on Buster with a manually-built
> 4.19.48 kernel (make defconfig, make, make bindeb-pkg).
> 
> Full source:
> https://people.debian.org/~lumin/upload/zfs-linux_0.7.12-2+deb10u1_source.changes
> Debdiff: attached.
> 
> (include/attach the debdiff against the package in testing)
> 
> unblock zfs-linux/0.7.12-2+deb10u1

We are not promising to unblock the package, but we recognize it that
you can't help it that the kernel is breaking your package in the
future. So please upload to tpu, have the package built and please
solicit people to test the package. Please report back with the results.

Paul



signature.asc
Description: OpenPGP digital signature


Processed: Re: Bug#930238: unblock: zfs-linux/0.7.12-2+deb10u1 [t-p-u]

2019-06-13 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 moreinfo
Bug #930238 [release.debian.org] unblock: zfs-linux/0.7.12-2+deb10u1 [t-p-u]
Added tag(s) moreinfo.

-- 
930238: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930238
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#930238: unblock: zfs-linux/0.7.12-2+deb10u1 [t-p-u]

2019-06-08 Thread Mo Zhou
Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: unblock

Please unblock package zfs-linux

Following
https://www.debian.org/doc/manuals/developers-reference/ch05.en.html#t-p-u
I've not uploaded it yet but asking for permission first.

(explain the reason for the unblock here)

Fix a GRAVE stable RC due to linux's unexporting several
fpu-related symbols:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929929

This is the very only purpose of this upload.
The solution in this upload is cherry-picked from upstream,
which directly disable the SIMD thing for linux (>= 4.19.38).

I scanned the rest historical patches we have applied to
zfs 0.7.12. Some of them fix crashes and segfaults but they
don't look fatal enough and would inflate the debdiff hence
incur rejection. Let's forget them.

I've tested this patch on Buster with a manually-built
4.19.48 kernel (make defconfig, make, make bindeb-pkg).

Full source:
https://people.debian.org/~lumin/upload/zfs-linux_0.7.12-2+deb10u1_source.changes
Debdiff: attached.

(include/attach the debdiff against the package in testing)

unblock zfs-linux/0.7.12-2+deb10u1
diff --git a/debian/changelog b/debian/changelog
index 41d4a9fe..e6aad323 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+zfs-linux (0.7.12-2+deb10u1) testing-proposed-updates; urgency=high
+
+  * Patch: Disable SIMD on 4.19.37+ or 5.0+ kernels. (Closes: #929929)
+
+ -- Mo Zhou   Sun, 09 Jun 2019 03:17:40 +
+
 zfs-linux (0.7.12-2) unstable; urgency=medium
 
   [ Colin Ian King ]
diff --git a/debian/patches/e22bfd814960295029ca41c8e116e8d516d3e730.patch b/debian/patches/e22bfd814960295029ca41c8e116e8d516d3e730.patch
new file mode 100644
index ..ceb02ca2
--- /dev/null
+++ b/debian/patches/e22bfd814960295029ca41c8e116e8d516d3e730.patch
@@ -0,0 +1,404 @@
+From e22bfd814960295029ca41c8e116e8d516d3e730 Mon Sep 17 00:00:00 2001
+From: Tony Hutter 
+Date: Fri, 11 Jan 2019 18:01:28 -0800
+Subject: [PATCH] Linux 5.0 compat: Disable vector instructions on 5.0+ kernels
+
+The 5.0 kernel no longer exports the functions we need to do vector
+(SSE/SSE2/SSE3/AVX...) instructions.  Disable vector-based checksum
+algorithms when building against those kernels.
+
+Reviewed-by: Brian Behlendorf 
+Signed-off-by: Tony Hutter 
+Closes #8259
+---
+ config/kernel-fpu.m4 |  41 ++---
+ include/linux/simd_x86.h | 127 +++
+ 2 files changed, 134 insertions(+), 34 deletions(-)
+
+diff --git a/config/kernel-fpu.m4 b/config/kernel-fpu.m4
+index 1c5690969d4..671fe7ea54e 100644
+--- a/config/kernel-fpu.m4
 b/config/kernel-fpu.m4
+@@ -1,18 +1,41 @@
++dnl # 
++dnl # Handle differences in kernel FPU code.
+ dnl #
+-dnl # 4.2 API change
+-dnl # asm/i387.h is replaced by asm/fpu/api.h
++dnl # Kernel
++dnl # 5.0:	All kernel fpu functions are GPL only, so we can't use them.
++dnl #		(nothing defined)
++dnl #
++dnl # 4.2:	Use __kernel_fpu_{begin,end}()
++dnl #		HAVE_UNDERSCORE_KERNEL_FPU & KERNEL_EXPORTS_X86_FPU
++dnl #
++dnl # Pre-4.2:	Use kernel_fpu_{begin,end}()
++dnl #		HAVE_KERNEL_FPU & KERNEL_EXPORTS_X86_FPU
+ dnl #
+ AC_DEFUN([ZFS_AC_KERNEL_FPU], [
+-	AC_MSG_CHECKING([whether asm/fpu/api.h exists])
++	AC_MSG_CHECKING([which kernel_fpu function to use])
+ 	ZFS_LINUX_TRY_COMPILE([
+-		#include 
+-		#include 
++		#include 
++		#include 
+ 	],[
+-		__kernel_fpu_begin();
++		kernel_fpu_begin();
++		kernel_fpu_end();
+ 	],[
+-		AC_MSG_RESULT(yes)
+-		AC_DEFINE(HAVE_FPU_API_H, 1, [kernel has  interface])
++		AC_MSG_RESULT(kernel_fpu_*)
++		AC_DEFINE(HAVE_KERNEL_FPU, 1, [kernel has kernel_fpu_* functions])
++		AC_DEFINE(KERNEL_EXPORTS_X86_FPU, 1, [kernel exports FPU functions])
+ 	],[
+-		AC_MSG_RESULT(no)
++		ZFS_LINUX_TRY_COMPILE([
++			#include 
++			#include 
++		],[
++			__kernel_fpu_begin();
++			__kernel_fpu_end();
++		],[
++			AC_MSG_RESULT(__kernel_fpu_*)
++			AC_DEFINE(HAVE_UNDERSCORE_KERNEL_FPU, 1, [kernel has __kernel_fpu_* functions])
++			AC_DEFINE(KERNEL_EXPORTS_X86_FPU, 1, [kernel exports FPU functions])
++		],[
++			AC_MSG_RESULT(not exported)
++		])
+ 	])
+ ])
+diff --git a/include/linux/simd_x86.h b/include/linux/simd_x86.h
+index c9e3970c0cf..c55cb177893 100644
+--- a/include/linux/simd_x86.h
 b/include/linux/simd_x86.h
+@@ -81,7 +81,7 @@
+ #endif
+ 
+ #if defined(_KERNEL)
+-#if defined(HAVE_FPU_API_H)
++#if defined(HAVE_UNDERSCORE_KERNEL_FPU)
+ #include 
+ #include 
+ #define	kfpu_begin()		\
+@@ -94,12 +94,18 @@
+ 	__kernel_fpu_end();		\
+ 	preempt_enable();		\
+ }
+-#else
++#elif defined(HAVE_KERNEL_FPU)
+ #include 
+ #include 
+ #define	kfpu_begin()	kernel_fpu_begin()
+ #define	kfpu_end()		kernel_fpu_end()
+-#endif /* defined(HAVE_FPU_API_H) */
++#else
++/* Kernel doesn't export any kernel_fpu_* functions */
++#include 	/* For kernel xgetbv() */
++#define	kfpu_begin() 	panic("This code should never run")
++#define	kfpu_end() 	panic("This code should never run")
++#endif /*