From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752297AbdGDLwB (ORCPT ); Tue, 4 Jul 2017 07:52:01 -0400 Received: from mail-qk0-f172.google.com ([209.85.220.172]:33190 "EHLO mail-qk0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752262AbdGDLv7 (ORCPT ); Tue, 4 Jul 2017 07:51:59 -0400 MIME-Version: 1.0 In-Reply-To: References: <1497864982-29284-1-git-send-email-benjamin.gaignard@linaro.org> <47b45b70-91da-ce41-535d-89d92f380274@kernel.org> <20170623220907.kxhkwkl6gt7bho5r@piout.net> From: Benjamin Gaignard Date: Tue, 4 Jul 2017 13:51:57 +0200 Message-ID: Subject: Re: [PATCH v2 0/3] rtc: make st-lpc robust against y2038/2106 bug To: shuah@kernel.org Cc: Alexandre Belloni , John Stultz , Thomas Gleixner , sboyd@codeaurora.org, Linux Kernel Mailing List , linux-kselftest@vger.kernel.org, patrice.chotard@st.com, Alessandro Zummo , linux-arm-kernel@lists.infradead.org, rtc-linux@googlegroups.com, Linaro Kernel 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 2017-06-24 0:34 GMT+02:00 Shuah Khan : > Hi Alexandre, > > On 06/23/2017 04:09 PM, Alexandre Belloni wrote: >> On 23/06/2017 at 13:40:41 -0600, Shuah Khan wrote: >>> On 06/19/2017 03:36 AM, Benjamin Gaignard wrote: >>>> On 32bits platforms "struct timeval" or "time_t" are using u32 to code the >>>> date, this cause tools like "date" or "hwclock" failed even before setting >>>> the RTC device if the date is superior to year 2038 (or 2106). >>>> >>>> To avoid this problem I add one RTC test file which directly use RTC ioctl >>>> to set and read RTC time and alarm values. >>>> rtctest_setdate allow to set any date/time given in the command line. >>>> >>>> On this version 2 I add check of problematics years in rtctest like suggest >>>> by Alexandre. >>>> >>>> Finally that had allowed me to test and fix rtc-st-lpc driver. >>>> >>>> Benjamin Gaignard (3): >>>> tools: timer: add rtctest_setdate >>>> tool: timer: rtctest add check for problematic dates >>>> rtc: st-lpc: make it robust against y2038/2106 bug >>>> >>>> drivers/rtc/rtc-st-lpc.c | 19 ++-- >>>> tools/testing/selftests/timers/Makefile | 2 +- >>>> tools/testing/selftests/timers/rtctest.c | 121 ++++++++++++++++++++++- >>>> tools/testing/selftests/timers/rtctest_setdate.c | 86 ++++++++++++++++ >>>> 4 files changed, 212 insertions(+), 16 deletions(-) >>>> create mode 100644 tools/testing/selftests/timers/rtctest_setdate.c >>>> >>> >>> Hi Thomas/John, >>> >>> I can take the first two patches in this series through linux-kselftest >>> with your or John's Ack. Please review and let me know one way or the >>> other. >>>> >> Well, I'm the maintainer for rtctest.c and I'll make sure to also be the >> one for rtctest_setdate.c> >>> The third one is a rtc driver patch. Please let me know how do you want >>> to handle this series soon we can get this into 4.13-rc1. >>> >> >> I'll take the three patches but I still have comment I didn't have time >> to give yet. Alexandre, may you had time to give me feedback on this ? Regards, Benjamin >> >> > > Okay. I will drop this off my radar then :) > > thanks, > -- Shuah > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: rtc-linux@googlegroups.com Received: from mail-qk0-x233.google.com (mail-qk0-x233.google.com. [2607:f8b0:400d:c09::233]) by gmr-mx.google.com with ESMTPS id w195si1143761ywa.13.2017.07.04.04.51.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jul 2017 04:51:58 -0700 (PDT) Received: by mail-qk0-x233.google.com with SMTP id d78so165857232qkb.1 for ; Tue, 04 Jul 2017 04:51:58 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1497864982-29284-1-git-send-email-benjamin.gaignard@linaro.org> <47b45b70-91da-ce41-535d-89d92f380274@kernel.org> <20170623220907.kxhkwkl6gt7bho5r@piout.net> From: Benjamin Gaignard Date: Tue, 4 Jul 2017 13:51:57 +0200 Message-ID: Subject: [rtc-linux] Re: [PATCH v2 0/3] rtc: make st-lpc robust against y2038/2106 bug To: shuah@kernel.org Cc: Alexandre Belloni , John Stultz , Thomas Gleixner , sboyd@codeaurora.org, Linux Kernel Mailing List , linux-kselftest@vger.kernel.org, patrice.chotard@st.com, Alessandro Zummo , linux-arm-kernel@lists.infradead.org, rtc-linux@googlegroups.com, Linaro Kernel Mailman List Content-Type: text/plain; charset="UTF-8" Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , 2017-06-24 0:34 GMT+02:00 Shuah Khan : > Hi Alexandre, > > On 06/23/2017 04:09 PM, Alexandre Belloni wrote: >> On 23/06/2017 at 13:40:41 -0600, Shuah Khan wrote: >>> On 06/19/2017 03:36 AM, Benjamin Gaignard wrote: >>>> On 32bits platforms "struct timeval" or "time_t" are using u32 to code the >>>> date, this cause tools like "date" or "hwclock" failed even before setting >>>> the RTC device if the date is superior to year 2038 (or 2106). >>>> >>>> To avoid this problem I add one RTC test file which directly use RTC ioctl >>>> to set and read RTC time and alarm values. >>>> rtctest_setdate allow to set any date/time given in the command line. >>>> >>>> On this version 2 I add check of problematics years in rtctest like suggest >>>> by Alexandre. >>>> >>>> Finally that had allowed me to test and fix rtc-st-lpc driver. >>>> >>>> Benjamin Gaignard (3): >>>> tools: timer: add rtctest_setdate >>>> tool: timer: rtctest add check for problematic dates >>>> rtc: st-lpc: make it robust against y2038/2106 bug >>>> >>>> drivers/rtc/rtc-st-lpc.c | 19 ++-- >>>> tools/testing/selftests/timers/Makefile | 2 +- >>>> tools/testing/selftests/timers/rtctest.c | 121 ++++++++++++++++++++++- >>>> tools/testing/selftests/timers/rtctest_setdate.c | 86 ++++++++++++++++ >>>> 4 files changed, 212 insertions(+), 16 deletions(-) >>>> create mode 100644 tools/testing/selftests/timers/rtctest_setdate.c >>>> >>> >>> Hi Thomas/John, >>> >>> I can take the first two patches in this series through linux-kselftest >>> with your or John's Ack. Please review and let me know one way or the >>> other. >>>> >> Well, I'm the maintainer for rtctest.c and I'll make sure to also be the >> one for rtctest_setdate.c> >>> The third one is a rtc driver patch. Please let me know how do you want >>> to handle this series soon we can get this into 4.13-rc1. >>> >> >> I'll take the three patches but I still have comment I didn't have time >> to give yet. Alexandre, may you had time to give me feedback on this ? Regards, Benjamin >> >> > > Okay. I will drop this off my radar then :) > > thanks, > -- Shuah > -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: benjamin.gaignard@linaro.org (Benjamin Gaignard) Date: Tue, 4 Jul 2017 13:51:57 +0200 Subject: [PATCH v2 0/3] rtc: make st-lpc robust against y2038/2106 bug In-Reply-To: References: <1497864982-29284-1-git-send-email-benjamin.gaignard@linaro.org> <47b45b70-91da-ce41-535d-89d92f380274@kernel.org> <20170623220907.kxhkwkl6gt7bho5r@piout.net> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 2017-06-24 0:34 GMT+02:00 Shuah Khan : > Hi Alexandre, > > On 06/23/2017 04:09 PM, Alexandre Belloni wrote: >> On 23/06/2017 at 13:40:41 -0600, Shuah Khan wrote: >>> On 06/19/2017 03:36 AM, Benjamin Gaignard wrote: >>>> On 32bits platforms "struct timeval" or "time_t" are using u32 to code the >>>> date, this cause tools like "date" or "hwclock" failed even before setting >>>> the RTC device if the date is superior to year 2038 (or 2106). >>>> >>>> To avoid this problem I add one RTC test file which directly use RTC ioctl >>>> to set and read RTC time and alarm values. >>>> rtctest_setdate allow to set any date/time given in the command line. >>>> >>>> On this version 2 I add check of problematics years in rtctest like suggest >>>> by Alexandre. >>>> >>>> Finally that had allowed me to test and fix rtc-st-lpc driver. >>>> >>>> Benjamin Gaignard (3): >>>> tools: timer: add rtctest_setdate >>>> tool: timer: rtctest add check for problematic dates >>>> rtc: st-lpc: make it robust against y2038/2106 bug >>>> >>>> drivers/rtc/rtc-st-lpc.c | 19 ++-- >>>> tools/testing/selftests/timers/Makefile | 2 +- >>>> tools/testing/selftests/timers/rtctest.c | 121 ++++++++++++++++++++++- >>>> tools/testing/selftests/timers/rtctest_setdate.c | 86 ++++++++++++++++ >>>> 4 files changed, 212 insertions(+), 16 deletions(-) >>>> create mode 100644 tools/testing/selftests/timers/rtctest_setdate.c >>>> >>> >>> Hi Thomas/John, >>> >>> I can take the first two patches in this series through linux-kselftest >>> with your or John's Ack. Please review and let me know one way or the >>> other. >>>> >> Well, I'm the maintainer for rtctest.c and I'll make sure to also be the >> one for rtctest_setdate.c> >>> The third one is a rtc driver patch. Please let me know how do you want >>> to handle this series soon we can get this into 4.13-rc1. >>> >> >> I'll take the three patches but I still have comment I didn't have time >> to give yet. Alexandre, may you had time to give me feedback on this ? Regards, Benjamin >> >> > > Okay. I will drop this off my radar then :) > > thanks, > -- Shuah >