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: <20191223101849.GD1054858@piout.net>
Date:   Mon, 23 Dec 2019 11:18:49 +0100
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Paul Kocialkowski <paul.kocialkowski@...tlin.com>
Cc:     linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
        Alessandro Zummo <a.zummo@...ertech.it>
Subject: Re: [PATCH v2 2/2] rtc: hym8563: Read the valid flag directly
 instead of caching it

On 12/12/2019 16:31:11+0100, Paul Kocialkowski wrote:
> The RTC has a valid bit in the seconds register that indicates whether
> power was lost since the pevious time set. This bit is currently read
> once at probe time, cached and updated with set_time.
> 
> Howeever, caching the bit may prevent detecting power loss at runtime
> (which can happen if the RTC's supply is distinct from the the platform's).
> 
> Writing the seconds register when setting time will clear the bit,
> so there should be no downside in reading the bit directly instead of
> caching it.
> 
> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@...tlin.com>
> ---
> Changes since v1:
> - Removed hym8563 unused variables;
> - Checked buf[0] for VL flag instead of ret;
> - Reorded patches.
> 
>  drivers/rtc/rtc-hym8563.c | 19 +++++++------------
>  1 file changed, 7 insertions(+), 12 deletions(-)
Applied, thanks.

-- 
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