[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <thox3qsdozhcl3xk5zmdjhz6xdkhhz6xefknj2ib427q4qw22q@uizbc32vuu55>
Date: Thu, 6 Jun 2024 15:39:45 +0300
From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Dave Hansen <dave.hansen@...el.com>, adrian.hunter@...el.com,
ardb@...nel.org, ashish.kalra@....com, bhe@...hat.com,
dave.hansen@...ux.intel.com, elena.reshetova@...el.com, haiyangz@...rosoft.com, hpa@...or.com,
jun.nakajima@...el.com, kai.huang@...el.com, kexec@...ts.infradead.org,
kys@...rosoft.com, linux-acpi@...r.kernel.org, linux-coco@...ts.linux.dev,
linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org, ltao@...hat.com, mingo@...hat.com,
peterz@...radead.org, rafael@...nel.org, rick.p.edgecombe@...el.com,
sathyanarayanan.kuppuswamy@...ux.intel.com, seanjc@...gle.com, tglx@...utronix.de, thomas.lendacky@....com,
x86@...nel.org
Subject: Re: [PATCHv11.1 11/19] x86/tdx: Convert shared memory back to
private on kexec
On Wed, Jun 05, 2024 at 06:24:19PM +0200, Borislav Petkov wrote:
> On Wed, Jun 05, 2024 at 03:21:42PM +0300, Kirill A. Shutemov wrote:
> > If a page can be accessed via private mapping is determined by the
> > presence in Secure EPT. This state persist across kexec.
>
> I just love it how I tickle out details each time I touch this comment
> because we three can't write a single concise and self-contained
> explanation. :-(
>
> Ok, next version:
>
> "Private mappings persist across kexec. If tdx_enc_status_changed() fails
s/Private mappings persist /Memory encryption state persists /
> in the first kernel, it leaves memory in an unknown state.
>
> If that memory remains shared, accessing it in the *next* kernel through
> a private mapping will result in an unrecoverable guest shutdown.
>
> The kdump kernel boot is not impacted as it uses a pre-reserved memory
> range that is always private. However, gathering crash information
> could lead to a crash if it accesses unconverted memory through
> a private mapping which is possible when accessing that memory through
> /proc/vmcore, for example.
>
> In all cases, print error info in order to leave enough bread crumbs for
> debugging."
>
> I think this is getting in the right direction as it actually makes
> sense now.
Otherwise looks good to me.
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists