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:	Thu, 12 Apr 2012 21:31:16 +1000
From:	Bojan Smojver <bojan@...ursive.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>,
	"Rafael J. Wysocki" <rjw@...k.pl>
CC:	linux-kernel@...r.kernel.org, Per Olofsson <pelle@...ian.org>
Subject: Re: [PATCH v10]: Hibernation: fix the number of pages used for hibernate/thaw buffering

Bojan Smojver <bojan@...ursive.com> wrote: 

>-	read_pages = (nr_free_pages() - snapshot_get_image_size()) >> 1;
>+	read_pages = (low_free_pages() - snapshot_get_image_size()) / 2;

Actually, I am pretty sure this part of the patch is wrong. Image can be bigger than the size of non-high memory. So, this calculation may turn up entirely bogus numbers, given we are dealing with unsigned values. Sure, we clamp that a line later, so all is not lost, but still, it needs to be fixed.

Will have a better version for you tomorrow.

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