]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
percpu: Separate decrypted varaibles anytime encryption can be enabled
authorErdem Aktas <erdemaktas@google.com>
Fri, 13 Dec 2019 21:31:46 +0000 (13:31 -0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 04:31:00 +0000 (00:31 -0400)
commit5d9f90ab5ca3ec0d233db693751bde5ff4cd79c9
treec92d7c6da755163f5cfad1768911544e03b76fd8
parent90c2be2ca0e1d6ce9bec3fbbcc08e78f7139f90c
percpu: Separate decrypted varaibles anytime encryption can be enabled

BugLink: https://bugs.launchpad.net/bugs/1866678
commit 264b0d2bee148073c117e7bbbde5be7125a53be1 upstream.

CONFIG_VIRTUALIZATION may not be enabled for memory encrypted guests.  If
disabled, decrypted per-CPU variables may end up sharing the same page
with variables that should be left encrypted.

Always separate per-CPU variables that should be decrypted into their own
page anytime memory encryption can be enabled in the guest rather than
rely on any other config option that may not be enabled.

Fixes: ac26963a1175 ("percpu: Introduce DEFINE_PER_CPU_DECRYPTED")
Cc: stable@vger.kernel.org # 4.15+
Signed-off-by: Erdem Aktas <erdemaktas@google.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/linux/percpu-defs.h