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:	Mon, 02 Aug 2010 10:54:13 +1000
From:	Bojan Smojver <bojan@...ursive.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	Nigel Cunningham <nigel@...onice.net>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH]: Compress hibernation image with LZO (in-kernel)

On Mon, 2010-08-02 at 09:17 +0900, KAMEZAWA Hiroyuki wrote:
> Now, vmallc() is used here. Then, following will happen.
> 
> 1. vmalloc()
>    -> vmalloc adds vmap objects and set page table entries.
> 
> 2. saving image
>    -> At taking snapshot of memory to the disk, above vmalloc() area
> is
>       saved to disk as it is.
> ...
> 3. At restore
>    Because you dont't remember which vmalloc() area was used for
> creating
>    snapshot, you can't free it at swsusp_free().
> 
> memory leak ? 

To be honest, I'm not sure.

However, I thought that by the time save_image() is called, snapshot has
already been taken, no?
------------------
        error = hibernation_snapshot(hibernation_mode == HIBERNATION_PLATFORM);
        if (error)
                goto Thaw;

        if (in_suspend) {
                unsigned int flags = 0;

                if (hibernation_mode == HIBERNATION_PLATFORM)
                        flags |= SF_PLATFORM_MODE;
                pr_debug("PM: writing image.\n");
                error = swsusp_write(flags);  <--- this calls save_image()
------------------

So, me thinks that these allocations will not be in the snapshot image.

PS. Take everything I take with a grain (or two) of salt. I'm just a
regular Linux user trying to make my Fedora hibernate/thaw process suck
less.

-- 
Bojan

--
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