Files
rockchip-kernel/include/linux
Vlastimil Babka a2bbfa414c FROMGIT: kernel/power: allow hibernation with page_poison sanity checking
Page poisoning used to be incompatible with hibernation, as the state of
poisoned pages was lost after resume, thus enabling CONFIG_HIBERNATION
forces CONFIG_PAGE_POISONING_NO_SANITY.  For the same reason, the
poisoning with zeroes variant CONFIG_PAGE_POISONING_ZERO used to disable
hibernation.  The latter restriction was removed by commit 1ad1410f63
("PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO") and
similarly for init_on_free by commit 18451f9f9e ("PM: hibernate: fix
crashes with init_on_free=1") by making sure free pages are cleared after
resume.

We can use the same mechanism to instead poison free pages with
PAGE_POISON after resume.  This covers both zero and 0xAA patterns.  Thus
we can remove the Kconfig restriction that disables page poison sanity
checking when hibernation is enabled.

Link: https://lkml.kernel.org/r/20201113104033.22907-4-vbabka@suse.cz
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>	[hibernation]
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Laura Abbott <labbott@kernel.org>
Cc: Mateusz Nosek <mateusznosek0@gmail.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

(cherry picked from commit 03b6c9a3e8
 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm)
Bug: 182930667
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: Ieea49ebb4d3eeddd18eb2040f13b8121978facca
2021-03-24 15:09:16 -07:00
..
2020-10-02 14:59:25 -07:00
2021-03-07 12:33:33 +01:00
2020-10-02 15:00:49 -07:00
2020-10-16 17:21:51 +02:00
2020-12-11 14:02:14 -08:00
2020-09-30 22:44:26 +02:00
2020-11-19 22:38:29 -05:00
2021-03-04 11:37:59 +01:00
2021-02-07 15:37:17 +01:00
2020-10-07 14:28:39 -04:00
2021-01-21 18:02:19 -08:00
2020-10-28 11:41:15 -06:00
2020-10-18 09:27:10 -07:00
2021-03-07 12:33:33 +01:00
2021-01-13 10:28:55 +01:00
2020-11-06 10:05:18 -08:00
2020-09-26 22:55:05 -04:00
2021-03-11 16:02:50 +00:00
2020-10-05 13:21:49 +02:00