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:	Tue, 13 Feb 2007 10:42:29 +0100
From:	Tilman Schmidt <tilman@...p.cc>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
CC:	Pavel Machek <pavel@....cz>,
	Nigel Cunningham <nigel@...el.suspend2.net>,
	Manu Abraham <abraham.manu@...il.com>,
	Willy Tarreau <w@....eu>,
	Arjan van de Ven <arjan@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>, tilman@...p.cc,
	Robert Hancock <hancockr@...w.ca>
Subject: Re: NAK new drivers without proper power management?

Rafael J. Wysocki schrieb:
> I think we can introduce a "pm_safe" flag that will indicate if the driver
> handles suspend/resume correctly.  If we do it, we can flag all of the drivers
> currently in the tree as "pm_safe" unless we know that they aren't.  Next,
> we can convert the core to fail the suspend for any driver that is not flagged
> as "pm_safe".  But I think that will take time.

Why a new flag? IMHO it would be both more readable and more efficient
to create a pm_generic_nosuspend() function which does "return -ENOSYS",
and set that as the .suspend method on drivers known to break
suspend/resume. New drivers should either have .suspend and .resume
methods of their own or set .suspend = pm_generic_nosuspend.

That way, NULL .suspend/.resume methods retain their current semantics
("don't know whether suspend would work, never thought about it"),
error-returning ones would clearly signal "cannot suspend safely", and
success-returning ones would equally clearly signal "suspend works ok".
(Bugs nonwithstanding.)

There could then be a policy parameter (Kconfig selectable to start)
to abort suspend when encountering a driver without .suspend/.resume
methods, or to proceed with a warning message.

-- 
Tilman Schmidt                    E-Mail: tilman@...p.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


Download attachment "signature.asc" of type "application/pgp-signature" (251 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ