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: <5c9761d5a6a14d4c250df6cc4201bca72d963133.camel@pengutronix.de>
Date: Wed, 22 Oct 2025 11:07:48 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Bartosz Golaszewski <brgl@...ev.pl>, Wolfram Sang
	 <wsa+renesas@...g-engineering.com>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>, 
	linux-renesas-soc@...r.kernel.org, Kuninori Morimoto
	 <kuninori.morimoto.gx@...esas.com>, Krzysztof Kozlowski
	 <krzysztof.kozlowski@...aro.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] reset: always include RESET_GPIO driver if
 possible

On Fr, 2025-10-17 at 19:02 +0200, Bartosz Golaszewski wrote:
> On Fri, Oct 17, 2025 at 1:25 PM Wolfram Sang
> <wsa+renesas@...g-engineering.com> wrote:
> > 
> > 
> > > > I think the fallback mechanism of the core should work without any
> > > > module loading infrastructure. It should be there whenever possible.
> > > > 
> > > 
> > > It's not really a fallback, is it? This is the path we'll always take
> > > if the driver requests a reset control on a firmware node which has a
> > > reset-gpios property. If the driver goes with the gpiod API, it will
> > > get a regular descriptor. It's deterministic enough to not warrant the
> > > term "fallback".
> > 
> > I dunno for how many drivers this is really applicable, but I really
> > liked the cleanup of the pca954x driver.

That cleanup might have been a little premature, given that the reset-
gpio driver currently only works on OF-based platforms, and even there
only with gpio controllers with #gpio-cells = <2>.

> >  Don't handle GPIOs internally,
> > just get a reset, and it might be a GPIO. I think it is very useful and
> > I would like to see it wherever possible.
> > 
> > We could now make these drivers depend on RESET_GPIO. This would make
> > sense in a way but is uncomfortable for the user who has not RESET_GPIO
> > enabled before. The driver would just disappear because of unmet
> > dependencies. Yes, this can happen all the time because we always find
> > new dependencies and describe them. I just hoped it could be avoided in
> > this case.

How about selecting RESET_GPIO from I2C_MUX_PCA954x? It already depends
on GPIOLIB. Although I don't like the idea of drivers being converted
en masse, all selecting RESET_GPIO ...

> > 
> > > Then I believe the platform's config should make sure the driver is
> > > built-in. I don't think it makes sense to just cram it into the kernel
> > > image for the few users it currently has.
> > 
> > For Morimoto-san, the PCA954x update resulted in a regression. It is
> > worth thinking how to avoid that. The driver is so small, I wouldn't
> > mind the extra space if it saves users from disappearing devices. But
> > mileages vary...
> > 
> 
> It's up to Philipp but I'd personally go with "default m if GPIOLIB".

To be honest, I don't like either very much.

Yes, the reset-gpio driver is only about three pages in size, but
force-enabling it for nearly everyone, just because some hardware
designs like to share resets a little too much, feels wrong to me,
especially in its current state.

And just default-enabling it doesn't solve the regression problem when
updating preexisting configs.

regards
Philipp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ