]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO
authorAnisse Astier <anisse@astier.eu>
Fri, 9 Sep 2016 08:43:32 +0000 (10:43 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 13 Sep 2016 00:35:27 +0000 (02:35 +0200)
commitae25d124c88ce1f6ececb9ae9c569249b007014b
treeabe5eb613d5142ab3b8a6f273c1fd26efef8ffc2
parent6541b68d4d477ccbd5658dbd8389ae35d186678d
PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO

PAGE_POISONING_ZERO disables zeroing new pages on alloc, they are
poisoned (zeroed) as they become available.
In the hibernate use case, free pages will appear in the system without
being cleared, left there by the loading kernel.

This patch will make sure free pages are cleared on resume when
PAGE_POISONING_ZERO is enabled. We free the pages just after resume
because we can't do it later: going through any device resume code might
allocate some memory and invalidate the free pages bitmap.

Thus we don't need to disable hibernation when PAGE_POISONING_ZERO is
enabled.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/hibernate.c
kernel/power/power.h
kernel/power/snapshot.c
mm/Kconfig.debug