From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d3liy-0006FQ-Qf for kexec@lists.infradead.org; Thu, 27 Apr 2017 15:52:58 +0000 Subject: Re: [PATCH v5 31/32] x86: Add sysfs support for Secure Memory Encryption References: <20170418211612.10190.82788.stgit@tlendack-t1.amdoffice.net> <20170418212212.10190.73484.stgit@tlendack-t1.amdoffice.net> <1498ec98-b19d-c47d-902b-a68870a3f860@intel.com> <20170427072547.GB15297@dhcp-128-65.nay.redhat.com> From: Dave Hansen Message-ID: <1f034974-20e6-b5e9-e6ff-434b634e1522@intel.com> Date: Thu, 27 Apr 2017 08:52:34 -0700 MIME-Version: 1.0 In-Reply-To: <20170427072547.GB15297@dhcp-128-65.nay.redhat.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Dave Young Cc: linux-efi@vger.kernel.org, Brijesh Singh , Toshimitsu Kani , linux-doc@vger.kernel.org, Matt Fleming , linux-mm@kvack.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Alexander Potapenko , "H. Peter Anvin" , Larry Woodman , linux-arch@vger.kernel.org, kvm@vger.kernel.org, Jonathan Corbet , Joerg Roedel , x86@kernel.org, kasan-dev@googlegroups.com, Ingo Molnar , Andrey Ryabinin , Tom Lendacky , Rik van Riel , Arnd Bergmann , Konrad Rzeszutek Wilk , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Dmitry Vyukov , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, "Michael S. Tsirkin" , Paolo Bonzini On 04/27/2017 12:25 AM, Dave Young wrote: > On 04/21/17 at 02:55pm, Dave Hansen wrote: >> On 04/18/2017 02:22 PM, Tom Lendacky wrote: >>> Add sysfs support for SME so that user-space utilities (kdump, etc.) can >>> determine if SME is active. >>> >>> A new directory will be created: >>> /sys/kernel/mm/sme/ >>> >>> And two entries within the new directory: >>> /sys/kernel/mm/sme/active >>> /sys/kernel/mm/sme/encryption_mask >> >> Why do they care, and what will they be doing with this information? > > Since kdump will copy old memory but need this to know if the old memory > was encrypted or not. With this sysfs file we can know the previous SME > status and pass to kdump kernel as like a kernel param. > > Tom, have you got chance to try if it works or not? What will the kdump kernel do with it though? We kexec() into that kernel so the SME keys will all be the same, right? So, will the kdump kernel be just setting the encryption bit in the PTE so it can copy the old plaintext out? Why do we need both 'active' and 'encryption_mask'? How could it be that the hardware-enumerated 'encryption_mask' changes across a kexec()? _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec