mirror_zfs/module
Chuck Tuffli a8fc1b8743
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-08 16:37:27 -07:00
..
avl Links in Source Files 2020-09-02 09:42:12 -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-09-22 16:03:11 -07:00
nvpair Links in Source Files 2020-09-02 09:42:12 -07:00
os Make dbufstat work on FreeBSD 2020-10-08 09:40:23 -07:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode Throw const on some strings 2020-10-02 17:44:10 -07:00
zcommon Rename acltype=posixacl to acltype=posix 2020-09-16 12:26:06 -07:00
zfs Fix ubsan: shift exponent is too large 2020-10-08 16:37:27 -07:00
zstd do a cyclic seek for unused memory objects in pool 2020-09-30 13:22:34 -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 15:50:13 -07:00
Makefile.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00