From: Guenter Roeck <linux@roeck-us.net>
To: Kees Cook <keescook@chromium.org>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Robert Moore <robert.moore@intel.com>,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
devel@acpica.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2] ACPICA: Replace fake flexible arrays with flexible array members
Date: Sun, 12 Feb 2023 16:35:46 -0800 [thread overview]
Message-ID: <20230213003546.GA3280303@roeck-us.net> (raw)
In-Reply-To: <20230127191621.gonna.262-kees@kernel.org>
Hi,
On Fri, Jan 27, 2023 at 11:16:25AM -0800, Kees Cook wrote:
> One-element arrays (and multi-element arrays being treated as
> dynamically sized) are deprecated[1] and are being replaced with
> flexible array members in support of the ongoing efforts to tighten the
> FORTIFY_SOURCE routines on memcpy(), correctly instrument array indexing
> with UBSAN_BOUNDS, and to globally enable -fstrict-flex-arrays=3.
>
> Replace one-element array with flexible-array member in struct
> acpi_resource_extended_irq. Replace 4-byte fixed-size array with 4-byte
> padding in a union with a flexible-array member in struct
> acpi_pci_routing_table.
>
> This results in no differences in binary output.
>
> Link: https://github.com/acpica/acpica/pull/813
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This patch results in boot failures of 32-bit images.
Reverting it fixes the problem.
On the failing boot tests, I see messages such as
ACPI: \_SB_.GSIA: Enabled at IRQ 117440528
ERROR: Unable to locate IOAPIC for GSI 117440528
ahci 0000:00:1f.2: PCI INT A: failed to register GSI
ACPI: \_SB_.GSIG: Enabled at IRQ 117440534
ERROR: Unable to locate IOAPIC for GSI 117440534
8139cp 0000:00:02.0: PCI INT A: failed to register GSI
Given that 117440534 == 0x7000016, that looks quite suspicious.
Indeed, after reverting this patch, the messages are different.
ACPI: \_SB_.GSIA: Enabled at IRQ 16
ahci 0000:00:1f.2: AHCI 0001.0000 32 slots 6 ports 1.5 Gbps 0x3f impl SATA mode
ACPI: \_SB_.GSIG: Enabled at IRQ 22
8139cp 0000:00:02.0 eth0: RTL-8139C+ at 0xd0804000, 52:54:00:12:34:56, IRQ 22
Guenter
next prev parent reply other threads:[~2023-02-13 0:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-27 19:16 [PATCH v2] ACPICA: Replace fake flexible arrays with flexible array members Kees Cook
2023-01-27 19:43 ` Rafael J. Wysocki
2023-01-27 19:47 ` Kees Cook
2023-01-27 19:51 ` Rafael J. Wysocki
2023-02-13 0:35 ` Guenter Roeck [this message]
2023-02-13 19:31 ` Wysocki, Rafael J
2023-02-13 19:51 ` Kees Cook
2023-02-13 20:05 ` Guenter Roeck
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=20230213003546.GA3280303@roeck-us.net \
--to=linux@roeck-us.net \
--cc=devel@acpica.org \
--cc=keescook@chromium.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--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