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, 10 Oct 2006 12:50:56 +0200
From:	Pavel Machek <pavel@...e.cz>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Stefan Seyfried <seife@...e.de>, Jiri Kosina <jikos@...os.cz>,
	linux-acpi@...el.com, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...l.org>, Len Brown <len.brown@...el.com>
Subject: Re: [PATCH] preserve correct battery state through suspend/resume cycles

On Tue 2006-10-10 00:52:09, Rafael J. Wysocki wrote:
> On Sunday, 8 October 2006 20:42, Pavel Machek wrote:
> > Hi!
> > 
> > > > boot -> suspend -> (un)plug battery -> resume
> > > > 
> > > > The problem arises in both cases - i.e. suspend with battery plugged in, 
> > > > and resume with battery unplugged, or vice versa.
> > > > 
> > > > After resume, when the battery status has changed (plugged in -> unplegged 
> > > > or unplugged -> plugged in) during the time when the system was sleeping, 
> > > > the /proc/acpi/battery/*/* is wrong (showing the state before suspend, not 
> > > > the current state).
> > > 
> > > Is this also needed if you use "platform" method? Also with suspend-to-RAM?
> > > 
> > > > The following patch adds ->resume method to the ACPI battery handler, which
> > > > has the only aim - to check whether the battery state has changed during sleep, 
> > > > and if so, update the ACPI internal data structures, so that information 
> > > > published through /proc/acpi/battery/*/* is correct even after suspend/resume
> > > > cycle, during which the battery was removed/inserted.
> > > 
> > > Although it generally is a good idea to add suspend and resume methods to
> > > all ACPI drivers, it would be interesting to know if you still need this
> > > when using the correct method (platform) instead of the incorrect default
> > > method (shutdown).
> > > 
> > > echo "platform" > /sys/power/disk
> > > echo "disk" > /sys/power/state
> > 
> > Maybe we should change the default in 2.6.20 or so?
> 
> Well, I think swsusp should work with "shutdown" just as well.  If it doesn't,
> that means there are some bugs in the ACPI code which should be fixed.
> By using "platform" as the default method we'll be hiding those bugs IMHO.
> 
> OTOH that may be desirable. ;-)

You are right. We probably want both: suspend/resume method in battery
driver _and_ platform mode used by default.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
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