On Wed, Jul 24, 2019 at 11:11:43AM +0300, Dan Carpenter wrote: > Hello Darrick J. Wong, > > The patch 5f19c7fc6873: "xfs: introduce v5 inode group structure" > from Jul 3, 2019, leads to the following static checker warning: > > fs/xfs/xfs_ioctl.c:738 xfs_fsinumbers_fmt() > warn: check that 'ig1' doesn't leak information (struct has a hole after 'xi_alloccount') > > fs/xfs/xfs_ioctl.c > 730 int > 731 xfs_fsinumbers_fmt( > 732 struct xfs_ibulk *breq, > 733 const struct xfs_inumbers *igrp) > 734 { > 735 struct xfs_inogrp ig1; Heh, yeah, that looks like a bug. Expect a patch soon, thanks for finding this. :/ --D > 736 > 737 xfs_inumbers_to_inogrp(&ig1, igrp); > > The xfs_inumbers_to_inogrp() call doesn't clear the struct hole. > > 738 if (copy_to_user(breq->ubuffer, &ig1, sizeof(struct xfs_inogrp))) > 739 return -EFAULT; > 740 return xfs_ibulk_advance(breq, sizeof(struct xfs_inogrp)); > 741 } > > regards, > dan carpenter