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:	Fri, 27 Feb 2009 08:49:40 +1100
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Arve Hjønnevåg <arve@...roid.com>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>, Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	pm list <linux-pm@...ts.linux-foundation.org>,
	Len Brown <lenb@...nel.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC][PATCH 2/2] PM: Rework handling of interrupts during 
 suspend-resume

On Thu, 2009-02-26 at 13:20 -0800, Arve Hjønnevåg wrote:
> On Thu, Feb 26, 2009 at 12:57 PM, Benjamin Herrenschmidt
> <benh@...nel.crashing.org> wrote:
> > On Thu, 2009-02-26 at 12:34 -0800, Arve Hjønnevåg wrote:
> >> That is enough for drivers that use wakelocks to abort suspend (if I
> >> fix the wakelock code to not use a platform device as its last abort
> >> point). It is not enough if you don't have wakelocks, since the
> >> interrupt can occur after suspend_late has been called and the driver
> >> has no way to abort suspend.
> >>
> > I still don't quite see how you deal with the race anyway. Ie. Even
> > without Rafael patch, what if the interrupt occurs after your sysdev
> > suspend ?
> 
> After local_irq_disable has been called, the interrupt will no longer
> be cleared by Linux when it occurs. This means that is still pending
> when you get to the low level suspend code which will prevent suspend.

Ok so you want this interrupt to stay pending at the PIC level ? So just
marking it so the kernel doesn't disable it should do the trick.

> > In general, unless they are level sensitive, wakeup interrupts tend to
> > always be somewhat racy.
> 
> They don't have to be. If you have a separate hardware component that
> tracks wakeup interrupts, you need to start this before you stop the
> main interrupt controller. If any interrupts are pending at this time
> you abort suspend. After a wakeup you do the reverse.

Right but then you can start this earlier and there is no problem. But
if you do want the interrupt to remaining pending in the PIC, then you
probably need to set that magic flag so we don't disable it, that should
do the trick just fine no ?

It's hard to tell without more detailed HW specs of course...

Ben.


--
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