[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y7CGzde+qPB7YJP4@zn.tnic>
Date: Sat, 31 Dec 2022 20:00:29 +0100
From: Borislav Petkov <bp@...en8.de>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: "H. Peter Anvin" <hpa@...or.com>, pbonzini@...hat.com,
ebiggers@...nel.org, x86@...nel.org, linux-kernel@...r.kernel.org,
qemu-devel@...gnu.org, ardb@...nel.org, kraxel@...hat.com,
philmd@...aro.org
Subject: Re: [PATCH qemu] x86: don't let decompressed kernel image clobber
setup_data
On Sat, Dec 31, 2022 at 07:22:47PM +0100, Jason A. Donenfeld wrote:
> So with that understanding confirmed, I'm confused at your surprise that
> hpa's unrelated fix to the different issue didn't fix this issue.
No surprise there - I used a qemu variant without your patch to prevent the
setup_data clobbering so hpa's fix can't help there.
> But since the kernel doesn't do this now, and the 62MiB bug also seems
> to apply to existing kernels, for the purposes of QEMU for now, I think
> the v3 patch is probably best, since it'll handle existing kernels.
Right, we can't fix all those guests which are out there.
> Alternatively, setup_data could be relocated, the boot param protocol
> could be bumped, and then QEMU could conditionalized it's use of
> setup_data based on that protocol version. That'd work, but seems a bit
> more involved.
I think this is at least worth considering because the kernel overwriting
setup_data after having been told where that setup_data is located is not really
nice.
Well not explicitly at least - it gets the pointer to the first element and
something needs to traverse that list to know which addresses are live. But
still, that info is there so perhaps we need to take setup_data into
consideration too before decompressing...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists