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]
Date:   Wed, 5 Dec 2018 15:30:22 +0100
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Charles Keepax <ckeepax@...nsource.cirrus.com>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH 00/13 v2] Regulator ena_gpiod fixups

Hi Linus,

On 2018-12-04 13:44, Linus Walleij wrote:
> On Tue, Dec 4, 2018 at 11:33 AM Marek Szyprowski
> <m.szyprowski@...sung.com> wrote:
>
>>>> Artik5 evaluation board (arch/arm/boot/dts/exynos3250-artik5-eval.dtb):
>>>> s2mps11-pmic s2mps14-regulator: Failed to get control GPIO for 11/LDO12
>>> Question: this is supposed to fail, right? It is something
>>> like a probe deferral or nonexisting GPIO controller?
>> It looks that the issue has been introduced earlier, but I didn't notice it.
> Sorry :(
>
>> gpiod_get_from_of_node() doesn't handle GPIOD_FLAGS_BIT_NONEXCLUSIVE
>> flag, the rest is just a result of it.
> OK I see.
>
>> Here we have a case, where 2 regulators provided by s2mps11 driver have
>> a common gpio enable line (by PMIC design), so s2mps11 calls
>> devm_gpiod_get_from_of_node() 2 times for exactly the same gpio descriptor.
>>
>> Fixing gpiod_get_from_of_node() for GPIOD_FLAGS_BIT_NONEXCLUSIVE is trivial:
> I will add a patch like this to the series!
>
>> With the above fix I still however get 2 warnings from devres functions,
>> but this is probably caused by adding the same entry 2 times to the list
>> without proper refcounting... I will check that later.
> Ah I see this regulator driver really excercise all corner cases of
> these nonexclusive GPIO lines. (Which is good!)
>
> Indeed devres is not going to like adding the same thing twice.
>
> I just sent a fix for that, subject:
> "gpio: devres: Handle nonexclusive GPIOs"
> you could perhaps try it on top of this
> series? I intend to merge that separately as a fix for current,
> as it is a bug.

Those 2 warnings were worrying me and I finally found! devres_*
functions require to pass a pointer to the pointer as match_data, so
desc must be passed as &desc to devres_find() and devres_destroy()
functions, otherwise they always return -ENOENT. I will comment
respective lines in your patches then.


Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ