On Wed, Feb 27, 2019 at 3:52 PM Vincenzo Frascino <vincenzo.frascino@xxxxxxx> wrote: > On 22/02/2019 13:49, Arnd Bergmann wrote: > > On Fri, Feb 22, 2019 at 1:25 PM Vincenzo Frascino > > <vincenzo.frascino@xxxxxxx> wrote: > > > >> +/* > >> + * The definitions below are required to overcome the limitations > >> + * of time_t on 32 bit architectures, which overflows in 2038. > >> + * The new code should use the replacements based on time64_t and > >> + * timespec64. > >> + * > >> + * The abstraction below will be updated once the migration to > >> + * time64_t is complete. > >> + */ > >> +#ifdef CONFIG_GENERIC_VDSO_32 > >> +#define __vdso_timespec old_timespec32 > >> +#define __vdso_timeval old_timeval32 > >> +#else > >> +#ifdef ENABLE_COMPAT_VDSO > >> +#define __vdso_timespec old_timespec32 > >> +#define __vdso_timeval old_timeval32 > >> +#else > >> +#define __vdso_timespec __kernel_timespec > >> +#define __vdso_timeval __kernel_old_timeval > >> +#endif /* CONFIG_COMPAT_VDSO */ > >> +#endif /* CONFIG_GENERIC_VDSO_32 */ > > For __vdso_timespec, I see how you ended up with this > > redefinition, and it makes the current version of your patches > > easier, but I fear it will in turn make it harder to add the > > __kernel_old_timeval based variant. > > > > What is __kernel_old_timespec (based on you next email)? Why do you think it > will make harder to add the new variants? I mean you should ideally use the types that you have listed above directly, without the abstraction. In the long run I want one set of functions using __kernel_timespec that implements the 64-bit time interfaces on both 32-bit and 64-bit kernels, including the compat vdso, and another set using old_timespec32 for just the native 32-bit and compat version. This would match what we do in the normal system calls (in linux-5.1+), where we always have the regular implementation use 64-bit types only, and have an optional _time32 version that is used for existing 32-bit user space, on both native 32 bit kernels and compat syscalls on 64-bit. Arnd