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]
Date:   Wed, 6 Feb 2019 10:58:10 +0100
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Oliver.Rohe@...o.com
Cc:     a.zummo@...ertech.it, linux-rtc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtc: rs5c372: Fix reading from rtc when the oscillator
 got interrupted.

On 06/02/2019 06:33:39+0000, Oliver.Rohe@...o.com wrote:
> >> +	switch (rs5c->type) {
> >> +	case rtc_r2025sd:
> >> +	case rtc_r2221tl:
> >> +		if (ctrl2 & R2x2x_CTRL2_VDET)
> >> +			dev_warn(&client->dev, "rtc battery voltage drop below threshold detected.\n");
> > 
> > VDET doesn't mean anything specific regarding timekeeping so I wouldn't warn here.
> 
> VDET means in case the chip is powered by a battery, that is about to die sometime soon, it gives you heads up.

Yes but my statement stands true, this doesn't have any direct
implication regarding timekeeping.

There is the RTC_VL_READ ioctl to check voltage low. It is not weel
designed but this is what we have now.

> > 
> >> +		if (ctrl2 & R2x2x_CTRL2_PON)
> >> +			dev_warn(&client->dev, "rtc battery voltage drop to zero detected.\n");
> > 
> > You should return -EINVAL directly here
> 
> The PON implies the XSTP bit, so I only return from there, just to print all the warning messages, but I can return directly from here if you want.

As you said, PON implies XSTP so I'm not sure it is valuable to have both
warnings.


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