lkml.org 
[lkml]   [2022]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mm/memremap.c: map FS_DAX device memory as decrypted
From
Hi Andrew,

>> 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?

Yes, kernel >= 5.10 for clean back-port as it contains the below commit.

>
> Is b7b3c01b19159 a suitable Fixes: target?

Not very sure. But seems like the right commit for fixes tag as the
target code is moved in this commit with multiple range support addition.

Should I send a v2 with fixes & stable kernel fixes tag?

Thanks,
Pankaj

\
 
 \ /
  Last update: 2022-11-03 08:58    [W:0.052 / U:1.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site