Thread (7 messages) 7 messages, 4 authors, 2021-02-08

Re: [PATCH] Revert "ACPICA: Interpreter: fix memory leak by using existing buffer"

From: Ard Biesheuvel <ardb@kernel.org>
Date: 2021-02-08 20:35:27
Also in: linux-acpi, lkml

On Mon, 8 Feb 2021 at 20:07, Kaneda, Erik [off-list ref] wrote:

quoted
-----Original Message-----
From: Rafael J. Wysocki <rafael@kernel.org>
Sent: Monday, February 8, 2021 5:01 AM
To: Shawn Guo <redacted>; Ard Biesheuvel
[off-list ref]; Kaneda, Erik [off-list ref]
Cc: Linux ARM <redacted>; ACPI Devel Maling
List [off-list ref]; Linux Kernel Mailing List <linux-
kernel@vger.kernel.org>; open list:ACPI COMPONENT ARCHITECTURE
(ACPICA) [off-list ref]; Wysocki, Rafael J
[off-list ref]; Len Brown [off-list ref]; Moore,
Robert [off-list ref]
Subject: Re: [PATCH] Revert "ACPICA: Interpreter: fix memory leak by using
existing buffer"

On Sat, Feb 6, 2021 at 11:49 AM Shawn Guo [off-list ref] wrote:
quoted
On Sat, Feb 06, 2021 at 09:49:37AM +0100, Ard Biesheuvel wrote:
quoted
This reverts commit 32cf1a12cad43358e47dac8014379c2f33dfbed4.
Hi Bob, Ard and Rafael,
quoted
quoted
quoted
The 'exisitng buffer' in this case is the firmware provided table, and
we should not modify that in place. This fixes a crash on arm64 with
initrd table overrides, in which case the DSDT is not mapped with
read/write permissions.
Since this code runs on basically every _HID and _CID invocation, I would have expected this kind of revert to come in for kernels that do not use initrd override... So it sounds like there is a difference between how pages are mapped for initrd table overrides and tables exposed through the XSDT for ARM.. I think it would be easier for us to make these fixes in the future if we could all come to a consensus on whether if we should assume that these pages are writable or not.

Should we assume that all ACPI tables are non-writable and read only regardless of initrd override and architecture?
ACPI tables are measured into the TPM on measured boot systems, and
checksummed, so I don't think we should ever modify them in place.

But if we need code like this, it should be conditional at the very
least, i.e., it should only rewrite _HIDs and _CIDs if they are
incorrect to begin with.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help