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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1006212207410.19813-100000@netrider.rowland.org>
Date:	Mon, 21 Jun 2010 22:24:50 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	markgross@...gnar.org
cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	Linux-pm mailing list <linux-pm@...ts.linux-foundation.org>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Arve Hjønnevåg <arve@...roid.com>,
	Neil Brown <neilb@...e.de>, mark gross <640e9920@...il.com>
Subject: Re: [RFC][PATCH] PM: Avoid losing wakeup events during suspend

On Mon, 21 Jun 2010, mark gross wrote:

> On Mon, Jun 21, 2010 at 12:01:09PM -0400, Alan Stern wrote:
> > On Sun, 20 Jun 2010, mark gross wrote:
> > 
> > > Your confused about what problem this patch attempts to solve.
> > 
> > I don't think so.  Rafael's description was pretty clear.
> 
> Then how is it you don't understand the fact that Rafael's patch is to
> solve the wake event notification suspend race and not block opertunistic
> suspends or kernel critical sections where suspending should be disabled?

I don't know what gave you the idea that I think Rafael's patch is 
meant to block kernel critical sections.  I certainly don't think that.

However leaving that aside, the rest of the above is just two different
ways of saying the same thing:

	Wakeup events should cause suspend to be disabled until the
	events are processed.

	Arrival of wakeup events races with initiation of system 
	suspend (whether opportunistic or not).

Therefore blocking suspends when they ought to be disabled requires us 
to solve the wake event/suspend race.  You can't do one without doing 
the other.

> > >  There is
> > > a pm_qos patch in the works to address the suspend blocker
> > > functionality.
> > > http://lists.linux-foundation.org/pipermail/linux-pm/2010-June/026760.html
> > 
> > No.  That patch addresses something _similar_ to the suspend blocker
> > functionality.  The fact remains, though, that pm_qos is not used
> > during system suspend (the /sys/power/state interface), hence changes
> > to pm_qos won't solve the system-suspend problems that suspend blockers 
> > do solve.
> 
> You keep saying they solve something, I keep wondering what you are
> talking aobut.
> Lets see what problems it solves:
> * implements oppertunistic suspending (this is a feature not a problem)
> * enables kernel critical sections blocking suspending.
> * requiers overlapping application specific critcal sections from ISR
> into user mode to make implementation correct.
> * exposes a user mode interface to set a critical section.
> * reduces races between wake events (or suspend blocking events) but I'm
> not convinced it solves them. 

The last item on your list is what I meant.  The others are not 
problems solved by suspend blockers.  Well, maybe the second is, but I 
don't know of any kernel critical sections that need to block suspend 
other than those caused by wakeup events.

I agree with you that bundling opportunistic suspend and the user mode 
interface together with suspend blockers made the situation more 
difficult by mixing up the important issues.

> suspend blockers provide a way to block oppertunistic suspending, wich
> I'll have you know, is a pain to get working right and the enabling from
> device to device is not very portable and *that* doesn't say good things
> about the scheme.

The real problem with the scheme is to define which events should count
as "wakeup" events and to determine when they have been fully handled.  
I can see that these might well vary from one platform to another.  
(Maybe that's what you mean by saying the enabling is not very
portable.)  But these issues are unavoidable; any scheme will have to
address them.

Alan Stern

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