RE: [PATCH] mdadm: fixed mdadm compilation on gcc8

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

 



>I’d use imperative mood in the commit message, and be more explicit.
>
>> mdadm: Use PATH_MAX over MAX_SYSFS_PATH_LEN
>
>> GCC8 make more strict checks of possible truncation during snprintf
>
>s/make/makes/
>
>or: GCC 8 checks possible truncation during snprintf more strictly than
>GCC 7.
>
>> calls than GCC7 which cause compilation errors. This patch
>> fixes compilation of mdadm on GCC8 compiler.
>
>So you increase the buffer size from 120 to PATH_MAX (4096)? What is
>the logic behind that besides just being bigger?
>
>PATH_MAX seems to be tricky: https://eklitzke.org/path-max-is-tricky

I agree with you regarding solution using PATH_MAX. MAX_SYSFS_PATH_LEN defines max path and this value should be used. I will upload second version of patch with check against errors and truncation.

Best regards,
Krzysztof




[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