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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87zhw6ew7k.fsf@bootlin.com>
Date:   Mon, 24 Sep 2018 17:44:47 +0200
From:   Gregory CLEMENT <gregory.clement@...tlin.com>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc:     linux-rtc@...r.kernel.org,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] rtc: armada38x: add range

Hi Alexandre,
 
 On lun., sept. 24 2018, Alexandre Belloni <alexandre.belloni@...tlin.com> wrote:

> The RTC is a 32bit seconds counter.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@...tlin.com>

I checked that with a 64bits userspace setting the date further than
2106 doesn't wrap silently anymore.

Tested-by: Gregory CLEMENT <gregory.clement@...tlin.com>

Thanks,

Gregory

> ---
>  drivers/rtc/rtc-armada38x.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c
> index b74338d6dde6..d0278ad0a7f9 100644
> --- a/drivers/rtc/rtc-armada38x.c
> +++ b/drivers/rtc/rtc-armada38x.c
> @@ -577,6 +577,8 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
>  	/* Update RTC-MBUS bridge timing parameters */
>  	rtc->data->update_mbus_timing(rtc);
>  
> +	rtc->rtc_dev->range_max = U32_MAX;
> +
>  	ret = rtc_register_device(rtc->rtc_dev);
>  	if (ret)
>  		dev_err(&pdev->dev, "Failed to register RTC device: %d\n", ret);
> -- 
> 2.19.0
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ