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:   Tue, 16 Jun 2020 13:57:41 +0200
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     Pavel Machek <pavel@....cz>
Cc:     "Andrew F. Davis" <afd@...com>, Pali Roh??r <pali@...nel.org>,
        Sebastian Reichel <sre@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...ceq.com>,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/2] power: supply: bq27xxx_battery: Notify about all
 battery changes

On Tue, Jun 16, 2020 at 12:52:24PM +0200, Pavel Machek wrote:
> On Tue 2020-05-26 21:24:39, Andrew F. Davis wrote:
> > On 5/25/20 10:11 AM, Krzysztof Kozlowski wrote:
> > > All battery related data could be important for user-space.  For example
> > > time-to-full could be shown to user on the screen or health could be
> > > monitored for any issues.  Instead of comparing few selected old/new
> > > values, just check if anything changed in the cache.
> > > 
> > 
> > 
> > At least some value will change every time we poll the battery, are we
> > okay with having power_supply_changed() called every time?
> 
> I believe that's very bad idea. AFAICT that would wake up userspace every
> 5 seconds, eating power in unexpected way, and without easy ability of opting
> out. IOW a regression.

It won't be 5 seconds but poll_interval which is 360 seconds by default.
It can be 5 seconds if user-space changes this time or if user-space
keeps asking for get_property. In first case: user-space kind of decided
about it... In second: user-space is already woken-up since it polls get
properties.

However I understand that this is quite intrusive change and maybe in
such case user-space should just keep polling (if it wants all data to
be provided every n-seconds).

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ