Re: [PATCH v2 4/4] btrfs: assert sizes of ioctl structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13/07/2020 16:58, David Sterba wrote:
> On Mon, Jul 13, 2020 at 09:29:01PM +0900, Johannes Thumshirn wrote:
>> When expanding ioctl interfaces we want to make sure we're not changing
>> the size of the structures, otherwise it can lead to incorrect transfers
>> between kernel and user-space.
>>
>> Build time assert the size of each structure so we're not running into any
>> incompatibilities.
>>
>> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
> 
> The structure size is ABI once it's part of the ioctl defintion, ie. in
> any of the _IOWR/_IOR/_IOW macros. I don't see the assert added for
> btrfs_ioctl_vol_args_v2 or btrfs_ioctl_quota_rescan_args and I haven't
> checked all.
> 
> Can you please add the static asserts for all of them? The file ioctl.h
> in progs should have that already so you can copy or cross-verify from
> there.

OK will do.

> I'll merge the patches 1-3 now.
> 





[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux