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]
Date:	Sun, 11 Feb 2007 07:54:04 +0100
From:	Willy Tarreau <w@....eu>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Daniel Barkalow <barkalow@...ervon.org>, nigel@...el.suspend2.net,
	Robert Hancock <hancockr@...w.ca>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Jeff Garzik <jeff@...zik.org>, Pavel Machek <pavel@....cz>,
	pm list <linux-pm@...ts.osdl.org>
Subject: Re: [PATCH] Re: NAK new drivers without proper power management?

On Sat, Feb 10, 2007 at 08:50:27PM +0100, Rafael J. Wysocki wrote:
> On Saturday, 10 February 2007 18:52, Daniel Barkalow wrote:
> > On Sat, 10 Feb 2007, Rafael J. Wysocki wrote:
> > 
> > > On Saturday, 10 February 2007 11:02, Nigel Cunningham wrote:
> > >
> > > > Well, the original desire was to stop new drivers getting in without
> > > > proper power management.
> > > 
> > > I know, but I agree with the argument that having a driver without the
> > > suspend/resume support is better than not having the driver at all.
> > 
> > How about if "proper power management" is defined to include the driver 
> > explicitly preventing suspend? It seems to me like the current problem is 
> > that driver writers don't think about power management at all, and the 
> > result is that, after suspend/resume, the system doesn't come back. It 
> > would be better if driver writers had to think about power management just 
> > enough to realize that it's not going to work, and make this information 
> > available to the system. At that point, it's relatively easy for the 
> > system to do something useful about it.
> 
> Actually, it is easy for the driver authors to do this right now.  They can
> just make the .suspend() routine always return an error.
> 
> Well, I think this is a good idea: if the device in question requires specific
> power management during the suspend/resume, but it is not implemented by the
> driver, we should require the author of the driver to define the .suspend()
> routine that returns -ENOSYS (preferably, with an explanatory warning in
> dmesg).

instead of modifying all drivers to explicitly state that they don't support
it, we should start with a test of the NULL pointer for .suspend which should
mean exactly the same without modifying the drivers. I find it obvious that
a driver which does provide a suspend function will not support it. And if
some drivers (eg /dev/null) can support it anyway, it's better to change
*those* drivers to explicitly mark them as compatible.

regards,
Willy

-
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