[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190402103201.GF6826@zn.tnic>
Date: Tue, 2 Apr 2019 12:32:01 +0200
From: Borislav Petkov <bp@...en8.de>
To: Lianbo Jiang <lijiang@...hat.com>
Cc: linux-kernel@...r.kernel.org, kexec@...ts.infradead.org,
tglx@...utronix.de, mingo@...hat.com, akpm@...ux-foundation.org,
x86@...nel.org, hpa@...or.com, dyoung@...hat.com, bhe@...hat.com,
Thomas.Lendacky@....com, brijesh.singh@....com
Subject: Re: [PATCH 1/3 v2] x86/kexec: Do not map the kexec area as decrypted
when SEV is active
On Wed, Mar 27, 2019 at 01:36:27PM +0800, Lianbo Jiang wrote:
> Currently, the arch_kexec_post_{alloc,free}_pages() unconditionally
> maps the kexec area as decrypted. This works fine when SME is active.
> Because in SME, the first kernel is loaded in decrypted area by the
> BIOS, so the second kernel must be also loaded into the decrypted
> memory.
>
> When SEV is active, the first kernel is loaded into the encrypted
> area, so the second kernel must be also loaded into the encrypted
> memory. Lets make sure that arch_kexec_post_{alloc,free}_pages()
> does not clear the memory encryption mask from the kexec area when
> SEV is active.
This commit message still doesn't explain the big picture why you want
this change.
And it must explain it because it might be all clear in your head now
but months from now, you, we, all would've forgotten why this change was
needed.
So pls add blurb that this whole effort is being done so that SEV VMs
can kdump too. I.e., the 10000ft picture.
Anyone must be able to figure out *why* a change has been done just by
doing git archeology. So make sure you explain it properly.
If unsure, try to put yourself in the shoes of some future kernel
developer who is trying to find out why this change has been done. Now
read the commit message you've written. Does it make any sense to him? I
think not.
Do you catch my drift?
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
Powered by blists - more mailing lists