Re: [PATCH] mips: vdso: conditionalize 32-bit time functions on COMPAT_32BIT_TIME

From: Arnd Bergmann
Date: Mon Dec 30 2019 - 10:47:57 EST


On Mon, Dec 30, 2019 at 4:39 PM Jason A. Donenfeld <Jason@xxxxxxxxx> wrote:
>
> On Mon, Dec 30, 2019 at 4:37 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
> >
> > On Mon, Dec 30, 2019 at 3:37 PM Jason A. Donenfeld <Jason@xxxxxxxxx> wrote:
> > >
> > > On Mon, Dec 30, 2019 at 1:34 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:

> > Returning success from clock_gettime() on a kernel with only
> > time64 support and a libc with only time32 support (or vice
> > versa) would be a bug.
>
> Ah, right, hence why the 32-bit compat code is behind a
> still-on-by-default-but-not-for-long menu option.

I expect this to remain on-by-default for a rather long time, as we still
to run old binaries well into 2030s. Making it configurable is done for
two reasons:

- on embedded systems that have all user space built with time64,
turning this off can make the kernel slightly smaller

- turning it off lets you check that no code relies on calling the old
interfaces internally, bypassing the C library, in a way that works
at the moment but may break after 2038.

Arnd