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]
Date:   Tue, 7 Jul 2020 14:22:21 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Paul Cercueil <paul@...pouillou.net>
Cc:     od@...c.me,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        stable <stable@...r.kernel.org>,
        João Henrique <johnnyonflame@...mail.com>
Subject: Re: [PATCH 1/2] pinctrl: ingenic: Enhance support for IRQ_TYPE_EDGE_BOTH

On Mon, Jun 22, 2020 at 11:46 PM Paul Cercueil <paul@...pouillou.net> wrote:

> Ingenic SoCs don't natively support registering an interrupt for both
> rising and falling edges. This has to be emulated in software.
>
> Until now, this was emulated by switching back and forth between
> IRQ_TYPE_EDGE_RISING and IRQ_TYPE_EDGE_FALLING according to the level of
> the GPIO. While this worked most of the time, when used with GPIOs that
> need debouncing, some events would be lost. For instance, between the
> time a falling-edge interrupt happens and the interrupt handler
> configures the hardware for rising-edge, the level of the pin may have
> already risen, and the rising-edge event is lost.
>
> To address that issue, instead of switching back and forth between
> IRQ_TYPE_EDGE_RISING and IRQ_TYPE_EDGE_FALLING, we now switch back and
> forth between IRQ_TYPE_LEVEL_LOW and IRQ_TYPE_LEVEL_HIGH. Since we
> always switch in the interrupt handler, they actually permit to detect
> level changes. In the example above, if the pin level rises before
> switching the IRQ type from IRQ_TYPE_LEVEL_LOW to IRQ_TYPE_LEVEL_HIGH,
> a new interrupt will raise as soon as the handler exits, and the
> rising-edge event will be properly detected.
>
> Cc: stable@...r.kernel.org
> Fixes: e72394e2ea19 ("pinctrl: ingenic: Merge GPIO functionality")
> Reported-by: João Henrique <johnnyonflame@...mail.com>
> Tested-by: João Henrique <johnnyonflame@...mail.com>
> Signed-off-by: Paul Cercueil <paul@...pouillou.net>

I have applied these two as non-urgent fixes for v5.9.

Are they urgent?
Are they causing regressions?
Tell me if they need to be merged to v5.8-rcs.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ