]> git.baikalelectronics.ru Git - kernel.git/commit
PM / hibernate: Image data protection during restoration
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 10 Jul 2016 00:12:10 +0000 (02:12 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 10 Jul 2016 00:12:10 +0000 (02:12 +0200)
commitb958c323a5d494beb7d256657fee1a9449849f3e
treeba2727168486504a256694aaa5f549bac1aa92eb
parent11c70ec4dafe32b5cdf46e7aba407d7e43dbb7be
PM / hibernate: Image data protection during restoration

Make it possible to protect all pages holding image data during
hibernate image restoration by setting them read-only (so as to
catch attempts to write to those pages after image data have been
stored in them).

This adds overhead to image restoration code (it may cause large
page mappings to be split as a result of page flags changes) and
the errors it protects against should never happen in theory, so
the feature is only active after passing hibernate=protect_image
to the command line of the restore kernel.

Also it only is built if CONFIG_DEBUG_RODATA is set.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Documentation/kernel-parameters.txt
kernel/power/hibernate.c
kernel/power/power.h
kernel/power/snapshot.c