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: <CACRpkdb-=brQmJT9oUwD1bqNLGHX9i+4LSuR4_Vi6BtKgaRKqQ@mail.gmail.com>
Date:	Fri, 30 Jan 2015 10:39:56 +0100
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Doug Anderson <dianders@...omium.org>
Cc:	Heiko Stuebner <heiko@...ech.de>,
	Jeffy Chen <jeffy.chen@...k-chips.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: rockchip: Only mask interrupts; never disable

On Mon, Jan 26, 2015 at 5:24 PM, Doug Anderson <dianders@...omium.org> wrote:

> The Rockchip GPIO interrupt controller totally throws away all status
> about an interrupt when you "disable" the interrupt.  That has
> unfortunate consequences in the following situation:
>
> 1. An edge-triggered interrupt is enabled and should wake the system.
> 2. System suspend happens: interrupt is disabled and marked for wake.
> 3. rockchip_irq_suspend() reenables the interrupt so we can wake.
> 4. Interrupt happens when asleep.
> 5. rockchip_irq_resume() redisables the interrupt.
> 6. Disabling the interrupt throws away all status about it.
> 7. Normal system resume happens and we enable the interrupt again,
>    since we threw away status about the interrupt we don't know it
>    fired while suspended.  Even worse: if we need both edges of the
>    interrupt the logic to swap edges never runs.
>
> Note: even if we somehow can post the status about wakeup interrupts
> in rockchip_irq_resume() we would still have a window of losing any
> edges that came in while interrupts were disabled.
>
> If we use mask only then we don't need to worry.  The GPIO Interrupt
> controller keeps track of pending interrupts that are enabled and just
> masked.
>
> There was no real strong reason to support the enable/disable
> functionality (other than that it seemed right), so let's go back to
> just supporting mask/unmask but actually map it to the real
> mask/unmask.  This ends up with slightly different (and more correct)
> behavior than before (f2dd028 pinctrl: rockchip: Fix
> enable/disable/mask/unmask).
>
> Signed-off-by: Doug Anderson <dianders@...omium.org>

Patch applied with Heiko's review tag, but not as a fix at this point,
it will be for v3.20.

Yours,
Linus Walleij
--
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