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: Mon, 10 Jun 2024 21:25:44 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Zhenze Zhuang <luuiiruo@....com>
Cc: linux-kernel@...r.kernel.org, Zhenze Zhuang <luuiiruo@....com>
Subject: Re: [PATCH] genirq: Fix gpio irq will fail to be resend under
 certain conditions

Zhenze!

On Sun, Jun 09 2024 at 00:36, Zhenze Zhuang wrote:

This has nothing to do with GPIO interrupts. It's a general problem
vs. resend, no?

> When a gpio irq is disable and the wakeup function is enable, and
> the device enters suspend, the irq wakeup is triggered but then enters
> suspend, the IRQS_REPLAY flag will be set, but the IRQS_REPLAY will
> not be cleared because the irq_may_run() condition is not met. After
> the gpio irq is enabled and the suspend is entered again, after the
> gpio irq is triggered, the check_irq_resend() execution will fail
> because the IRQS_REPLAY is asserted, resulting in the interrupt not
> being resned.

The concept of separate sentences and paragrahs exists for a reason.

  https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#changelog

No let me break that world salad apart and digest it.

> When a gpio irq is disable and the wakeup function is enable, and
> the device enters suspend, the irq wakeup is triggered but then enters
> suspend, the IRQS_REPLAY flag will be set, but the IRQS_REPLAY will
> not be cleared because the irq_may_run() condition is not met.

So what you are saying is:

An interrupt is disabled, but the wakeup function of the interrupt is
enabled, right?

Now the system enters suspend and the interrupt is raised, which
triggers the wakeup function, right?

Now the system enters suspend nevertheless. How can that happen?

Due to that the IRQS_REPLAY flag will be set. How so? IRQS_REPLAY is
only set from the resend function.

Due to that IRQS_REPLAY will not be cleared because the irq_may_run()
condition is not cleared. Sure, but how does any of this happen in the
first place?

> After the gpio irq is enabled and the suspend is entered again, after
> the gpio irq is triggered, the check_irq_resend() execution will fail
> because the IRQS_REPLAY is asserted, resulting in the interrupt not
> being resned.

This sentence really makes my brain go in circles. None of this change
log makes any sense.

Before you send me a decipherable description of the problem, let me ask
you a few obvious questions:

  1) Why is the interrupt disabled _and_ marked as wakeup interrupt?

  2) If it should still wakeup the system even if disabled, then the
     interrupt chip should have the IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND
     flag set. That's not the case, right?

Thanks,

        tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ