[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221102130536.96c487d341544b7482eed038@linux-foundation.org>
Date: Wed, 2 Nov 2022 13:05:36 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Pankaj Gupta <pankaj.gupta@....com>
Cc: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
<dan.j.williams@...el.com>, <thomas.lendacky@....com>
Subject: Re: [PATCH] mm/memremap.c: map FS_DAX device memory as decrypted
On Wed, 2 Nov 2022 11:07:28 -0500 Pankaj Gupta <pankaj.gupta@....com> wrote:
> virtio_pmem use devm_memremap_pages() to map the device memory.
> By default this memory is mapped as encrypted with SEV. Guest
> reboot changes the current encryption key and guest no longer
> properly decrypts the FSDAX device meta data.
>
> Mark the corresponding device memory region for FSDAX devices
> (mapped with memremap_pages) as decrypted to retain the persistent
> memory property.
>
> ...
>
> --- a/mm/memremap.c
> +++ b/mm/memremap.c
> @@ -335,6 +335,7 @@ void *memremap_pages(struct dev_pagemap *pgmap, int nid)
> WARN(1, "File system DAX not supported\n");
> return ERR_PTR(-EINVAL);
> }
> + params.pgprot = pgprot_decrypted(params.pgprot);
> break;
> case MEMORY_DEVICE_GENERIC:
> break;
Should this be backported into earlier kernels?
Is b7b3c01b19159 a suitable Fixes: target?
Powered by blists - more mailing lists