[lkml]   [2020]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 5.5 278/367] percpu: Separate decrypted varaibles anytime encryption can be enabled
    From: Erdem Aktas <>

    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: # 4.15+
    Signed-off-by: Erdem Aktas <>
    Signed-off-by: David Rientjes <>
    Signed-off-by: Dennis Zhou <>
    Signed-off-by: Greg Kroah-Hartman <>

    include/linux/percpu-defs.h | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    --- a/include/linux/percpu-defs.h
    +++ b/include/linux/percpu-defs.h
    @@ -175,8 +175,7 @@
    * Declaration/definition used for per-CPU variables that should be accessed
    * as decrypted when memory encryption is enabled in the guest.
    #define DECLARE_PER_CPU_DECRYPTED(type, name) \
    DECLARE_PER_CPU_SECTION(type, name, "..decrypted")

     \ /
      Last update: 2020-02-10 13:57    [W:2.430 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site