Re: switching ARC to 64-bit time_t (Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64)
- To: Arnd Bergmann <arnd@arndb.de>
- Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>, Alistair Francis <alistair23@gmail.com>, Joseph Myers <joseph@codesourcery.com>, Florian Weimer <fweimer@redhat.com>, GNU C Library <libc-alpha@sourceware.org>, Palmer Dabbelt <palmerdabbelt@google.com>, Zong Li <zongbox@gmail.com>, Alistair Francis <alistair.francis@wdc.com>, Adhemerval Zanella <adhemerval.zanella@linaro.org>, "Maciej W. Rozycki" <macro@wdc.com>, arcml <linux-snps-arc@lists.infradead.org>, debian-arm@lists.debian.org, Helmut Grohne <helmutg@debian.org>, Viresh Kumar <vireshk@kernel.org>
- Subject: Re: switching ARC to 64-bit time_t (Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64)
- From: Lukasz Majewski <lukma@denx.de>
- Date: Thu, 20 Feb 2020 17:31:32 +0100
- Message-id: <[🔎] 20200220173132.05f2fad5@jawa>
- In-reply-to: <[🔎] CAK8P3a2vvuqzLQqrYkyyYBFATDjCpBuR2Zquu-xB2BWmc5GQWA@mail.gmail.com>
- References: <cover.1578824547.git.alistair.francis@wdc.com> <4e95f95966d8d7c6a8339160dc62d81c1f6a1bfb.1578824547.git.alistair.francis@wdc.com> <00574bfb-981a-3a1c-cbdf-b2fee4eddc32@gmail.com> <CAKmqyKMyf2psPp+-EHoidvbPbSXv0=dP26GjVQnT5BUriLc1gA@mail.gmail.com> <alpine.DEB.2.21.2002120123230.3988@digraph.polyomino.org.uk> <CAKmqyKOgFRfMOws_-48GqMnuS3ygmN9A4DzLg6UtEjRXVoM82A@mail.gmail.com> <8a9784b3-fc52-adc3-4595-33142b059388@synopsys.com> <20200220001136.2f14236e@jawa> <[🔎] CAK8P3a1b73K+RjfHONWLy_dFUucXxwd+0jTnHmkf6YqwRjit4w@mail.gmail.com> <[🔎] 20200220103716.2f526933@jawa> <[🔎] CAK8P3a1nte0nGMw8_aeS__iJsTvsSGYYuKivAYBdiGH-GjVGew@mail.gmail.com> <[🔎] 20200220141451.3fa2fc3f@jawa> <[🔎] CAK8P3a2qLZBAuP-YT2=KZoP+V23TAKvw5W1_2t7rEr2RobLsWw@mail.gmail.com> <[🔎] 20200220164245.035e09b1@jawa> <[🔎] CAK8P3a2vvuqzLQqrYkyyYBFATDjCpBuR2Zquu-xB2BWmc5GQWA@mail.gmail.com>
Hi Arnd,
> On Thu, Feb 20, 2020 at 4:42 PM Lukasz Majewski <lukma@denx.de> wrote:
> > > On Thu, Feb 20, 2020 at 2:15 PM Lukasz Majewski <lukma@denx.de>
> > > wrote:
>
> >
> > I do see two approaches here:
> >
> > 1. In glibc:
> >
> > When -D_TIME_BITS=64 is set - redirections are enabled for syscall
> > wrappers; for example __clock_settime64 is used instead of
> > __clock_settime (e.g. sysdeps/unix/sysv/linux/clock_settime).
> >
> > The latter is guarded by #ifdef __TIMESIZE != 64 so we could change
> > mechanically that __clock_settime returns -1 and sets errno to
> > -ENOTSUPP
>
> What I meant is to remove the __clock_settime function from the
> library entirely to cause a link failure. I suppose replacing most
> "__TIMESIZE != 64" with '0' would do that. Ideally I'd just set
I think that replacing "__TIMESIZE != 64" with '0' would be the
simplest option.
> __TIMESIZE to 64, but doing that would make the ABI incompatible
> with mainline glibc.
>
> > 2. In kernel - return -ENOTSUPP when clock_settime syscall instead
> > of clock_settime64 is invoked.
>
> We already have that with CONFIG_COMPAT_32BIT_TIME, but
> at the moment I think that still breaks glibc's usage of __NR_futex,
> and a compile-time error is always better than a runtime error,
> as it's easier to catch them reliably
Ok.
>
> Arnd
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:
pgpPbItQHDR9e.pgp
Description: OpenPGP digital signature
Reply to: