linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Y2038] Question regarding support of old time interfaces beyond y2038
@ 2019-03-05 15:23 Lukasz Majewski
  2019-03-05 16:05 ` Zack Weinberg
  2019-03-05 17:04 ` Arnd Bergmann
  0 siblings, 2 replies; 10+ messages in thread
From: Lukasz Majewski @ 2019-03-05 15:23 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-kernel, Joseph Myers, libc-alpha

[-- Attachment #1: Type: text/plain, Size: 2372 bytes --]

Dear Arnd,

In your "playground" repository [1] (branch: y2038), the time functions
(stime, settimeofday, etc) are not converted in Linux to be Y2038 aware
(as for example clock_settime{64}() is).

I've also searched on the Internet and I've found some old discussions
regarding them:

SHA1:  d33c577cccd0b3e5bb2425f85037f26714a59363 [2]
From commit message:

"The time, stime, utime, utimes, and futimesat system calls are only
used on older architectures, and we do not provide y2038 safe variants
of them, as they are replaced by clock_gettime64, clock_settime64,
and utimensat_time64."

Moreover, the stime has been even explicitly marked as obsolete [3].


From other discussion [4] - regarding the following system calls:
 time, stime, gettimeofday, settimeofday, adjtimex, nanosleep, alarm,
 getitimer, setitimer, select, utime, utimes, futimesat, and
 {old,new}{l,f,}stat{,64}.

"These all pass 32-bit time_t arguments on 32-bit
 architectures and are replaced by other interfaces (e.g. posix
 timers and clocks, statx). C libraries implementing 64-bit time_t in
 32-bit architectures have to implement the handles by wrapping
 around the newer interfaces."




Has something changed since then? Has any new idea for conversion
emerged?



After observing the development of y2038 on playground [1], I can deduce
that new interfaces are only going to be supported and converted
(clock_settime64/clock_gettime64, etc.)

Considering the above - would it be best to drop Y2038 support on 32
bit machines for old syscalls (stime and friends) and for some others
(settimeofday/gettimeofday) write Y2038 wrappers based on new time
kernel API (clock_gettime/settime) in the C library (i.e. glibc)?




Note:

[1] -
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/tree/kernel/time/time.c?h=y2038
[2] - git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
[3] - 
https://elixir.bootlin.com/linux/v2.6.32/source/arch/arm/include/asm/unistd.h#L419
[4] - https://lists.linaro.org/pipermail/y2038/2017-November/002387.html


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 --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-03-07 19:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-05 15:23 [Y2038] Question regarding support of old time interfaces beyond y2038 Lukasz Majewski
2019-03-05 16:05 ` Zack Weinberg
2019-03-05 16:56   ` Ben Hutchings
2019-03-07  7:53   ` Lukasz Majewski
2019-03-07  8:05     ` Arnd Bergmann
2019-03-07 14:43       ` Lukasz Majewski
2019-03-07 15:26         ` Arnd Bergmann
2019-03-07 19:20     ` Joseph Myers
2019-03-05 17:04 ` Arnd Bergmann
2019-03-07  7:47   ` Lukasz Majewski

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 NNTP newsgroup(s).