Re: IMSM volume name truncation

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

 



On 05/29/2018 03:22 PM, Jes Sorensen wrote:
> Hi,
> 
> gcc-8.1 seems to be rather picky with -Werror=stringop-truncation which
> is included with -Wall, so I started looking at this.
> 
> It looks like struct imsm_dev.name is sometimes initialized by copying
> in the first 16 characters from 'name' in init_super_imsm_volume()
> without string termination, while in update_subarray_imsm() we
> initialize and then terminate the string.
> 
> I assume the code assumes imsm_dev.name needs to be terminated, ie. the
> name cannot be more than 15 characters. Is this a wrong assumption?

Looking more at this, it looks like the one case where we truncate the
16th character of the volume name is wrong.

I have pushed some patches in addressing the issues with super-intel.c
setting off gcc-8.1's warnings.

I would appreciate it if someone from Intel could check that I didn't
break anything.

Cheers,
Jes

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux