Re: [PATCH qemu] x86: don't let decompressed kernel image clobber setup_data

From: Borislav Petkov
Date: Mon Jan 02 2023 - 08:37:32 EST


On Mon, Jan 02, 2023 at 10:32:03AM +0100, Ard Biesheuvel wrote:
> So instead of appending data to the compressed image and assuming that
> it will stay in place, create or extend a memory reservation
> elsewhere, and refer to its absolute address in setup_data.

>From my limited experience with all those boot protocols, I'd say hardcoding
stuff is always a bad idea. But, we already more or less hardcode, or rather
codify through the setup header contract how stuff needs to get accessed.

And yeah, maybe specifying an absolute address and size for a blob of data and
putting that address and size in the setup header so that all the parties
involved are where what is, is probably better.

But WTH do I know...

--
Regards/Gruss,
Boris.

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