Re: [PATCH] xfs: fix boundary test in xfs_attr_shortform_verify

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

 



On Wed, Aug 26, 2020 at 08:13:00AM -0700, Darrick J. Wong wrote:
> > ditto for degree of commenting on magical -1's; on the one hand it's a
> > common usage.  On the other hand, we often get it wrong so a comment
> > probably would help.
> > 
> > > Did you audit the code for other occurrences of this same problem?
> 
> TBH I think this ought to be fixed by changing the declaration of
> xfs_attr_sf_entry.nameval to "uint8_t nameval[]" and using more modern
> fugly macros like struct_sizeof() to calculate the entry sizes without
> us all having to remember to subtract one from the struct size.

Agreed that we absoutely need to do that.  It might be worth to
have the "simple" fix as a backportable small patch first, though.



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux