Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753719AbbGOLes (ORCPT ); Wed, 15 Jul 2015 07:34:48 -0400 Received: from mail-yk0-f180.google.com ([209.85.160.180]:36417 "EHLO mail-yk0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752404AbbGOLep (ORCPT ); Wed, 15 Jul 2015 07:34:45 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 15 Jul 2015 19:34:45 +0800 Message-ID: Subject: Re: [PATCH 3/6] security: Introduce security_settime64() From: Baolin Wang To: Thomas Gleixner Cc: Serge Hallyn , Arnd Bergmann , John Stultz , LKML , James Morris , "Serge E. Hallyn" , Paul Moore , John Johansen , Stephen Smalley , casey@schaufler-ca.com, penguin-kernel@i-love.sakura.ne.jp, Neil Brown , Eric Dumazet , Jeffrey Layton , linux-security-module , y2038 Mailman List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1575 Lines: 52 On 15 July 2015 at 18:24, Thomas Gleixner wrote: > 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? > Sorry, will fix that. >> -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. > Yes, I'll add this explanation in changelog. >> -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. > OK, will add these explanation. Thanks for your comments. > Thanks, > > tglx -- Baolin.wang Best Regards -- 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/