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: <CACRpkdb6AH6RGDenAXTofwTRvZcJp1cg6gXxC26MuXL7EPDtwg@mail.gmail.com>
Date:   Wed, 9 Dec 2020 10:25:01 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Marc Zyngier <maz@...nel.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
Cc:     linux-usb <linux-usb@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Johan Hovold <johan@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        kernel-team@...roid.com
Subject: Re: [PATCH 1/4] gpiolib: cdev: Flag invalid GPIOs as used

On Fri, Dec 4, 2020 at 5:47 PM Marc Zyngier <maz@...nel.org> wrote:

> When reporting the state of a GPIO to userspace, we never check
> for the actual validity of the line, meaning we report invalid
> lines as being usable. A subsequent request will fail though,
> which is an inconsistent behaviour from a userspace perspective.
>
> Instead, let's check for the validity of the line and report it
> as used if it is invalid. This allows a tool such as gpioinfo
> to report something sensible:
>
> gpiochip3 - 4 lines:
>         line   0:      unnamed       unused   input  active-high
>         line   1:      unnamed       kernel   input  active-high [used]
>         line   2:      unnamed       kernel   input  active-high [used]
>         line   3:      unnamed       unused   input  active-high
>
> In this example, lines 1 and 2 are invalid, and cannot be used by
> userspace.
>
> Signed-off-by: Marc Zyngier <maz@...nel.org>

This makes sense, so patch applied (unless Bartosz tells me
otherwise, then I'll pull it out again).

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ