[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241114142652.GGZzYIrHJUVoE18vp4@fat_crate.local>
Date: Thu, 14 Nov 2024 15:26:52 +0100
From: Borislav Petkov <bp@...en8.de>
To: Nikolay Borisov <nik.borisov@...e.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] x86/microcode/AMD: Make __verify_patch_size() return
bool
On Thu, Nov 14, 2024 at 04:13:33PM +0200, Nikolay Borisov wrote:
> > if (sh_psize != max_size)
> > return false;
>
> Isn't sh_psize < max_size valid here?
* sh_psize < min_t(u32, buf_size, max_size) == max_size -- ditto.
This is still some sort of a mismatch which we'd rather fail.
That max_size should probably be called patch_size or so.
IOW, if the patch size in the header doesn't match the per-family patch size
=> fail.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists