Re: Suspend 2 merge: 35/51: Code always built in to the kernel.

Nigel Cunningham
2004-11-28T22:44:20Z

Hi Matthew.

On Sat, 2004-11-27 at 13:19, Matthew Garrett wrote:
> We have userspace to do this, surely? Make the standard method of
> triggering resume involve an initrd, and have a small application that
> does sanity checks before the resume. In case of failure, have it prompt
> the user. As long as it doesn't do bad things to the filesystem,
> there's no danger. There's no reason to do this in the kernel.

It was originally done in kernel space prior to us having initrd
support, as a small extension on what was already there. I don't see a
good reason to move it to working from an initrd because:

1) We're then assuming that everyone uses an initrd/initramfs, which is
not true
2) We need to provide a way for this userspace program to obtain from
the kernel the signature of the image and information about what we want
the signature to look like. It will also then need to be able to tell
the kernel to delete the image.
3) If you want the userspace program to actually read the signature
itself, the kernel still needs to tell the userspace program where to
find that signature (what device, block and blocksize). That device
can't be mounted/swapon'd to do this; it needs to be a raw read.
4) This whole method means there's even more code to maintain!

Regards,

Nigel
--
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901

You see, at just the right time, when we were still powerless, Christ
died for the ungodly. -- Romans 5:6