HomeFreeBSD

Zero pad bytes when allocating a ZIL record

Description

Zero pad bytes when allocating a ZIL record

When allocating a record, we round up the allocation size to a multiple
of 8. In this case, any padding bytes should be zeroed, otherwise the
contents of uninitialized memory are written to the ZIL.

This was found using KMSAN.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #12383

Details

Provenance
markjAuthored on Jul 16 2021, 1:34 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 26 2021, 6:53 PM
Parents
rG03363b2f86a9: Initialize all fields in zfs_log_xvattr()
Branches
Unknown
Tags
Unknown

Event Timeline