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, 21 Jan 2013 15:57:18 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Ivan Khoronzhuk <ivan.khoronzhuk@...com>
Cc:	linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
	Bengt Jonsson <bengt.g.jonsson@...ricsson.com>,
	NeilBrown <neilb@...e.de>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Bill Pemberton <wfp5p@...ginia.edu>
Subject: Re: [RFC PATCH] Input: gpio_keys: Fix suspend/resume press event lost

Hi Ivan,

On Mon, Jan 21, 2013 at 03:15:14PM +0200, Ivan Khoronzhuk wrote:
> Rebased on linux_omap/master.
> 
> During suspend/resume the key press can be lost if time of resume
> sequence is significant.
> 
> If press event cannot be remembered then the driver can read the
> current button state only in time of interrupt handling. But in some
> cases when time between IRQ and IRQ handler is significant we can
> read incorrect state. As a particular case, when device is in suspend
> we press wakupable key and up it back in a jiffy, the interrupt
> handler read the state of up but the interrupt source is press indeed.
> As a result, in a OS like android, we resume then suspend right away
> because the key state is not changed.
> 
> This patch add to gpio_keys framework opportunity to recover lost of
> press key event at resuming. The variable "key_pressed" from
> gpio_button_data structure is not used for gpio keys, it is only used
> for gpio irq keys, so it is logically used to remember press lost
> while resuming.

The same could happen if you delay processing of interrupt long enough
during normal operation. If key is released by the time you get around
to reading it you will not see a key press.

To me this sounds like you need to speed up your resume process so that
you can start serving interrupts quicker.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ