summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Ahrens <mahrens@delphix.com>2016-05-18 20:10:09 -0700
committerMatthew Ahrens <mahrens@delphix.com>2016-05-19 07:43:15 -0700
commitea4a67f462de0a39a9adea8197bcdef849de5371 (patch)
treed7d54c3828f057a7bc08108f051ff6990b220458
parent3c9850a686c2fcba473e4f602616772c17c21dee (diff)
downloadillumos-joyent-ea4a67f462de0a39a9adea8197bcdef849de5371.tar.gz
6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch
Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com>
-rw-r--r--usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h b/usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h
index 9d17cda9c1..bc83f87483 100644
--- a/usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h
+++ b/usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h
@@ -337,6 +337,12 @@ typedef enum zfs_case {
ZFS_CASE_MIXED
} zfs_case_t;
+/*
+ * Note: this struct must have the same layout in 32-bit and 64-bit, so
+ * that 32-bit processes (like /sbin/zfs) can pass it to the 64-bit
+ * kernel. Therefore, we add padding to it so that no "hidden" padding
+ * is automatically added on 64-bit (but not on 32-bit).
+ */
typedef struct zfs_cmd {
char zc_name[MAXPATHLEN]; /* name of pool or dataset */
uint64_t zc_nvlist_src; /* really (char *) */
@@ -372,7 +378,9 @@ typedef struct zfs_cmd {
uint64_t zc_action_handle;
int zc_cleanup_fd;
uint8_t zc_simple;
+ uint8_t zc_pad3[3];
boolean_t zc_resumable;
+ uint32_t zc_pad4;
uint64_t zc_sendobj;
uint64_t zc_fromobj;
uint64_t zc_createtxg;