[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1505121709390.4225@nanos>
Date: Tue, 12 May 2015 17:17:09 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Baolin Wang <baolin.wang@...aro.org>
cc: arnd@...db.de, john.stultz@...aro.org, heenasirwani@...il.com,
pang.xunlei@...aro.org, linux-kernel@...r.kernel.org,
y2038@...ts.linaro.org
Subject: Re: [PATCH v3 14/22] time:Introduce the do_sys_settimeofday64()
function with timespec64 type
On Mon, 11 May 2015, Baolin Wang wrote:
> This patch introduces the do_sys_settimeofday64() function with timespec64
> type, that makes this function ready for 2038 issue when setting the time of day.
Copy and paste is your favourite work method, right?
> -int do_sys_settimeofday(const struct timespec *tv, const struct timezone *tz)
> +int do_sys_settimeofday64(const struct timespec64 *tv, const struct timezone *tz)
> {
> static int firsttime = 1;
> int error = 0;
> + struct timespec ts;
>
> - if (tv && !timespec_valid(tv))
> + if (tv && !timespec64_valid(tv))
> return -EINVAL;
>
> - error = security_settime(tv, tz);
> + ts = timespec64_to_timespec(*tv);
> + error = security_settime(&ts, tz);
How is that 2038 safe? Not at all.
I told you before that we fix the underlying functions before we add
such bogosities.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists