Your message dated Thu, 29 Oct 2020 06:34:42 +0000
with message-id <[email protected]>
and subject line Bug#968256: fixed in zfs-linux 0.8.5-2
has caused the Debian Bug report #968256,
regarding src:zfs-linux: x32 support
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
968256: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968256
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: zfs-linux
Version: 0.8.4-2
Severity: wishlist
Tags: patch

Hi!

I'd recently ported the SPL to x32 [1], but didn't post it here because
the mailing list setup confused me a bit at the time and thought 0.9.0
would come sooner rather than later.

However, I've now found the list, failed to post to it twice, so I'm
opening this bug and attaching my patches, up/downdated for 0.8.4-2;
they're plug-and-play and I've been running them like this since early
May, but I'm not sure if there's anything more to be done on the
packaging side.

Best,
наб

[1]: https://github.com/openzfs/zfs/pull/10357
From 478e589977e6137dca88eefe3e8114a200163021 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <[email protected]>
Date: Mon, 18 May 2020 00:00:49 +0200
Subject: [PATCH 1/2] Correctly handle the x32 ABI

__x86_64__ && _ILP32 => don't forcibly define _LP64

Closes #844
---
 include/spl/sys/isa_defs.h        | 6 +++++-
 lib/libspl/include/sys/isa_defs.h | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/spl/sys/isa_defs.h b/include/spl/sys/isa_defs.h
index b62a021ee..61072da33 100644
--- a/include/spl/sys/isa_defs.h
+++ b/include/spl/sys/isa_defs.h
@@ -40,9 +40,13 @@
 #define	__x86
 #endif
 
+#if defined(_ILP32)
+/* x32-specific defines; careful to *not* define _LP64 here */
+#else
 #if !defined(_LP64)
 #define	_LP64
 #endif
+#endif
 
 #define	_ALIGNMENT_REQUIRED	1
 
@@ -209,7 +213,7 @@
 #else
 /*
  * Currently supported:
- * x86_64, i386, arm, powerpc, s390, sparc, mips and risc-v
+ * x86_64, x32, i386, arm, powerpc, s390, sparc, mips and risc-v
  */
 #error "Unsupported ISA type"
 #endif
diff --git a/lib/libspl/include/sys/isa_defs.h b/lib/libspl/include/sys/isa_defs.h
index 35f500f71..b2ad2a1f4 100644
--- a/lib/libspl/include/sys/isa_defs.h
+++ b/lib/libspl/include/sys/isa_defs.h
@@ -46,9 +46,13 @@ extern "C" {
 #define	__x86
 #endif
 
+#if defined(_ILP32)
+/* x32-specific defines; careful to *not* define _LP64 here */
+#else
 #if !defined(_LP64)
 #define	_LP64
 #endif
+#endif
 
 #if !defined(_LITTLE_ENDIAN)
 #define	_LITTLE_ENDIAN
@@ -204,7 +208,7 @@ extern "C" {
 #else
 /*
  * Currently supported:
- * x86_64, i386, arm, powerpc, s390, sparc, and mips, riscv64
+ * x86_64, x32, i386, arm, powerpc, s390, sparc, and mips, riscv64
  */
 #error "Unsupported ISA type"
 #endif
-- 
2.28.0.rc1

From ade28f70e0098e4f58b194c07da80881763803ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <[email protected]>
Date: Thu, 21 May 2020 21:53:13 +0200
Subject: [PATCH 2/2] Always use "%lld" for formatting time_ts

Given the following test program:
  #include <time.h>
  #include <stdio.h>
  #include <stdint.h>
  int main() {
    printf("time_t:    %d\n", sizeof(time_t));
    printf("long:      %d\n", sizeof(long));
    printf("long long: %d\n", sizeof(long long));
  }

These are output on various x86 architectures:
  x32$   time_t:    8
  x32$   long:      4
  x32$   long long: 8

  amd64$ time_t:    8
  amd64$ long:      8
  amd64$ long long: 8

  i386$  time_t:    4
  i386$  long:      4
  i386$  long long: 8

Therefore code using "%l[du]" to format time_ts produced warnings on x32
---
 lib/libspl/timestamp.c       | 2 +-
 lib/libzfs/libzfs_sendrecv.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/libspl/timestamp.c b/lib/libspl/timestamp.c
index eab15f3f1..22ecb3940 100644
--- a/lib/libspl/timestamp.c
+++ b/lib/libspl/timestamp.c
@@ -51,7 +51,7 @@ print_timestamp(uint_t timestamp_fmt)
 		fmt = nl_langinfo(_DATE_FMT);
 
 	if (timestamp_fmt == UDATE) {
-		(void) printf("%ld\n", t);
+		(void) printf("%lld\n", (longlong_t)t);
 	} else if (timestamp_fmt == DDATE) {
 		char dstr[64];
 		int len;
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index 10241f530..21e5c7d85 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -4606,8 +4606,8 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
 		zfs_nicebytes(bytes, buf1, sizeof (buf1));
 		zfs_nicebytes(bytes/delta, buf2, sizeof (buf1));
 
-		(void) printf("received %s stream in %lu seconds (%s/sec)\n",
-		    buf1, delta, buf2);
+		(void) printf("received %s stream in %lld seconds (%s/sec)\n",
+		    buf1, (longlong_t)delta, buf2);
 	}
 
 	err = 0;
-- 
2.28.0.rc1

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: zfs-linux
Source-Version: 0.8.5-2
Done: Mo Zhou <[email protected]>

We believe that the bug you reported is fixed in the latest version of
zfs-linux, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mo Zhou <[email protected]> (supplier of updated zfs-linux package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 29 Oct 2020 14:05:31 +0800
Source: zfs-linux
Architecture: source
Version: 0.8.5-2
Distribution: unstable
Urgency: medium
Maintainer: Debian ZFS on Linux maintainers 
<[email protected]>
Changed-By: Mo Zhou <[email protected]>
Closes: 968256 972327
Changes:
 zfs-linux (0.8.5-2) unstable; urgency=medium
 .
   [ Antonio Russo ]
   * zfs-dkms: restrict to the same source version (Closes: #972327)
   * lintian: ignore binary data in lua script.
 .
   [ Mo Zhou ]
   * Cherry-pick x32 support from master branch. (Closes: #968256)
Checksums-Sha1:
 2a7b36bc3f7dea16c5947591627180b657859121 3421 zfs-linux_0.8.5-2.dsc
 e60741b3cce32bfc3566e806d17cc99d2841e638 78104 zfs-linux_0.8.5-2.debian.tar.xz
 4c3c2b5c37344aec8a64566ca9bf4ce564a48181 8145 
zfs-linux_0.8.5-2_source.buildinfo
Checksums-Sha256:
 e3fc2fede75d9f9ead8b9820c6dd949a232af1544b81b04ec17ff1ce867a7529 3421 
zfs-linux_0.8.5-2.dsc
 7f6a75e23ac566b72f95b0747bdae71128211dcf264e1321ac73c39ef9c17220 78104 
zfs-linux_0.8.5-2.debian.tar.xz
 d7e8ee5b3379cb899f6b1fc5cc6bef8066329fbeddf26b1b29027708c55ad145 8145 
zfs-linux_0.8.5-2_source.buildinfo
Files:
 c6a158b82211e28a88d1fd23dfe933f7 3421 contrib/kernel optional 
zfs-linux_0.8.5-2.dsc
 270cb8150120feb03a9c940739383140 78104 contrib/kernel optional 
zfs-linux_0.8.5-2.debian.tar.xz
 505b5fe44d731d136ff90ca8d58e238f 8145 contrib/kernel optional 
zfs-linux_0.8.5-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEEY4vHXsHlxYkGfjXeYmRes19oaooFAl+aW+URHGx1bWluQGRl
Ymlhbi5vcmcACgkQYmRes19oaoreCQ/+LOQ4DJhKZH4oV8xi9rTMlcSeInNfpqxH
stZwqkqQ8tEooks0tdqs+tKDVJAYRsUPVkFqFnXQqbvifjiYTYaBrXRX1FqCjr48
WK4cX4AiCOjlswzyrXeTDfe6ZCW0ODv/wc/SciLqtFj2WHNmprYIXTY92hfdoy6Q
VUDyNERMF8JebvzD8OdpbeZ3W4r7Lpo1vLF+6pkK79LFhMBi1I82qQEbYDWs/tGu
qJR8WR0wyvaiU30lnYBXXdvPncSbqOiQFVN2RFiEskuE5s+R4ns184OdCMu/dJLg
mXyWeNYnotY6qVdWhea36YpYKsZme9hCB0hnEF5lhYhn3/zMaA/atvUxZTyD0qB6
aKYptSQ8gKWWVUoAGYxUg58mfiygGqOirNlVeA5TYaCQhk9wVagDe0YQI9/ManmO
gdIqxYnMbMAXf4uiPeKnmJsWlKP3eEho/i9ahOgvJjWhgiiptvm1lcLtcnFLCfHm
17OzBOrKOX0zs7eyO9wZ//Phf6pWR+SyTLra2W9kUjVPfBwFuaO5E9G1yF/rJO+P
YzyHqjFzpm36i2REg75+GU/kYrjkOOzVdNrOi64aYUfSx9KMSUP1aJCbOt/8aoZp
VmFgArdbVyLyFuUCRW1GFiiAb7pXOggXIrJ+RLZixGJh+qJ4nkhlxAwYwa8szvqT
rduHyQ3TVqY=
=Et0T
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to