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: <CACRpkdZEu44WHScd5VibYT5C9RikqcvKsgpVOpkkdrYbLaV8Ng@mail.gmail.com>
Date:   Fri, 23 Nov 2018 10:40:57 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc:     Mark Brown <broonie@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        patches@...nsource.cirrus.com
Subject: Re: [PATCH 3/3] gpio: Add reference counting for non-exclusive GPIOs

On Thu, Nov 22, 2018 at 6:30 PM Charles Keepax
<ckeepax@...nsource.cirrus.com> wrote:

> Currently, a GPIO can be requested multiple times when the
> NONEXCLUSIVE flag is set, however it must still be freed a single
> time. This makes client code rather complex, since multiple drivers
> may request the GPIO but only a single one can free it. Rather than
> manually handling this in each driver add some basic reference
> counting into the core.  Currently, this is fairly primitive but
> so is the support for the NONEXCLUSIVE flag and the implementation
> covers those use-cases.
>
> Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
> Signed-off-by: Charles Keepax <ckeepax@...nsource.cirrus.com>

This patch is not fixing anything right now, correct?

I discussed the notion of pulling reference counting for
nonexclusive GPIOs into gpiolib with Mark but the benefit is
a bit unclear: if the subsystem using nonexeclusive GPIOs
(currently only regulators) would still have to keep its own
reference count or somehow semantically know when
the last user is gone, the point is kind of moot.

I haven't looked closely at the regulators case but I got
the impression that it is more complex than just reference
counting so, currently I don't know if this is such a good
idea.

Anyway I would like to push this until we have cleaned
up with the rest of the series I have boiling, if you don't
mind.

(Patch 1+2 should be fine anyway.)

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ