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:	Fri, 22 Sep 2006 13:28:58 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Nigel Cunningham <ncunningham@...uxmail.org>
Cc:	Pavel Machek <pavel@...e.cz>, Andrew Morton <akpm@...l.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -mm 0/6] swsusp: Add support for swap files

On Friday, 22 September 2006 07:23, Pavel Machek wrote:
> On Fri 2006-09-22 11:01:53, Nigel Cunningham wrote:
> > Hi.
> > 
> > On Wed, 2006-09-20 at 21:20 +0200, Rafael J. Wysocki wrote:
> > > Hi,
> > > 
> > > The following series of patches makes swsusp support swap files.
> > > 
> > > For now, it is only possible to suspend to a swap file using the in-kernel
> > > swsusp and the resume cannot be initiated from an initrd.
> > 
> > I'm trying to understand 'resume cannot be initiated from an initrd'.
> > Does that mean if you want to use this functionality, you have to have
> > everything needed compiled in to the kernel, and it's not compatible
> > with LVM and so on?
> 
> Not in this version of patch; for resume from initrd, ioctl()
> interface needs to be added (*).

Yup.  This is not technically impossible, but the patches don't add an
interface needed for this purpose.

Initially I thought of a sysfs-based one, but it didn't seem to be a good
solution.  I'm going to add an ioctl() to /dev/snapshot that will allow us
to set the "resume offset" from an application.

> 									Pavel
> (*) Actually.. of course resume from file from initrd is possible
> *now*, probably without this patch series, but that would be bmap and
> doing it by hand from userland.

Well, not from a swap file.  To use a swap file for suspending we need a
kernel to tell us which page "slots" are available to us (otherwise we could
overwrite some swapped-out pages).

We could use a regular (non-swap) file like this but that would require us to
use some dangerous code (ie. one that writes directly to blocks belonging to
certain file bypassing the filesystem).  IMHO this isn't worth it, provided
the kernel's swap-handling code can do this for us and is known to work. ;-)

Greetings,
Rafael


-- 
You never change things by fighting the existing reality.
		R. Buckminster Fuller
-
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