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] [thread-next>] [day] [month] [year] [list]
Message-ID: <56EFE583.6000807@osg.samsung.com>
Date:	Mon, 21 Mar 2016 09:13:55 -0300
From:	Javier Martinez Canillas <javier@....samsung.com>
To:	Mark Brown <broonie@...nel.org>
Cc:	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Liam Girdwood <lgirdwood@...il.com>,
	Bjorn Andersson <bjorn.andersson@...ymobile.com>
Subject: Re: [PATCH] regulator: Lookup unresolved parent supplies before
 regulators cleanup

[adding Bjorn Andersson who is the author of commit 6261b06de565]

Hello Mark,

Thanks a lot for your feedback.

On 03/21/2016 08:11 AM, Mark Brown wrote:
> On Sun, Mar 20, 2016 at 11:39:46PM -0300, Javier Martinez Canillas wrote:
> 
>> Unfortunately, that changed the behavior of the regulator core since now a
>> parent supply with a child regulator marked as always-on, won't be enabled
>> unless a client driver attempts to get the child regulator during boot.
> 
>> This patch makes the unresolved parent supplies to be looked up before the
>> regulators late cleanup, so those with a child marked as always on will be
>> enabled regardless if a driver attempted to get the child regulator or not.
> 
> This doesn't make much sense to me as a fix - it feels like we're doing
> a fragile hack.  Surely it's better to do this as we register the
> devices, that way we're also protected against any similar issues with

Sorry, not sure if I understood correctly. You mean to do it when the
drivers register the regulators, so at regulator_register() ?

That's basically what was done before Bjorn's patch but that doesn't
handle the case of out of order registration when having circular
dependencies between regulators.

> this that might occur after late probe if things are built modular?  Or

Someone told me once that modules are always a special case :)

> is there a strong reason for doing this only at late_initcall?
> 

The reason why I did in late_initcall / regulator_init_complete is that
the problem for me is that unused regulators are disabled on cleanup but
parents whose childrens are marked as always on should be keep enabled.

But these are disabled anyways just because the regulator core didn't know
about that dependency. So doing it before the late cleanup sounded like a
good solution for me.

Now if you think that's a hack and have another approach in mind, then I'll
gladly try to implement it instead, if you could please elaborate on that.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ