public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* ACPICA regression for empty ResourceTemplates
@ 2017-06-26  8:38 Lukas Wunner
  2017-06-26 11:49 ` Rafael J. Wysocki
  0 siblings, 1 reply; 11+ messages in thread
From: Lukas Wunner @ 2017-06-26  8:38 UTC (permalink / raw)
  To: Robert Moore, Lv Zheng, Rafael J. Wysocki; +Cc: Ronald Tschalaer, linux-acpi

Hi Robert,

ACPICA commit c8eac101 (= Linux commit a83019eb9f1f, "ACPICA: Update
resource descriptor handling") is causing a regression when parsing
an empty ResourceTemplate:

acpi_dev_get_resources() now returns -EIO because acpi_walk_resources()
returns AE_AML_NO_RESOURCE_END_TAG for a buffer than contains just a
lone end_tag.

The ACPI 6.1 spec, page 800 explicitly allows empty resource templates:

    ResourceTemplateTerm :=
        ResourceTemplate () {ResourceMacroList} => Buffer
    ResourceMacroList :=
        Nothing | <ResourceMacroTerm ResourceMacroList>
        ^^^^^^^

Thus a term such as "ResourceTemplate () {}" is legal and should not cause
an error to be returned.

The commit claims to revert Rafael's Linux commit 1315f01632da ("Revert
"ACPICA: Resources: Not a valid resource if buffer length too long"),
but in fact does something different.

Please fix at your earliest convenience.  The issue was discovered and
root-caused by Ronald Tschalär, please credit him in the fix, I'm merely
relaying the information:

Reported-by: Ronald Tschalär <ronald@innovation.ch>

Thanks,

Lukas

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-06-28  8:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-26  8:38 ACPICA regression for empty ResourceTemplates Lukas Wunner
2017-06-26 11:49 ` Rafael J. Wysocki
2017-06-26 12:38   ` Lukas Wunner
2017-06-26 22:36     ` Rafael J. Wysocki
2017-06-27  1:19     ` Zheng, Lv
2017-06-27  9:24       ` Lukas Wunner
2017-06-27 15:08         ` Moore, Robert
2017-06-27 15:31           ` Rafael J. Wysocki
2017-06-28  8:59             ` Lukas Wunner
2017-06-27 18:59         ` Life is hard, and then you die
2017-06-27 19:23           ` Moore, Robert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox