zfs/lib/libzfs
Allan Jude 7a6c12fd6a
Don't assert on nvlists larger than SPA_MAXBLOCKSIZE
Originally we asserted that all reads are less than SPA_MAXBLOCKSIZE
However, nvlists are not ZFS records, and are not limited to
SPA_MAXBLOCKSIZE.

Add a new environment variable, ZFS_SENDRECV_MAX_NVLIST, to allow the
user to specify the maximum size of the nvlist that can be sent or
received.
Default value: 4 * SPA_MAXBLOCKSIZE (64 MB)

Modify libzfs send routines to return a useful error if the send stream
will generate an nvlist that is beyond the maximum size.

Modify libzfs recv routines to add an explicit error message if the
nvlist is too large, rather than abort()ing.

Move the change the assert() to only trigger on data records

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Closes #9616
2020-08-25 11:04:20 -07:00
..
os FreeBSD: Fix module autoloading when built in base 2020-08-11 13:49:50 -07:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
Makefile.am Disable -Wl,-z,defs for ASAN builds 2020-07-14 12:17:44 -07:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00
libzfs.pc.in Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libzfs_changelist.c Remove dependency on sharetab file and refactor sharing logic 2020-07-13 09:19:18 -07:00
libzfs_config.c Use zfs_ioctl with zfs_cmd_t in libzfs 2019-10-23 17:29:43 -07:00
libzfs_crypto.c Fix typos 2020-06-09 21:24:09 -07:00
libzfs_dataset.c Remove dependency on sharetab file and refactor sharing logic 2020-07-13 09:19:18 -07:00
libzfs_diff.c Don't open zfs control device exclusively 2020-02-28 14:54:14 -08:00
libzfs_import.c Persistent L2ARC 2020-04-10 10:33:35 -07:00
libzfs_iter.c Mark functions as static 2020-06-18 12:20:38 -07:00
libzfs_mount.c Remove dependency on sharetab file and refactor sharing logic 2020-07-13 09:19:18 -07:00
libzfs_pool.c Remove unused `zpool_is_bootable` 2020-08-18 09:30:12 -07:00
libzfs_sendrecv.c Don't assert on nvlists larger than SPA_MAXBLOCKSIZE 2020-08-25 11:04:20 -07:00
libzfs_status.c Import vdev ashift optimization from FreeBSD 2020-08-21 12:53:17 -07:00
libzfs_util.c Don't assert on nvlists larger than SPA_MAXBLOCKSIZE 2020-08-25 11:04:20 -07:00