Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752044AbbGOKYe (ORCPT ); Wed, 15 Jul 2015 06:24:34 -0400 Received: from www.linutronix.de ([62.245.132.108]:36839 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751796AbbGOKYc (ORCPT ); Wed, 15 Jul 2015 06:24:32 -0400 Date: Wed, 15 Jul 2015 12:24:09 +0200 (CEST) From: Thomas Gleixner To: Baolin Wang cc: serge.hallyn@canonical.com, arnd@arndb.de, john.stultz@linaro.org, linux-kernel@vger.kernel.org, james.l.morris@oracle.com, serge@hallyn.com, paul@paul-moore.com, john.johansen@canonical.com, sds@tycho.nsa.gov, casey@schaufler-ca.com, penguin-kernel@I-love.SAKURA.ne.jp, neilb@suse.de, edumazet@google.com, jlayton@primarydata.com, linux-security-module@vger.kernel.org, y2038@lists.linaro.org Subject: Re: [PATCH 3/6] security: Introduce security_settime64() In-Reply-To: Message-ID: References: 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: 1285 Lines: 36 On Wed, 15 Jul 2015, Baolin Wang wrote: > security_settime() returns a timespec, which is not year 2038 safe It returns int, which is year 2038 safe on all systems. Copy and paste is great, right? > -int security_settime(const struct timespec *ts, const struct timezone *tz); > +int security_settime64(const struct timespec64 *ts, const struct timezone *tz); > +static inline int security_settime(const struct timespec *ts, const struct timezone *tz) > +{ > + struct timespec64 ts64 = timespec_to_timespec64(*ts); > + > + return security_settime64(&ts64, tz); > +} What's the point of this inline? Explanation is missing in changelog. Also this wants follow up patches which fix the call sites and remove that inline helper again. > -int cap_settime(const struct timespec *ts, const struct timezone *tz) > +int cap_settime(const struct timespec64 *ts, const struct timezone *tz) Changelog is missing that none of the existing hooks is using the ts argument and therefor the patch is not doing any functional changes. 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/