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] [day] [month] [year] [list]
Message-ID: <7a35f0b5-5cb3-4ab1-81b5-394d2b794f77@bootlin.com>
Date: Fri, 3 Oct 2025 16:30:04 +0200
From: Thomas Richard <thomas.richard@...tlin.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Linus Walleij <linus.walleij@...aro.org>,
 Bartosz Golaszewski <brgl@...ev.pl>,
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
 Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
 linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
 kernel test robot <oliver.sang@...el.com>
Subject: Re: [PATCH] gpio: aggregator: restore the set_config operation

On 10/3/25 3:59 PM, Thomas Richard wrote:
>>
>> Is there any specific reason why you are doing this unconditionally,
>> instead of only when any of its parents support .set_config(), like
>> was done before?
>>
> My idea was: it will be handled by the core, so the if statement is not
> needed. But if we conditionally add the operation we can save some time
> in case there is no chip supporting set_config().

I just remembered the true reason why I'm doing this unconditionally.

The user of the forwarder can override GPIO operations like I do in the
pinctrl-upboard driver [1].
And now we can add/remove GPIO desc at runtime, if set_config() is set
conditionally in gpiochip_fwd_desc_add() it will override the custom
set_config() operation.
So the only solution is to set the set_config() operation
unconditionally in devm_gpiochip_fwd_alloc().

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pinctrl/pinctrl-upboard.c#n1044

Thomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ