Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753439AbbELPQ7 (ORCPT ); Tue, 12 May 2015 11:16:59 -0400 Received: from www.linutronix.de ([62.245.132.108]:55850 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753400AbbELPQ5 (ORCPT ); Tue, 12 May 2015 11:16:57 -0400 Date: Tue, 12 May 2015 17:17:09 +0200 (CEST) From: Thomas Gleixner To: Baolin Wang cc: arnd@arndb.de, john.stultz@linaro.org, heenasirwani@gmail.com, pang.xunlei@linaro.org, linux-kernel@vger.kernel.org, y2038@lists.linaro.org Subject: Re: [PATCH v3 14/22] time:Introduce the do_sys_settimeofday64() function with timespec64 type In-Reply-To: <1431343162-29918-1-git-send-email-baolin.wang@linaro.org> Message-ID: References: <1431343162-29918-1-git-send-email-baolin.wang@linaro.org> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1102 Lines: 36 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/