ACK: [PATCH] acpi: crsdump: fix large resource length calculation (LP: #1255793)
IvanHu
ivan.hu at canonical.com
Mon Jan 6 07:28:59 UTC 2014
On 01/03/2014 08:33 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> fwts crsdump on large resource items is not taking into consideration
> the upper 8 bits of the length field and also the 3 byte header to
> calculate the size of the resource length. This means that the last
> field or two are not being dumped. This fix calculates the length
> correctly.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpi/crsdump/crsdump.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/crsdump/crsdump.c b/src/acpi/crsdump/crsdump.c
> index 94fbf0c..334efa8 100644
> --- a/src/acpi/crsdump/crsdump.c
> +++ b/src/acpi/crsdump/crsdump.c
> @@ -497,7 +497,7 @@ static void crsdump_large_resource_items(
> const uint64_t length)
> {
> uint8_t tag_item = data[0] & 0x7f;
> - size_t crs_length = data[1];
> + size_t crs_length = data[1] + (data[2] << 8) + 3;
>
> static const crsdump_info header[] = {
> CRS_BITS("Tag Type", 0, 128),
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list