From nobody Fri May 31 19:18:09 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VrXvk07cXz5LCnJ; Fri, 31 May 2024 19:18:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VrXvj6jfXz4Kj9; Fri, 31 May 2024 19:18:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717183089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wf15NvcFlZhNotkc+gGstP4GG2vJeoulu3imI2KimS0=; b=ZzHNMF6R5YDx8VYlXsVFuSu3/cfKq4pWgQYrpcYf6st1qs5UBX+Sn/xokpaEfV+GIcxCLb VE+zdd7tix0QbJfW3FBS0VEJ4BZSohNE7fc/KuVxr0h6DVJV41MvnVV2ccrkddDgl41uz+ 1sT7S1SGoj6syhQPzPG3UF0K2weIYud8SB10AibeFs+mPlkXqLTg+o40pAmZuGtQH0drl0 UstDSd8/dONer9JeKBMfqHlRUIFQje8L7B97oPjjCatE0x4vfXQv8S3G9PZTAlZWJvkr6q 2OlECqWtSDjyQpg/esTnkpeIXe6kJEQuy6wd1R0jTtrchlU4rJoHiLdJLOupxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717183089; a=rsa-sha256; cv=none; b=B8IiaViMEy/CSHRDST0fF0gHdVbrV1C322az1oo8kipmEssS682ovoA4xWlS0czc8VVvTe sB4LrZgJRxx8L4nCbAdnE3V69xKG/27lADheR3sj9APvV4oNvJ0M+M6ZZ2WzrwaPzCIL3r /ammVQfafHFcs323ey3OC26BCOS1AdETqD2BV3RDdzTtRpMzNY4AP/qC8whXRy2A9lf2wC 29o4sYs7c+poDe9Mu91/dOUK2z2iPpVLK9fRuYQ55W3QQQp11EkGEGhgraWcTVO2ewjDkL yC3bM0aXaQ05XihKgoIu88I+NdMDXKEqEY1aZIzHje/WPq7yaTB2X8hjprF9EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717183089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wf15NvcFlZhNotkc+gGstP4GG2vJeoulu3imI2KimS0=; b=nut9dO3ZSqvLrxO23ADk/ES4+yHrITAkS3JEcqw1PboFzRC4A1orFx5VELaTdY9N1bTzqB AOT3A8E0n5O7kLdxkuWeCS2Tm0rOluvmdLSF1uTSpo8nLS930QqcQFHDFpcOB0UehzFATT bSextdS3UbulJXzuJaktecSOzB8Mm659R8Pz4UH6E1HwWzqeUW4OUq6grDkwFScLSPRMrp wSJuY7E4JfohYhEYQVbP7kX1CyuVuNTezkw+9plROeywyAxDkpqhROerGzHEvPm8ju2DNi PzSJuXAmOxt77FaqT1Yv8f1GIa0RBEfA9yBmsI8JWziwMdstP/5ncWDiL3jbQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VrXvj68yGzcYT; Fri, 31 May 2024 19:18:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44VJI94r034516; Fri, 31 May 2024 19:18:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44VJI94Z034513; Fri, 31 May 2024 19:18:09 GMT (envelope-from git) Date: Fri, 31 May 2024 19:18:09 GMT Message-Id: <202405311918.44VJI94Z034513@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 1eb7099eacea - main - acpidump: improve length calculation for several IVHD elements List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1eb7099eaceacd4e26606b074db6633ca7e5359a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1eb7099eaceacd4e26606b074db6633ca7e5359a commit 1eb7099eaceacd4e26606b074db6633ca7e5359a Author: Konstantin Belousov AuthorDate: 2024-05-30 15:21:59 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-31 19:10:39 +0000 acpidump: improve length calculation for several IVHD elements Use sizeofs of structures corresponding to the parsed device entry. This does not change the calculation, but fixes logical inconsistency. Sponsored by: The FreeBSD Foundation Sponsored by: Advanced Micro Devices (AMD) MFC after: 1 week --- usr.sbin/acpi/acpidump/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index fc2e8cb82c49..af0068649fbb 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -1629,8 +1629,8 @@ acpi_handle_ivrs_ivhd_devs(ACPI_IVRS_DE_HEADER *d, char *de) } else if (d->Type == ACPI_IVRS_TYPE_EXT_START) { d8b = (ACPI_IVRS_DEVICE8B *)db; len = sizeof(*d8b); - d4 = (ACPI_IVRS_DEVICE4 *)(db + sizeof(*d8a)); - len = sizeof(*d8a) + sizeof(*d4); + d4 = (ACPI_IVRS_DEVICE4 *)(db + sizeof(*d8b)); + len = sizeof(*d8b) + sizeof(*d4); printf("\t\tDev Type=%#x Id=%#06x-%#06x", d8a->Header.Type, d8a->Header.Id, d4->Header.Id); acpi_handle_ivrs_ivhd_dte(d8b->Header.DataSetting);