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:   Mon, 17 Jul 2023 22:05:56 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Samuel Holland <samuel.holland@...ive.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Laxman Dewangan <ldewangan@...dia.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regmap-irq: Set IRQCHIP_MASK_ON_SUSPEND if no wake_base

On Mon, Jul 17, 2023 at 02:54:18PM -0500, Samuel Holland wrote:

> The current problem is that if wakeup is enabled for any IRQ in the chip
> (say, the PMIC's power button), then we enable wakeup for the parent IRQ,
> and now suddenly all (enabled) IRQs on the PMIC are also inadvertently
> wakeup-enabled.

Yeah, I can see the issue.

> But I realize this patch does not actually solve the issue, for a couple
> of reasons:
> 1) regmap-irq does not implement .irq_mask, just .irq_disable.

It's possible we're doing the wrong thing here?  It's been a decade or
something since I wrote this code.

> 2) The __disable_irq() call in suspend_device_irq() should be sufficient,
>    except that we fail the irq_settings_is_nested_thread() check in
>    suspend_device_irqs().

> So maybe the real issue is that commit 3c646f2c6aa9 ("genirq: Don't
> suspend nested_thread irqs over system suspend") missed the case where
> the child IRQ should be suspended, but the parent IRQ should not.

> If that is fixed, then suspend_device_irq() should do the right thing
> without any changes to the regmap-irq code.

> Sorry for the noise.

No worries, I can see the logic and it feels like there might be
something to look at here, I'm just not sure that's it.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ