[PATCH v4] linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ #28350)
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Jan 27 12:19:27 GMT 2022
On 27/01/2022 08:58, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>>> Are you sure? I think our current recvmsg implementation cannot tell
>>> these two cases apart:
>>>
>>> (a) time64 application running on an old kernel that does not have
>>> time64 timestamping support (so time32 setsockopt was used by
>>> glibc)
>>>
>>> (b) time32 application running on any kernel that uses time32
>>> setsockopt
>>>
>>> In both cases, we generate the time64 timestamp, and that can use to
>>> MSG_CTRUNC. This is the systemd failure.
>>>
>>> DHCP6 broken on armhf (and probably other 32 bit arches)
>>> <https://github.com/systemd/systemd/issues/20564>
>>>
>>> We can fix this in a follow-up patch.
>>
>> The MSG_CTRUNC is suppose to be an warning to application would need a large
>> buffer for (a), it does not really make sense for (b). I think we can
>> improve by adding a recvmsg64 that calls __convert_scm_timestamps and
>> remove the conversion on time32 call.
>
> Right, I expected something like that, which is why I insisted on adding
> the time64 symbol aliases.
I can work on a patch for 2.35 if you think this is really required. Another
options would just to remove the MSG_CTRUNC fro 2.35.
>
>> It would still need a large buffer for (a), but I expect that time64
>> applications that expects to run on older kernels would need to handle
>> it.
>
> Sounds reasonable to me.
>
> Thanks,
> Florian
>
More information about the Libc-alpha
mailing list