]> git.baikalelectronics.ru Git - 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)
committerDennis Zhou <dennis@kernel.org>
Fri, 31 Jan 2020 19:15:59 +0000 (11:15 -0800)
commitc480081c647e10ef16fa14edbbefbe3f30e4ac9c
tree2fd998ca682d902969b5c25f2aafd43ca6dbf652
parent05cc2810526edf47d37d59e398a048a9bdc1c4db
percpu: Separate decrypted varaibles anytime encryption can be enabled

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: 45b2ad675b78 ("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>
include/linux/percpu-defs.h