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: <20240223161559.GI1666215@google.com>
Date: Fri, 23 Feb 2024 16:15:59 +0000
From: Lee Jones <lee@...nel.org>
To: Ondřej Jirman <megi@....cz>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH] mfd: rk8xx-core: Fix interrupt processing order
 for power key button

On Sat, 17 Feb 2024, Ondřej Jirman wrote:

> From: Ondrej Jirman <megi@....cz>
> 
> Process rise event last, to avoid stuck keys when multiple interrupts
> are coalesced. This can happen typically when resuming from suspend
> via power key press and holding the power button for a bit too short,
> so that RISE an FALL IRQ flags are set before any interrupt routine
> has a chance to run.
> 
> Input subsystem will interpret it as holding down a power key for
> a long time, which leads to unintended initiation of shutdown UI
> on some OSes.
> 
> Signed-off-by: Ondrej Jirman <megi@....cz>
> ---
> Sorry, resent without the bogous patch series numbering.
> 
>  drivers/mfd/rk8xx-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c
> index b1ffc3b9e2be..e2261b68b844 100644
> --- a/drivers/mfd/rk8xx-core.c
> +++ b/drivers/mfd/rk8xx-core.c
> @@ -43,8 +43,8 @@ static struct resource rk806_pwrkey_resources[] = {
>  };
>  
>  static const struct resource rk817_pwrkey_resources[] = {
> -	DEFINE_RES_IRQ(RK817_IRQ_PWRON_RISE),
>  	DEFINE_RES_IRQ(RK817_IRQ_PWRON_FALL),
> +	DEFINE_RES_IRQ(RK817_IRQ_PWRON_RISE),

FWIW, basing solutions on ordering like this is often fragile!

>  };
>  
>  static const struct resource rk817_charger_resources[] = {
> -- 
> 2.43.0
> 

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ