All of lore.kernel.org
 help / color / mirror / Atom feed
* Disable hibernate -- Live media shouldn't allow it?
@ 2013-05-15 22:14 Phillip Susi
  2013-05-15 22:29 ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Phillip Susi @ 2013-05-15 22:14 UTC (permalink / raw)
  To: linux-acpi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When booting from removable media, you may end up mounting a swap
partition on an internal hard disk, thus enabling hibernation.
Inadvertently hibernating ( perhaps in response to ACPI HOT event ) is
silly since the system can not be resumed.  Is there a flag somewhere
to prevent hibernating?  Shouldn't there be and shouldn't it be
disabled by default?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJRlAjBAAoJEJrBOlT6nu75tD4IANMtQGPJfnwOrnwcL+pmxmRW
1Iq7EpwXtkxMbibcIiLIjtqfPXjupHQMQBxMoHvlZuISPv4lMChRqbM+wBEy5GfN
waGcSilqbHurx+L4xSUE9UmZ6iUOWEvZreQRniTlrFbAV+pClYq2D0Ub2msOo1Ka
Rg0zygVJSs0y6VrTZdUIbutiiGo24KFiJyTkErTnFr21QReIPd5Bq4zwVd+1I+UR
oZY0z49ot8c+m2BhBZ8V6+H0do+zpmcvjmik3b6Dm8sFfGiCnjQVHhmc4tHNZfhS
SnmW8dC+haR7kHAAFmIrd2RRbczD2H3XCM0/QvwVQ8ISz0h6Ejy1MTeNlW87XBA=
=5nIU
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Disable hibernate -- Live media shouldn't allow it?
  2013-05-15 22:14 Disable hibernate -- Live media shouldn't allow it? Phillip Susi
@ 2013-05-15 22:29 ` Rafael J. Wysocki
  2013-05-15 23:45   ` Phillip Susi
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2013-05-15 22:29 UTC (permalink / raw)
  To: Phillip Susi; +Cc: linux-acpi

On Wednesday, May 15, 2013 06:14:25 PM Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> When booting from removable media, you may end up mounting a swap
> partition on an internal hard disk, thus enabling hibernation.
> Inadvertently hibernating ( perhaps in response to ACPI HOT event ) is
> silly since the system can not be resumed.  Is there a flag somewhere
> to prevent hibernating?  Shouldn't there be and shouldn't it be
> disabled by default?

I don't think we have a good definition of "removable media".

Also, you usually can remove a normally non-removable disk while hibernated,
so I just don't see why we should disable it in any case.

That said, it is reasonable to expect live CDs not to configure the system to
hibernate in response to overheating etc.  But that's not a problem we can
address in the kernel.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Disable hibernate -- Live media shouldn't allow it?
  2013-05-15 22:29 ` Rafael J. Wysocki
@ 2013-05-15 23:45   ` Phillip Susi
  2013-05-16  8:54     ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Phillip Susi @ 2013-05-15 23:45 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-acpi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/15/2013 06:29 PM, Rafael J. Wysocki wrote:
> That said, it is reasonable to expect live CDs not to configure the
> system to hibernate in response to overheating etc.  But that's not
> a problem we can address in the kernel.

How would that be configured?  Initiating the hibernation in response
to api HOT event is done in the kernel isn't it?

Setting the policy obviously isn't something that can be done in the
kernel, but it should provide for the ability to have such a policy by
having a knob user mode has to switch on when it thinks hibernation
makes any kind of sense.  Simply enabling a swap shouldn't be all it
takes -- you should have to specify that yes, this swap is configured
for hibernate/resume.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJRlB4sAAoJEJrBOlT6nu75oCwIAI2BmGmz/3gZjXuijTtDT90A
ztcC04GltiCW6ciP8eq87L+dxogUoorR7lyJAeDycafEGscjbu9zaMFf6DL2SheH
MKEWGg9Kk0j81gl2FDdkKrj6ZJzibcDuEFytcr9kLVE+je7vckUxDueBQvcy7ReK
P6HYLgy6kEprvlAi8xmhv3CKZRmBi/gzsi6kxSTb32smqJ9l5qFfPSpL6paq6QbX
20rUvX0JHF5b8LHAsHgQfyS5DQ50tGVBKwE/X0+CRoVqPmS4tdJVvkp429SlwmJY
FSPEN2aXESfwtRt/zk9AJRkZN9OCFQP44mVBSRsmjAN/lTTOjb35bdZPRBUP76o=
=0vb+
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Disable hibernate -- Live media shouldn't allow it?
  2013-05-15 23:45   ` Phillip Susi
@ 2013-05-16  8:54     ` Rafael J. Wysocki
  2013-05-16 13:56       ` Phillip Susi
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2013-05-16  8:54 UTC (permalink / raw)
  To: Phillip Susi; +Cc: linux-acpi

On Wednesday, May 15, 2013 07:45:48 PM Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 05/15/2013 06:29 PM, Rafael J. Wysocki wrote:
> > That said, it is reasonable to expect live CDs not to configure the
> > system to hibernate in response to overheating etc.  But that's not
> > a problem we can address in the kernel.
> 
> How would that be configured?  Initiating the hibernation in response
> to api HOT event is done in the kernel isn't it?

No, I don't think so.  At least I'm not aware of that.  Do you have any
pointers to the kernel code doing that?

> Setting the policy obviously isn't something that can be done in the
> kernel, but it should provide for the ability to have such a policy by
> having a knob user mode has to switch on when it thinks hibernation
> makes any kind of sense.  Simply enabling a swap shouldn't be all it
> takes -- you should have to specify that yes, this swap is configured
> for hibernate/resume.

Actually, it is not all it takes.  You need to point the hibernate code
to the specific swap through the resume= kernel command line option
(there is a default, though).

Thanks,
Rafael


> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with undefined - http://www.enigmail.net/
> 
> iQEcBAEBAgAGBQJRlB4sAAoJEJrBOlT6nu75oCwIAI2BmGmz/3gZjXuijTtDT90A
> ztcC04GltiCW6ciP8eq87L+dxogUoorR7lyJAeDycafEGscjbu9zaMFf6DL2SheH
> MKEWGg9Kk0j81gl2FDdkKrj6ZJzibcDuEFytcr9kLVE+je7vckUxDueBQvcy7ReK
> P6HYLgy6kEprvlAi8xmhv3CKZRmBi/gzsi6kxSTb32smqJ9l5qFfPSpL6paq6QbX
> 20rUvX0JHF5b8LHAsHgQfyS5DQ50tGVBKwE/X0+CRoVqPmS4tdJVvkp429SlwmJY
> FSPEN2aXESfwtRt/zk9AJRkZN9OCFQP44mVBSRsmjAN/lTTOjb35bdZPRBUP76o=
> =0vb+
> -----END PGP SIGNATURE-----
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Disable hibernate -- Live media shouldn't allow it?
  2013-05-16  8:54     ` Rafael J. Wysocki
@ 2013-05-16 13:56       ` Phillip Susi
  0 siblings, 0 replies; 5+ messages in thread
From: Phillip Susi @ 2013-05-16 13:56 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-acpi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 5/16/2013 4:54 AM, Rafael J. Wysocki wrote:
> No, I don't think so.  At least I'm not aware of that.  Do you have
> any pointers to the kernel code doing that?

No, but I also can't see anything in user mode doing it either, which
is why I'm asking.  I assumed that since this is an emergency response
required by the ACPI spec, that it would be implemented by the kernel
ACPI driver.

> Actually, it is not all it takes.  You need to point the hibernate
> code to the specific swap through the resume= kernel command line
> option (there is a default, though).

That's needed to resume, but not to hibernate.  Simply doing a swapon
is enough to enable hibernating.  Checking that you have a valid
resume= kernel argument probably would be a sane thing to do before
allowing hibernation, but this isn't currently the case.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRlOWYAAoJEJrBOlT6nu75C5AH/AylnOPsCPngyZtMGoyBNE5t
IY/AM6YjVnuOuCYkIvQ973Vm6gIBaX4jP3SIAc35GEHWMwc+374DmDsuCsH3+hSh
aT16qYIyx/hMgX8YN1qKoLSLoN3VwA0Lv1UV8aaAsmlJsX5mG4FtSpzPTtwBkIoj
ctVJIfihpKgBJcbF0uvWyI8Z+2i9xa8jryd+Tl31K3Q4WLX/8XWjOtph9dcsXUXC
6En190gCz9dYeNN0937OLCXbmjOd0krGo7512OkfsygjAoPf589XzopS3BCLichM
RQ8w295x8OhO5BZaKMUtHaxsLuj7v5X4BAqfAP83iNbR7Gj/nP7dQpExb8/y7xs=
=O9Ks
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-16 13:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15 22:14 Disable hibernate -- Live media shouldn't allow it? Phillip Susi
2013-05-15 22:29 ` Rafael J. Wysocki
2013-05-15 23:45   ` Phillip Susi
2013-05-16  8:54     ` Rafael J. Wysocki
2013-05-16 13:56       ` Phillip Susi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.