From: Lukasz Majewski <lukma@denx.de>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Joseph Myers <joseph@codesourcery.com>,
Paul Eggert <eggert@cs.ucla.edu>, Andreas Schwab <schwab@suse.de>,
Alistair Francis <alistair23@gmail.com>,
Alistair Francis <alistair.francis@wdc.com>,
GNU C Library <libc-alpha@sourceware.org>,
Siddhesh Poyarekar <siddhesh@gotplt.org>,
Florian Weimer <fweimer@redhat.com>,
Florian Weimer <fw@deneb.enyo.de>,
Zack Weinberg <zackw@panix.com>,
Carlos O'Donell <carlos@redhat.com>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v4 1/2] y2038: linux: Provide __timerfd_gettime64 implementation
Date: Wed, 8 Jan 2020 00:06:11 +0100 [thread overview]
Message-ID: <20200108000612.0cc1bcfe@jawa> (raw)
In-Reply-To: <a4198224-902a-9955-1d5f-92765ba0abae@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 3483 bytes --]
Hi Adhemerval,
> On 07/01/2020 11:25, Lukasz Majewski wrote:
> > Hi Adhemerval,
> >
> >> On 07/01/2020 06:27, Lukasz Majewski wrote:
> >>
> >>>> As a side note, now that arch-syscall patch is upstream should we
> >>>> assume that for !__ASSUME_TIME64_SYSCALLS the
> >>>> __NR_timerfd_gettime64 should be defined (meaning that Linux
> >>>> supports time64 for all 32-bit architectures)?
> >>>
> >>> Only Linux version >= 5.1 supports 64 bit time on archs with
> >>> __WORDSIZE = 32. I do guess (but I may be wrong here) that the
> >>> arch-syscall is supposed to reflect the exact syscalls provided by
> >>> kernel headers used for building (to help with validation of Y2038
> >>> patches).
> >>
> >> The arch-syscall is now autogenerated from the latest kernel
> >> release defined in build-many-glibcs.py. So the question is
> >> whether Linux support and enforces time64 support on all and
> >> future 32-bit architectures or if there is still some missing ones
> >> (as it has happen on some syscall additions, where some
> >> architecture lag behind some releases).
> >
> > This question would be best answered by Arnd (CC'ed) IMHO. From
> > what I know all 32 bit architectures gained syscalls covered by
> > __ASSUME_TIME64_SYSCALLS from Linux 5.1+.
> >
> > The arch-syscall seems to me like a mean to test for example the
> > time related syscalls which use different versions (32bit time vs
> > 64 bit) on different archs. Notable example - clock_gettime(). Am I
> > right?
>
> The arch-syscall is a way to decouple the build from the kernel header
> used on build,
So then we will build against the newest kernel (like 5.4 now). As it
was noted in the other thread - this would simplify the
build-many-glibcs.py
> which might simplify the logic to use some kernel
> features.
I must admit that I do not see such simplification... Could you give an
example?
>
> On the clock_gettime, for instance, as Arnd has indicated we can
> assume that __NR_clock_gettime64 will be always presented for
> !__ASSUME_TIME64_SYSCALLS.
>
> It would be interesting if kernel also could enforce that new
> generic syscalls would be wire-up, or at least the syscall number
> reserved; once a new generic syscall is introduced. It would
> simplify the __ASSUME_* macro, not requiring the arch-specific
> overrides on some architectures.
>
> >
> > The __clock_gettime64 is going to be exported (as clock_gettime
> > redirection) on 32 bit archs which are going to be Y2038 safe (with
> > 64 bit time_t).
> >
> >> clock_gettime64 would be suffice (with a {weak,strong}_alias).
> >>
> >
> > The internal in-glibc usage (calling) of clock_gettime() shall be
> > replaced by either __clock_gettime64 or clock_gettime64. I would
> > prefer the former as it reflects that it is internal function (with
> > __ prefix).
>
> It required to be the former because we also need to take in
> consideration linking namespace pollution.
>
> >
> >> However I do think we should fix it to avoid such confusion why
> >> there is a hidden_proto and not a hidden_def.
> >
> > +1.
>
> Ack, I will send a patch.
Thanks.
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-01-07 23:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-06 12:17 [PATCH v4 1/2] y2038: linux: Provide __timerfd_gettime64 implementation Lukasz Majewski
2020-01-06 12:17 ` [PATCH v4 2/2] y2038: linux: Provide __timerfd_settime64 implementation Lukasz Majewski
2020-01-06 21:06 ` Adhemerval Zanella
2020-01-06 20:34 ` [PATCH v4 1/2] y2038: linux: Provide __timerfd_gettime64 implementation Adhemerval Zanella
2020-01-07 9:27 ` Lukasz Majewski
2020-01-07 12:36 ` Adhemerval Zanella
2020-01-07 14:25 ` Lukasz Majewski
2020-01-07 15:26 ` Arnd Bergmann
2020-01-07 20:16 ` Adhemerval Zanella
2020-01-07 20:22 ` Arnd Bergmann
2020-01-07 23:06 ` Lukasz Majewski [this message]
2020-01-07 12:49 ` Florian Weimer
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200108000612.0cc1bcfe@jawa \
--to=lukma@denx.de \
--cc=adhemerval.zanella@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=alistair23@gmail.com \
--cc=arnd@arndb.de \
--cc=carlos@redhat.com \
--cc=eggert@cs.ucla.edu \
--cc=fw@deneb.enyo.de \
--cc=fweimer@redhat.com \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=schwab@suse.de \
--cc=siddhesh@gotplt.org \
--cc=zackw@panix.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).