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]
Date:	Wed, 30 Mar 2011 17:19:54 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	"Rafael J. Wysocki" <rjw@...e.com>
cc:	Jiri Slaby <jirislaby@...il.com>, <akpm@...ux-foundation.org>,
	<linux-kernel@...r.kernel.org>,
	Linux-pm mailing list <linux-pm@...ts.linux-foundation.org>
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Wed, 30 Mar 2011, Rafael J. Wysocki wrote:

> > Rafael, this does seem to be a general problem.  Suppose a new device
> > gets connected while the system is suspended.  How is the driver's
> > probe method supposed to cope if it gets called while userspace is
> > still frozen but it needs to load some firmware?
> > 
> > Is the answer that probing should always be delayed until after tasks
> > are thawed?  There must be lots of subsystems which would have trouble 
> > doing that, although we ought to be able to implement delayed probing 
> > from within the driver core easily enough.
> 
> I don't know how to solve that.
> 
> First off, the prepare routines of drivers that need to load firmware during
> resume probably should preload the firmware for the devices present during the
> suspend.

That's okay for drivers that are bound to a device before the suspend 
starts.  But we also need to handle new devices added while the system 
was asleep.

> Second, I don't generally think drivers should probe for devices during resume.
> I guess the delayed probing would be the cleanest appoach here.

Here's the difficulty.  Normally the USB subsystem does use delayed
probing -- in fact, probing is done in a freezable thread.  However
this is a special case.  Not all USB drivers support suspend/resume;
those that don't get unbound during suspend and then rebound during
resume.  The rebinding occurs in the "complete" phase of the resume,
before tasks are thawed.

I suppose the rebinding could be delayed.  It would be better to fix
the USB DVB drivers, though, by adding PM support.  But there's a bunch
of them in drivers/media/dvb/dvb-usb, and AFAICS they would all need to
be fixed.  And I have no idea of what changes they would need.

Do you have any better suggestions?

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