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: <CACRpkdZE2mtOB2BkKudQHq5-=-dyK6S2Se2hXUH+_equXhqwdw@mail.gmail.com>
Date: Tue, 4 Mar 2025 08:55:42 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Matti Vaittinen <mazziesaccount@...il.com>
Cc: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>, Bartosz Golaszewski <brgl@...ev.pl>, 
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Biju Das <biju.das.jz@...renesas.com>, Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCH v2 1/4] gpio: Respect valid_mask when requesting GPIOs

On Fri, Feb 28, 2025 at 1:35 PM Matti Vaittinen
<mazziesaccount@...il.com> wrote:

> When GPIOs were requested the validity of GPIOs were checked only when
> the GPIO-chip had the request -callback populated. This made using
> masked GPIOs possible.
>
> The GPIO chip driver authors may find it difficult to understand the
> relation of enforsing the GPIO validity and the 'request' -callback
> because the current documentation for the 'request' callback does not
> mention this. It only states:
>
>  * @request: optional hook for chip-specific activation, such as
>  *      enabling module power and clock; may sleep
>
> The validity of the GPIO line should be checked whether the driver
> provides the 'request' callback or not.
>
> Unconditionally check the GPIO validity when GPIO is being requested.
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@...il.com>

Good catch!
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ