This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v10] y2038: Provide conversion helpers for struct __timespec64
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Dmitry V. Levin" <ldv at altlinux dot org>
- Cc: Lukasz Majewski <lukma at denx dot de>, libc-alpha at sourceware dot org, Joseph Myers <joseph at codesourcery dot com>, Paul Eggert <eggert at cs dot ucla dot edu>, Alistair Francis <alistair23 at gmail dot com>, Arnd Bergmann <arnd at arndb dot de>, Alistair Francis <alistair dot francis at wdc dot com>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Carlos O'Donell <carlos at redhat dot com>, Stepan Golosunov <stepan at golosunov dot pp dot ru>, Florian Weimer <fw at deneb dot enyo dot de>, Zack Weinberg <zackw at panix dot com>
- Date: Mon, 09 Dec 2019 17:03:28 +0100
- Subject: Re: [PATCH v10] y2038: Provide conversion helpers for struct __timespec64
- References: <20190930133134.14771-1-lukma@denx.de> <20191204101906.GC22604@altlinux.org> <87sgm0pefe.fsf@oldenburg2.str.redhat.com> <20191204120432.778cc311@jawa> <20191209000824.GA31384@altlinux.org>
* Dmitry V. Levin:
> So the agreement was to push the garbage to the kernel assuming it will
> handle the matter?
Yes.
> Has anybody considered what it will look like in a tracer's output?
>
> clock_nanosleep_time64(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=13185818429535213454}, {tv_sec=0, tv_nsec=111245472}) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
>
> Confusing, isn't it?
>
> This happens because the type of syscall argument on the kernel side is a
> pointer to struct __kernel_timespec where the type of tv_nsec is long long.
Looks like strace needs to mask the values in its output. I really
don't see another way.
Thanks,
Florian