From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: "Michael S . Tsirkin" <mst@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
qemu-devel@nongnu.org
Cc: <linuxarm@huawei.com>
Subject: [PATCH 1/5] hw/acpi: Fix size of HID in build_append_srat_acpi_device_handle()
Date: Thu, 7 Nov 2024 12:34:42 +0000 [thread overview]
Message-ID: <20241107123446.902801-2-Jonathan.Cameron@huawei.com> (raw)
In-Reply-To: <20241107123446.902801-1-Jonathan.Cameron@huawei.com>
The size should always be 8 so hard code that. By coincidience the
incorrect use of sizeof(char *) is 8 on 64 bit hosts, but was caught
by CI testing with i686 as the host.
Reported-by: Michael S. Tsirkin <mst@redhat.com>
Closes: https://lore.kernel.org/qemu-devel/20241104110025-mutt-send-email-mst@kernel.org/
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
hw/acpi/aml-build.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 6a76626177..72282b173e 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -1960,7 +1960,7 @@ static void build_append_srat_acpi_device_handle(GArray *table_data,
{
assert(strlen(hid) == 8);
/* Device Handle - ACPI */
- for (int i = 0; i < sizeof(hid); i++) {
+ for (int i = 0; i < 8; i++) {
build_append_int_noprefix(table_data, hid[i], 1);
}
build_append_int_noprefix(table_data, uid, 4);
--
2.43.0
next prev parent reply other threads:[~2024-11-07 12:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 12:34 [PATCH 0/5] hw/acpi: Fixes + tests for ACPI Generic Port Affinity Struturs Jonathan Cameron via
2024-11-07 12:34 ` Jonathan Cameron via [this message]
2024-11-07 12:37 ` [PATCH 1/5] hw/acpi: Fix size of HID in build_append_srat_acpi_device_handle() Daniel P. Berrangé
2024-11-07 12:34 ` [PATCH 2/5] qapi/qom: Change Since entry for AcpiGenericPortProperties to 9.2 Jonathan Cameron via
2024-11-07 12:36 ` Daniel P. Berrangé
2024-11-07 12:34 ` [PATCH 3/5] bios-tables-test: Allow for new acpihmat-generic-x test data Jonathan Cameron via
2024-11-07 12:34 ` [PATCH 4/5] bios-tables-test: Add complex SRAT / HMAT test for GI GP Jonathan Cameron via
2024-11-07 12:34 ` [PATCH 5/5] bios-tables-test: Add data for complex numa test (GI, GP etc) Jonathan Cameron via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241107123446.902801-2-Jonathan.Cameron@huawei.com \
--to=qemu-devel@nongnu.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=berrange@redhat.com \
--cc=linuxarm@huawei.com \
--cc=mst@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.