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]
Message-Id: <200906102315.26999.rjw@sisk.pl>
Date:	Wed, 10 Jun 2009 23:15:26 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Oliver Neukum <oliver@...kum.org>,
	linux-pm@...ts.linux-foundation.org,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [linux-pm] Run-time PM idea (was: Re: [RFC][PATCH 0/2] PM: Rearrange core suspend code)

On Wednesday 10 June 2009, Alan Stern wrote:
> On Wed, 10 Jun 2009, Rafael J. Wysocki wrote:
> 
> > > By the way, a legitimate reason for aborting an autosuspend is if the
> > > device's driver requires remote wakeup to be enabled during suspend but
> > > the user has disabled it.
> > 
> > Do you mean the user has disabled the remote wakeup?
> 
> Yes, by writing to the power/wakeup attribute.
> 
> 
> > > > > There should be a sysfs interface (like the one in USB) to allow
> > > > > userspace to prevent a device from being autosuspended -- and perhaps
> > > > > also to force it to be suspended.
> > > > 
> > > > To prevent a device from being suspended - yes.  To force it to stay suspended
> > > > - I'm not sure.
> > > 
> > > I'm not sure either.  Oliver Neukum requested it originally and it has
> > > been useful for debugging, but I haven't seen many places where it
> > > would come in useful in practice.
> 
> I did think of one use for this feature.  It's unique to USB,
> however...
> 
> In Windows, you're not supposed to unplug a hot-unpluggable device
> without first telling the OS -- there's a "Safely Remove Hardware"  
> applet.  When you tell the applet you want to remove a USB device, the
> system disables the device's port and then says it's okay to unplug the
> device.  Now Linux doesn't have any user API for disabling USB ports,
> but suspending a port has the same effect (the device can't distinguish
> a disable from a suspend).
> 
> It turns out that some devices (MP3 players, for instance) have
> incorporated this into their design.  They display a "Safe to unplug"  
> message when their port is disabled or suspended.  People like to see
> this message -- it makes them feel good about unplugging the device --
> and the only way to get it under Linux is by forcing the device to be
> suspended.  :-)

Well, I'd very much prefer to have a separate mechanism for that.

> > The problem with it is that the user space may not know if it is safe to keep
> > a device suspended and if it is not, the kernel will have to ignore the setting
> > anyway, so I'm not sure what's the point (except for debugging).
> 
> This falls into the category of "The user knows better".  If the user
> specifically tells the kernel to suspend a device (rather than just
> letting it autosuspend), and this causes a problem, then it's the
> user's own fault.
> 
> After all, who's really the master?  Us or the kernel?

Oh, that depends on who the user is.  If I'm the user, I'm the master, but in
case of a typical Windows user I'm afraid the kernel has to know better. ;-)

Best,
Rafael
--
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