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, 31 Jan 2024 21:29:23 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Kent Gibson <warthog618@...il.com>, Alex Elder <elder@...aro.org>, 
	Geert Uytterhoeven <geert+renesas@...der.be>, "Paul E . McKenney" <paulmck@...nel.org>, 
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Wolfram Sang <wsa@...-dreams.de>, 
	linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH 22/22] gpio: mark unsafe gpio_chip manipulators as deprecated

On Tue, Jan 30, 2024 at 1:49 PM Bartosz Golaszewski <brgl@...ev.pl> wrote:

> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> We still have some functions that return the address of the GPIO chip
> associated with the GPIO device. This is dangerous and the users should
> find a better solution. Let's add appropriate comments to the kernel
> docs.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>

I'm not sure it's very easy to find a better solution for gpiod_to_chip(),
but perhaps also add this as a work item to the TODO file? We can certainly
try to get rid of <linux/gpio.h> before we need to look into fixing this...

gpiod_device_get_label() should be easy to fix:
linus@...o:~/linux$ git grep gpio_device_get_label
drivers/gpio/gpiolib.c: * gpio_device_get_label() - Get the label of
this GPIO device
drivers/gpio/gpiolib.c:const char *gpio_device_get_label(struct
gpio_device *gdev)
drivers/gpio/gpiolib.c:EXPORT_SYMBOL(gpio_device_get_label);
drivers/pinctrl/core.c:                            gpio_device_get_label(gdev));
include/linux/gpio/driver.h:const char *gpio_device_get_label(struct
gpio_device *gdev);

We only created that problem for ourselves... It should be removed
from <linux/gpio/driver.h>.

Anyway:
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