Re: [PATCH 0/3] Resolve problems with kexec identity mapping

From: Borislav Petkov
Date: Tue Jul 09 2024 - 06:38:38 EST


On Tue, Jul 09, 2024 at 08:49:43AM +0200, Ard Biesheuvel wrote:
> > Patch #2 adds the CC blob to the identity map as well, if present,
> > since if present it is also dereferenced before the page fault handler
> > can be put into place. Given what's been discussed, this patch might
> > not be necessary; I don't know enough to say whether kexec-ing a new
> > kernel within a SEV guest makes sense. I'm pretty certain it can
> > cause no harm, though.

No, keep it in the bag until it is really needed. No proactive "fixing".

> I'd prefer it if that is addressed within the context of the SEV guest
> work. The memory setup is quite intricate, and dealing with individual
> types of EFI config tables is something we should avoid in general. I
> still maintain that the best approach would be to map all of DRAM 1:1
> instead of mapping patches left and right (as this is what EFI does),
> but if we need to do so, let's keep it as generic as we possibly can.

Sure. There's the kink that coco guests need to accept memory first and
mapping it all is the least performant one. But we can deal with that later.

> I wasn't cc'ed on any of the patches so I don't know exactly what was
> discussed.
>
> Please cc me and linux-efi@ on your next revision.

And please update your commit messages with what was discussed on this thread.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette