Re: [Y2038] [PATCH v2 10/10] nanosleep: change time types to safe __kernel_* types

From: Ben Hutchings
Date: Thu Dec 14 2017 - 19:31:42 EST


On Mon, 2017-11-27 at 11:30 -0800, Deepa Dinamani wrote:
[...]
> @@ -15,9 +16,7 @@ struct pollfd;
> Âenum timespec_type {
> Â TT_NONE = 0,
> Â TT_NATIVE = 1,
> -#ifdef CONFIG_COMPAT
> Â TT_COMPAT = 2,
> -#endif
> Â};
> Â
> Â/*
> @@ -40,10 +39,8 @@ struct restart_block {
> Â clockid_t clockid;
> Â enum timespec_type type;
> Â union {
> - struct timespec __user *rmtp;
> -#ifdef CONFIG_COMPAT
> + struct __kernel_timespec __user *rmtp;
> Â struct compat_timespec __user *compat_rmtp;
> -#endif
> Â };
> Â u64 expires;
> Â } nanosleep;
[...]

The deletions of #ifdef and #endif here seem to belong in patch #6, as
that's the one that changes the condition for the compat nanosleep
implementation which uses the compat_rmtp field.

Ben.

--
Ben Hutchings
Software Developer, Codethink Ltd.