public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Szabolcs Nagy <szabolcs.nagy@arm.com>
Cc: libc-alpha@sourceware.org, Florian Weimer <fweimer@redhat.com>
Subject: Re: [PATCH v6 3/3] Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg
Date: Thu, 3 Feb 2022 15:36:21 -0300	[thread overview]
Message-ID: <6d0efe10-708d-d60e-2b2e-419b5b562553@linaro.org> (raw)
In-Reply-To: <20220203183402.GN1989194@arm.com>



On 03/02/2022 15:34, Szabolcs Nagy wrote:
> The 01/28/2022 14:50, Adhemerval Zanella via Libc-alpha wrote:
>> The timestamps created by __convert_scm_timestamps only make sense for
>> 64 bit time_t programs, 32 bit time_t programs will ignore 64 bit time_t
>> timestamps since SO_TIMESTAMP will be defined to old values (either by
>> glibc or kernel headers).
>>
>> Worse, if the buffer is not suffice MSG_CTRUNC is set to indicate it
>> (which breaks some programs [1]).
>>
>> This patch makes only 64 bit time_t recvmsg and recvmmsg to call
>> __convert_scm_timestamps.  Also, the assumption to called it is changed
>> from __ASSUME_TIME64_SYSCALLS to __TIMESIZE != 64 since the setsockopt
>> might be called by libraries built without __TIME_BITS=64.  The
>> MSG_CTRUNC is only set for the 64 bit symbols, it should happen only
>> if 64 bit time_t programs run older kernels.
>>
>> Checked on x86_64-linux-gnu and i686-linux-gnu.
>>
>> [1] https://github.com/systemd/systemd/pull/20567
> 
> 
> i think this can cause a build issue on 32bit timesize targets:
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=28860

Yeah, I will fix it (the __convert_scm_timestamps should be always
be built now instead of just for __ASSUME_TIME64_SYSCALLS).

      reply	other threads:[~2022-02-03 18:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 17:50 [PATCH v6 0/3] Fix socket ancillary timestamp on 32 bit time_t ABIs Adhemerval Zanella
2022-01-28 17:50 ` [PATCH v6 1/3] support: Add support_socket_so_timestamp_time64 Adhemerval Zanella
2022-01-28 17:50 ` [PATCH v6 2/3] linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ#28350) Adhemerval Zanella
2022-01-28 17:50 ` [PATCH v6 3/3] Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg Adhemerval Zanella
2022-01-28 18:19   ` Florian Weimer
2022-01-28 19:41     ` Carlos O'Donell
2022-01-29  4:51   ` H.J. Lu
2022-02-03 18:34   ` Szabolcs Nagy
2022-02-03 18:36     ` Adhemerval Zanella [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d0efe10-708d-d60e-2b2e-419b5b562553@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=szabolcs.nagy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).