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-next>] [day] [month] [year] [list]
Message-ID: <18366.69939.qm@web180315.mail.gq1.yahoo.com>
Date:	Sat, 26 Jun 2010 09:54:00 -0700 (PDT)
From:	David Brownell <david-b@...bell.net>
To:	linux-pm@...ts.linux-foundation.org,
	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	mark gross <640e9920@...il.com>, Neil Brown <neilb@...e.de>,
	linux-pci@...r.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Arve@...p1.linux-foundation.org,
	Florian Mickler <florian@...kler.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>
Subject: Re: [linux-pm] [PATCH] PM: Make it possible to avoid wakeup events from being lost

This is a repeat of an issue I posted before, but
which for some reason I never saw email back ...

basically, I think the notion of counting wakeup
events seems dubious on common hardware, so the
focus might perhaps better be placed on ensuring
userspace just receives events rather than
trying to track events which in one context ended
up being wakeup events.  (That's simpler, and the
system is by definition awake if it can handle any
events at all.)

Thing is, "wakeup" is, for e.g. most ARMs, just a hardware attribute of what's otherwise a routine
event, which happens in other contexts and needs
to be handled consistently .... nothing special
about having woken the system too, the result ought to
be the same regardless (from the user P.O.V.) ...  (Common Examples include SoC peripheral IRQs that can wake the system (including GPIO and other types
of external IRQ signal.)

BRIEFLY:  if that event doesn't arrive reliably,
it's an issue regardless of wakeup:  either TX from
kernel, or RX in userspace. Such bugs would need to
be fixed.  Having them fixed will help the wakeup scenarios too of course.

(The raciness issues might boil down to something as simple as not letting userspace know about transition events to/from suspend states, but that issue
ought to be cleanly separable; ISTR other messages on the suspend blocker threads have shown how to work with such clean factoring.)



So trying to track whether a given event is what
woke the system will often be implausible, since
several such events might each have fired (one
or more concurrent wakeup sources, even ... it
could be indeterminate which one[s] happened.)
And the event could fire without being a wakeup.

Yes, there are a few cases (like USB remote wakeup
signaling and some PCI mechanisms, plus a few BIOS
assisted situations) where certain events may be
identifiable as wakeup sources, perhaps runtime not
system-wide).  But the common case just includes
an event, not the ability to know that event had
the "woke whole system from low power state"
side effect too.




> +        The
> /sys/power/wakeup_count file allows user space to avoid
> +        losing wakeup events
> when transitioning the system into a sleep
> +        state.  Reading
> from it returns the current number of registered
> +        wakeup events and it
> blocks if some wakeup events are being
> +        processed at the
> time the file is read from. 


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