acpica-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: Robert Moore <robert.moore@intel.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Subject: [PATCH 1/1] ACPI: XSDT: struct acpi_table_xsdt must be packed
Date: Sat, 11 Nov 2023 14:48:27 +0100	[thread overview]
Message-ID: <20231111134827.174908-1-heinrich.schuchardt@canonical.com> (raw)

According to the ACPI 6.5 specification the component Entry starts at
offset 36 in the XSDT table which is not a multiple of 8. Hence we must
mark the structure as packed.

We did not see an error due to the incorrect packing yet as in
acpi_tb_parse_root_table() we use ACPI_ADD_PTR() to find the address of
Entry.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 include/acpi/actbl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 451f6276da49..1a37ac378765 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -148,7 +148,7 @@ struct acpi_table_rsdt {
 struct acpi_table_xsdt {
 	struct acpi_table_header header;	/* Common ACPI table header */
 	u64 table_offset_entry[1];	/* Array of pointers to ACPI tables */
-};
+} __packed;
 
 #define ACPI_RSDT_ENTRY_SIZE        (sizeof (u32))
 #define ACPI_XSDT_ENTRY_SIZE        (sizeof (u64))
-- 
2.40.1


             reply	other threads:[~2023-11-11 13:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-11 13:48 Heinrich Schuchardt [this message]
2023-12-06 16:30 ` [PATCH 1/1] ACPI: XSDT: struct acpi_table_xsdt must be packed Rafael J. Wysocki
2023-12-06 16:37   ` Heinrich Schuchardt

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=20231111134827.174908-1-heinrich.schuchardt@canonical.com \
    --to=heinrich.schuchardt@canonical.com \
    --cc=acpica-devel@lists.linux.dev \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).