From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752303AbbJRXfO (ORCPT ); Sun, 18 Oct 2015 19:35:14 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:35950 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751409AbbJRXfN (ORCPT ); Sun, 18 Oct 2015 19:35:13 -0400 Date: Sun, 18 Oct 2015 16:35:08 -0700 From: Dmitry Torokhov To: Arnd Bergmann Cc: y2038@lists.linaro.org, WEN Pingbo , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Y2038] [PATCH V2] hp_sdc_rtc: fixed y2038 problem in proc_show Message-ID: <20151018233508.GC12041@dtor-ws> References: <3021182.6jgkaVHA9u@wuerfel> <1442411138-773-1-git-send-email-pingbo.wen@linaro.org> <2616886.83FcmajDm5@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2616886.83FcmajDm5@wuerfel> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 16, 2015 at 03:55:37PM +0200, Arnd Bergmann wrote: > On Wednesday 16 September 2015 21:45:38 WEN Pingbo wrote: > > hp_sdc_rtc_proc_show() use timeval to store the time, which will > > overflowed in 2038. > > > > This patch fixes this problem by replacing timeval with timespec64. > > hp_sdc_rtc_proc_show() only output string, so that userspace will work > > normally if we apply this patch. > > > > Not all timer in i8042 have y2038 risk(handshake, match timer, etc), > > Replacements in those timer are just for consistency. > > > > Version 2 Updates: > > - compiled in m68k gcc cross compiler(4.6.3), no extra warnings > > - placed s64 type cast in tv.tv_sec, making sure it work properly in > > both 32bit and 64bit platform. > > > > Signed-off-by: WEN Pingbo > > Cc: Y2038 > > > > Looks very good, > > Reviewed-by: Arnd Bergmann Applied, thank you. -- Dmitry