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: <176062495388.120857.13832123622797460794.b4-ty@linaro.org>
Date: Thu, 16 Oct 2025 16:30:21 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>,
	linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Francesco Lavra <flavra@...libre.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH] gpio: pca953x: enable latch only on edge-triggered inputs

From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>


On Wed, 08 Oct 2025 12:43:09 +0200, Francesco Lavra wrote:
> The latched input feature of the pca953x GPIO controller is useful
> when an input is configured to trigger interrupts on rising or
> falling edges, because it allows retrieving which edge type caused
> a given interrupt even if the pin state changes again before the
> interrupt handler has a chance to run. But for level-triggered
> interrupts, reading the latched input state can cause an active
> interrupt condition to be missed, e.g. if an active-low signal (for
> which an IRQ_TYPE_LEVEL_LOW interrupt has been configured) triggers
> an interrupt when switching to the inactive state, but then becomes
> active again before the interrupt handler has a chance to run: in
> this case, if the interrupt handler reads the latched input state,
> it will wrongly assume that the interrupt is not pending.
> Fix the above issue by enabling the latch only on edge-triggered
> inputs, instead of all interrupt-enabled inputs.
> 
> [...]

Due to the potential impact, I will not send it for fixes just yet but
I'm willing to give it a spin in linux-next and see if anyone complains.

I've queued it for v6.19.

[1/1] gpio: pca953x: enable latch only on edge-triggered inputs
      https://git.kernel.org/brgl/linux/c/9f0fa1801fe4503eb119a4523a59a494768fda5d

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ