mirror_zfs/module
Chuck Tuffli 0df5b5737c Fix ubsan: shift exponent is too large
When running libzpool with the Undefined Behavior Sanitizer (ubsan)
enabled, a zpool create causes a run-time error:

    module/zfs/vdev_label.c:600:14: runtime error: shift exponent 64 is
    too large for 64-bit type 'long long unsigned int'`

in vdev_config_generate()

Fix is to convert vdev_removal_max_span to its base-2 logarithm, using
highbit64(), and then compare the "shifts".

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Chuck Tuffli <ctuffli@gmail.com>
Closes #9744
Closes #11024
2020-10-16 13:00:44 -07:00
..
avl Links in Source Files 2020-09-03 16:17:18 -07:00
icp Prefix zfs internal endian checks with _ZFS 2020-07-28 13:02:49 -07:00
lua FreeBSD: Reduce stack usage of Lua 2020-10-01 12:16:28 -07:00
nvpair Links in Source Files 2020-09-03 16:17:18 -07:00
os Make dbufstat work on FreeBSD 2020-10-16 13:00:28 -07:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode Throw const on some strings 2020-10-16 12:55:56 -07:00
zcommon Rename acltype=posixacl to acltype=posix 2020-09-18 12:38:00 -07:00
zfs Fix ubsan: shift exponent is too large 2020-10-16 13:00:44 -07:00
zstd do a cyclic seek for unused memory objects in pool 2020-10-01 12:22:48 -07:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00
Makefile.bsd module/zstd: pass -U__BMI__ 2020-08-27 16:07:13 -07:00
Makefile.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00