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: <CAMbhsRRyEa-dCnVQg5bDFFC3O6Zyz_YXAH05-Ju49Ug2V_fvxw@mail.gmail.com>
Date:	Mon, 10 Jun 2013 14:25:20 -0700
From:	Colin Cross <ccross@...roid.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Zoran Markovic <zoran.markovic@...aro.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	lkml <linux-kernel@...r.kernel.org>,
	Linux PM list <linux-pm@...r.kernel.org>,
	Benoit Goby <benoit@...roid.com>,
	Android Kernel Team <kernel-team@...roid.com>,
	Todd Poynor <toddpoynor@...gle.com>,
	San Mehat <san@...gle.com>,
	John Stultz <john.stultz@...aro.org>,
	Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [RFC PATCHv2 1/2] drivers: power: Add watchdog timer to catch
 drivers which lockup during suspend/resume.

On Thu, Jun 6, 2013 at 7:12 AM, Alan Stern <stern@...land.harvard.edu> wrote:
> On Wed, 5 Jun 2013, Zoran Markovic wrote:
>
>> > It does block in my environment, AFAICS. Looking a bit further in the
>> > code, it looks like dpm_suspend() does an async_synchronize_full()
>> > which would wait for all async tasks to complete. This is a
>> > show-stopper because (under the circumstances) the assumption that
>> > every async suspend routine eventually completes doesn't hold.
>> >
>> > We could possibly select which async tasks to wait for, but this would
>> > add unnecessary complexity to a feature targeted for debugging. It
>> > seems that this approach - although sounding reasonable - needs to
>> > wait until we have a mechanism to cancel an async task.
>>
>> Looks like the implementation of proposal for an async suspend +
>> wait_for_completion_timeout is quite complex due to above limitations.
>> How do we proceed from here? We have the following options:
>> 1. Give up on the idea of having a suspend/resume watchdog.
>> 2. Use the timer implementation (with possible modifications).
>> 3. Wait for the implementation of (or implement) killing of an already
>> running async work.
>>
>> Are there any other ideas floating around?
>
> In general, the kernel is not designed to operate when kernel threads
> get killed at random times.  It's also not designed to operate normally
> while in the middle of a system suspend.
>
> This means there is basically no hope of recovering from a hung async
> suspend task.  (In much the same way, there is no hope of recovering
> from any hung kernel thread.)  The best you can accomplish is to store
> some useful information somewhere and either panic or force a reboot.
>
> Given that the usual storage media may be inaccessible, it may not be
> easy to find a place to store the information.
>
> (By the way, what do you do if a _synchronous_ suspend routine hangs?
> The two problems are fairly similar.)

This is why the original patch dumped a stack trace of the offending
task and panic'd.  There is nothing else useful you can do.
--
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