linux/kernel/power
Alexander Potapenko b8dc994624 UPSTREAM: PM: hibernate: fix crashes with init_on_free=1
Upon resuming from hibernation, free pages may contain stale data from
the kernel that initiated the resume. This breaks the invariant
inflicted by init_on_free=1 that freed pages must be zeroed.

To deal with this problem, make clear_free_pages() also clear the free
pages when init_on_free is enabled.

Fixes: 6471384af2 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options")
Reported-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Alexander Potapenko <glider@google.com>
Cc: 5.3+ <stable@vger.kernel.org> # 5.3+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 18451f9f9e)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I32c22a60082bb3b49eae7de3c7d9d5ae2b965dc5
2020-11-16 09:22:34 +01:00
..
autosleep.c UPSTREAM: PM / wakeup: Show wakeup sources stats in sysfs 2019-10-11 14:04:42 -07:00
console.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
energy_model.c FROMGIT: PM / EM: Expose the Energy Model in debugfs 2019-01-28 17:05:00 +00:00
hibernate.c PM: hibernate: remove the bogus call to get_gendisk() in software_resume() 2020-10-30 10:38:28 +01:00
Kconfig FROMLIST: PM: Introduce an Energy Model management framework 2018-10-26 11:47:11 +01:00
main.c ANDROID: GKI: export symbols from abi_gki_aarch64_qcom_whitelist 2020-04-13 21:36:41 +00:00
Makefile ANDROID: power: wakeup_reason: add an API to log wakeup reasons 2018-12-05 09:48:13 -08:00
power.h x86/power: Fix swsusp_arch_resume prototype 2018-02-02 23:33:50 +01:00
poweroff.c
process.c ANDROID: power: wakeup_reason: wake reason enhancements 2020-04-09 15:27:37 +00:00
qos.c ANDROID: GKI: qos: Register irq notify after adding the qos request 2020-04-23 00:35:53 +00:00
snapshot.c UPSTREAM: PM: hibernate: fix crashes with init_on_free=1 2020-11-16 09:22:34 +01:00
suspend_test.c
suspend.c ANDROID: GKI: export symbols from abi_gki_aarch64_qcom_whitelist 2020-04-13 21:36:41 +00:00
swap.c PM / hibernate: cast PAGE_SIZE to int when comparing with error code 2018-07-02 11:48:30 +02:00
user.c PM / reboot: Eliminate race between reboot and suspend 2018-08-06 12:35:20 +02:00
wakelock.c UPSTREAM: PM / wakeup: Show wakeup sources stats in sysfs 2019-10-11 14:04:42 -07:00
wakeup_reason.c ANDROID: fix wakeup reason findings 2020-04-24 01:05:45 +00:00