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:   Sun, 9 Dec 2018 09:44:58 +0100
From:   Pavel Machek <pavel@....cz>
To:     Benson Leung <bleung@...gle.com>
Cc:     Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        linux-pm@...r.kernel.org, sre@...nel.org,
        Sameer Nanda <snanda@...omium.org>, gwendal@...omium.org,
        linux-kernel@...r.kernel.org, groeck@...omium.org,
        Adam.Thomson.Opensource@...semi.com, kernel@...labora.com,
        bleung@...omium.org, "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <len.brown@...el.com>
Subject: Re: [PATCH v2 1/2] power: supply: add input voltage limit property.

Hi!

> On Sat, Dec 01, 2018 at 04:09:34PM +0100, Pavel Machek wrote:
> > > I think that handle this via dt / ACPI is not possible for our use case. It can
> > > be a hardware bug or a hardware/user constrain, let me try to explain better
> > > with an example.
> > > 
> > > On Pixel C's devices, userspace uses this to set a USB input limit of 5V when
> > > the screen is on for thermal reasons, but those go away when the screen is
> > > off/system is sleeping, so we allow 9V and 12V levels when sleeping.
> > 
> > So, on pixel C, what happens if userland ignores the constraint, keeps
> > display on and sets charger to 12V?
> 
> I was the software tech lead for the Google Pixel C and was involved in this
> particular code change in 2015 before the release of the product.
> 
> So there's nothing fundamentally broken about the hardware that would cause
> the Pixel C to malfunction if we were charging at 9V or 12V instead of 5V
> when the screen is on, ie if userspace doesn't change this.
> 
> This is part of the Pixel C's thermal management strategy to effectively
> limit the input power to 5V 3A when the screen is on. When the screen is on,
> the display, the CPU, and the GPU all contribute more heat to the system
> than while the screen is off, and we made a tradeoff to throttle the charger
> in order to give more of the thermal budget to those other components.
> 
> What would happen is that you wouldn't meet Google's skin temperature targets
> on the system if the charger was allowed to run at 9V or 12V with the screen
> on.

So... the system is still guaranteed to work. It may be hot but not
dangerously so, and lifetime of internal components is not going to be
decreased by heat...?

Ok, I guess in such case we can do it from userspace.

> For folks hacking on Pixel Cs (which is now outside of Google's official support
> window for Android) and customizing their own kernel and userspace
> this would be acceptable, but we wanted to expose this feature in the power
> supply properties because the feature does exist in the Emedded Controller
> firmware of the Pixel C and all of Google's Chromebooks with USB-C made since
> 2015 in case someone running an up to date kernel wanted to limit the charging
> power for thermal or other reasons.

Few concerns:

1) You are basically using voltage limit to limit power. We already
have current limits, but what both you and existing user really want
are power limits. Should we have power limit instead? Would be way
more logical.

(If your charger can do 5V 1A, 5V 2.5A, 5V 3A, 9V 1A, you may want to
limit to first two, not first three).

2) Should the policy be based not on "screen is on or off" but on real
temperatures? We already have a thermal framework, and other machines
have "limit charging power when hot" constraints IIRC...

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ