lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200908093946.GQ230586@piout.net>
Date:   Tue, 8 Sep 2020 11:39:46 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Jonathan Neuschäfer <j.neuschaefer@....net>
Cc:     linux-kernel@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Sam Ravnborg <sam@...nborg.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Heiko Stuebner <heiko.stuebner@...obroma-systems.com>,
        Stephan Gerhold <stephan@...hold.net>,
        Lubomir Rintel <lkundrak@...sk>,
        Mark Brown <broonie@...nel.org>, allen <allen.chen@....com.tw>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        devicetree@...r.kernel.org, linux-pwm@...r.kernel.org,
        linux-rtc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Heiko Stuebner <heiko@...ech.de>,
        Josua Mayer <josua.mayer@....eu>,
        Andreas Kemnade <andreas@...nade.info>,
        Arnd Bergmann <arnd@...db.de>, Daniel Palmer <daniel@...f.com>
Subject: Re: [PATCH v2 07/10] rtc: Introduce RTC_TIMESTAMP_END_2255

On 05/09/2020 15:32:27+0200, Jonathan Neuschäfer wrote:
> Some RTCs store the year as an 8-bit number relative to the year 2000.
> This results in a maximum timestamp of 2255-12-31 23:59:59.
> 
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@....net>
> ---
> 
> v2:
> - New patch
> ---
>  include/linux/rtc.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/rtc.h b/include/linux/rtc.h
> index 22d1575e4991b..fcc086084a603 100644
> --- a/include/linux/rtc.h
> +++ b/include/linux/rtc.h
> @@ -154,6 +154,7 @@ struct rtc_device {
>  #define RTC_TIMESTAMP_END_2079		3471292799LL /* 2079-12-31 23:59:59 */
>  #define RTC_TIMESTAMP_END_2099		4102444799LL /* 2099-12-31 23:59:59 */
>  #define RTC_TIMESTAMP_END_2199		7258118399LL /* 2199-12-31 23:59:59 */
> +#define RTC_TIMESTAMP_END_2255		9025257599LL /* 2255-12-31 23:59:59 */

Honestly, I wouldn't bother adding that one unless you have examples of
other RTCs endng at the same date, I'm fine having the value and comment
directly in the probe function.

>  #define RTC_TIMESTAMP_END_9999		253402300799LL /* 9999-12-31 23:59:59 */
> 
>  extern struct rtc_device *devm_rtc_device_register(struct device *dev,
> --
> 2.28.0
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ