On 24.08.2025 00:26, Petr Beneš wrote:
> From: Petr Beneš <w1be...@gmail.com>
> 
> SMBIOS specification dictates that tables should have a minimal length.
> This commit introduces further validation for user-input SMBIOS tables.
> 
> As per SMBIOS Reference Specification:
> * Type 0: For version 2.3 and later implementations, the length is at least 
> 14h
> * Type 1: 1Bh for 2.4 and later
> * Type 2: at least 08h
> * Type 3: 0Dh for version 2.1 and later
> * Type 11: 5h (+ strings)
> * Type 22: 1Ah (+ strings)
> * Type 39: a minimum of 10h
> 
> Notably, this also fixes previously incorrect check for chassis handle in
> smbios_type_2_init. Chassis handle is a WORD, therefore, the condition now
> correctly checks for >= 13 instead of > 13.
> 
> hvmloader currently implements version 2.4
> 
> Furthermore, this commit introduces smbios_pt_copy helper function to 
> substitute
> previously repeating pattern of locating the struct in physical memory (via
> get_smbios_pt_struct), checking the length and copying it into SMBIOS region.

I've added
Fixes: 4d23036e7096 ("HVM firmware passthrough SMBIOS processing")
here.

Jan

> Signed-off-by: Petr Beneš <w1be...@gmail.com>
> Acked-by: Jan Beulich <jbeul...@suse.com>



Reply via email to