lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 9 Mar 2021 16:03:56 -0600
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     "Darrick J. Wong" <djwong@...nel.org>
Cc:     "Gustavo A. R. Silva" <gustavoars@...nel.org>,
        Dave Chinner <david@...morbit.com>, linux-xfs@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH][next] xfs: Replace one-element arrays with flexible-array
 members



On 3/9/21 15:26, Darrick J. Wong wrote:
>>> It seems to work all right for casted NULL pointers, and then we get all
>>> the typechecking and multiplication overflow checking, e.g.:
>>>
>>> 	size_t len64 = struct_size((struct xfs_efi_log_format_32 *)NULL,
>>> 				efi_extents src_efi_fmt->efi_nextents);
>> Yeah; in that case, what do you think about casting 0, instead of NULL:
>>
>>        uint len32 = struct_size((xfs_efi_log_format_32_t *)0, efi_extents,
>>                                 src_efi_fmt->efi_nextents);
>>        uint len64 = struct_size((xfs_efi_log_format_64_t *)0, efi_extents,
>>                                 src_efi_fmt->efi_nextents);
> I don't have a preference either way, either here or for the half-dozen
> more of these scattered elsewhere in the file.

OK. I'll send v2, shortly

Thanks for the feedback!
--
Gustavo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ