lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <257ed6bb-6625-e634-a4b0-4bcca751d7c8@amd.com>
Date:   Wed, 2 Nov 2022 20:03:59 +0100
From:   "Gupta, Pankaj" <pankaj.gupta@....com>
To:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        dan.j.williams@...el.com, thomas.lendacky@....com,
        pankaj.gupta@....com
Subject: Re: [PATCH] mm/memremap.c: map FS_DAX device memory as decrypted

+Cc Andrew [forgot to add earlier]

> 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.
> 
> Signed-off-by: Pankaj Gupta <pankaj.gupta@....com>
> ---
>   mm/memremap.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/mm/memremap.c b/mm/memremap.c
> index 421bec3a29ee..08cbf54fe037 100644
> --- 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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ