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  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:   Sat, 16 May 2020 11:41:30 +0200
From:   Linus Walleij <>
To:     Bartosz Golaszewski <>
Cc:     Geert Uytterhoeven <>,
        linux-gpio <>,
        LKML <>
Subject: Re: [PATCH] gpiolib: Document that GPIO line names are not globally unique

On Tue, May 12, 2020 at 12:43 PM Bartosz Golaszewski
<> wrote:
> pon., 11 maj 2020 o 12:18 Geert Uytterhoeven <>
> napisaƂ(a):
> >
> > gpiochip_set_desc_names() no longer rejects GPIO line name collisions.
> > Hence GPIO line names are not guaranteed to be globally unique.
> > In case of multiple GPIO lines with the same name, gpio_name_to_desc()
> > will return the first match found.
> This makes me wonder whether I should do something about this in
> libgpiod? Looks to me like gpiod_chip_find_line() and the global
> gpiod_line_find() are no longer reliable and should probably return
> all lines whose names match.

Hm. You probably know how consumers of libgpiod work better than me.

The background is historical and this happens because gpiolib had a
mechanism to name lines before I even took over maintenance, and
that did not require line names to be unique. So
when I created the character device I had to face the fact.

We also had to deal with the fact that when naming lines, the
"NULL alternative" (no name on the line at all) is always a valid

And all lines named NULL are still valid and all have the same name

Linus Walleij

Powered by blists - more mailing lists