Hibernation Redesign (was: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM)

Al Boldi
2007-07-08T14:37:31Z

Pavel Machek wrote:
> We are stuck with refrigerator for now, and at least for hibernation,
> I don't see any feasible alternative.

Feasible alternative?

Freezing is the only way to successfully suspend, in kernel space that is.
The problem here is: Why do we freeze in kernel space?

APM didn't freeze in kernel space, and neither should ACPI. The only reason
you would want to freeze in kernel space is because your system does not
have APM or ACPI or anything else to freeze from BIOS level.

So the problem is really easy to solve: either call the APM suspend functions
or install ACPI soft-extensions to implement hibernation from BIOS level.

But there is a catch: Hibernation from BIOS level probably requires a
diskdriver, which isn't always available from BIOS level or is really slow.

So you are back to freezing in kernel space, but this time you know why, and
that you need a system that simply halts to disk after issuing sync-out
requests to all peripheral devices involved. Which sounds like the freezer
in mainline, does it not? And if it does, then what's the problem?

Thanks!

--
Al