ACK: [PATCH] dmi: dmicheck: fix incorrect use of lock bit in chassis type

ivanhu ivan.hu at canonical.com
Tue Nov 14 10:01:04 UTC 2017



On 11/07/2017 05:42 PM, Alex Hung wrote:
> BIT 7 in type field of chassis structure is not part of case type.
>
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>   src/dmi/dmicheck/dmicheck.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index a55597f..f48085f 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -1171,12 +1171,12 @@ static void dmicheck_entry(fwts_framework *fw,
>   			dmi_str_check(fw, table, addr, "Manufacturer", hdr, 0x4);
>   			dmi_min_max_mask_uint8_check(fw, table, addr, "Chassis Type", hdr, 0x5, 0x1, 0x24, 0x0, 0x7f);
>   
> -			if (data[5] >=
> +			if ((data[5] & ~0x80) >=
>   				(sizeof(fwts_dmi_chassis_type) / sizeof(fwts_chassis_type_map))) {
>   				fwts_failed(fw, LOG_LEVEL_HIGH, DMI_INVALID_HARDWARE_ENTRY,
>   					"Incorrect Chassis Type "
>   					"SMBIOS Type 3 reports 0x%" PRIx8,
> -					data[5]);
> +					(data[5] & ~0x80));
>   				break;
>   			}
>   
Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list