]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
arm64: hibernate: Clean the __hyp_text to PoC after resume
authorJames Morse <james.morse@arm.com>
Thu, 24 Jan 2019 16:32:57 +0000 (16:32 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitb67d7077854265de476da3f3702d98cac61d030f
tree292ad1721835c8e48bc0745d454898882f774105
parentc064750e35cb63f5ec9bb8736de40a7279408e6d
arm64: hibernate: Clean the __hyp_text to PoC after resume

BugLink: https://bugs.launchpad.net/bugs/1837664
commit f7daa9c8fd191724b9ab9580a7be55cd1a67d799 upstream.

During resume hibernate restores all physical memory. Any memory
that is accessed with the MMU disabled needs to be cleaned to the
PoC.

KVMs __hyp_text was previously ommitted as it runs with the MMU
enabled, but now that the hyp-stub is located in this section,
we must clean __hyp_text too.

This ensures secondary CPUs that come online after hibernate
has finished resuming, and load KVM via the freshly written
hyp-stub see the correct instructions.

Signed-off-by: James Morse <james.morse@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/arm64/kernel/hibernate.c