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 May 2020 00:14:46 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Rasmus Villemoes <rasmus.villemoes@...vas.dk>
Cc:     Bruno Thomsen <bruno.thomsen@...il.com>,
        Per Nørgaard Christensen 
        <per.christensen@...vas.dk>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: battery switch-over detection on pcf2127

On 05/05/2020 23:01:19+0200, Rasmus Villemoes wrote:
> Thanks for the quick replies, both. Unfortunately, being able to read BF
> from linux is not relevant to us - all the handling happens early in the
> bootloader (including clearing BF, so that we can detect that the
> previous boot failed only because of power fail - hence whether the
> linux driver clears BF or not is not relevant). We really just want
> linux to not touch the bits in CTRL3 at all.
> 

Well, in that case, Linux doesn't touch the BF bit anymore unless
userspace uses the ioctls so you should be ok using it from your
bootloader.

> Hm, wait. Re-reading the above suggests that BF can get set even if BTSE
> is not, and a quick experiment shows that is true - I must have misread
> the data sheet. While I think that's fine for now (currently I only
> print the time of last switch-over as a diagnostic), I did have some use
> case in mind for comparing that timestamp to the current time and make
> decisions based on that. But until I figure out exactly what I want to
> use it for, and until we actually upgrade to 5.4+, there's no rush.
> 

Configuring the timestamps is something else I want to do but I still
didn't finish to design the proper interface.

It is definitively on the todo list.

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