2017-11-20 17:23:49

by Schmauss, Erik

[permalink] [raw]
Subject: RE: [PATCH AUTOSEL for 4.9 01/56] ACPICA: Resources: Not a valid resource if buffer length too long



> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> Sent: Thursday, November 16, 2017 4:56 PM
> To: Schmauss, Erik <[email protected]>
> Cc: Moore, Robert <[email protected]>; [email protected];
> [email protected]; Wysocki, Rafael J <[email protected]>
> Subject: RE: [PATCH AUTOSEL for 4.9 01/56] ACPICA: Resources: Not a valid
> resource if buffer length too long
>
> On Wed, Nov 15, 2017 at 05:05:21PM +0000, Schmauss, Erik wrote:
> >
> >
> >> -----Original Message-----
> >> From: [email protected]
> >> [mailto:[email protected]]
> >> Sent: Wednesday, November 15, 2017 8:39 AM
> >> To: Moore, Robert <[email protected]>
> >> Cc: [email protected]; [email protected]; Wysocki,
> >> Rafael J <[email protected]>; Schmauss, Erik
> >> <[email protected]>
> >> Subject: RE: [PATCH AUTOSEL for 4.9 01/56] ACPICA: Resources: Not a
> >> valid resource if buffer length too long
> >>
> >> On Wed, Nov 15, 2017 at 03:39:22PM +0000, Moore, Robert wrote:
> >> >> -----Original Message-----
> >> >> From: [email protected]
> >> >> [mailto:[email protected]]
> >> >> Sent: Tuesday, November 14, 2017 6:46 PM
> >> >> To: [email protected]; [email protected]
> >> >> Cc: Moore, Robert <[email protected]>; Zheng, Lv
> >> >> <[email protected]>; Wysocki, Rafael J
> >> >> <[email protected]>; [email protected]
> >> >> Subject: [PATCH AUTOSEL for 4.9 01/56] ACPICA: Resources: Not a
> >> >> valid resource if buffer length too long
> >> >>
> >> >> From: Bob Moore <[email protected]>
> >> >>
> >> >> [ Upstream commit 57707a9a7780fab426b8ae9b4c7b65b912a748b3 ]
> >> >>
> >> >> ACPICA commit 9f76de2d249b18804e35fb55d14b1c2604d627a1
> >> >> ACPICA commit b2e89d72ef1e9deefd63c3fd1dee90f893575b3a
> >> >> ACPICA commit 23b5bbe6d78afd3c5abf3adb91a1b098a3000b2e
> >> >>
> >> >> The declared buffer length must be the same as the length of the
> >> >> byte initializer list, otherwise not a valid resource descriptor.
> >> [snip]
> >>
> >> >[Moore, Robert]
> >> >
> >> >Please explain what you are doing here.
> >>
> >> Proposing this commit for the 4.9 LTS tree.
> >
> >What problem are you trying to solve with this change? Are you seeing ACPI
> errors? If so what are they?
>
> Not seeing an actual problem myself. Was this patch supposed to fix a problem
> or just deal with a theoretical scenario?
>
This was supposed to fix issues with our AML disassembler to parse a strange corner in the ASL test suite. I believe this was due to the end tag contains a checksum byte that ACPICA and other ACPI implementations ignore. We thought this was useful in the test suite because we test the disassembler by comparing normally compiled AML with AML that has been compiled, disassembled, and re-compiled. Without this change, the endtag checksum would be over-written to 0 rather than the existing value.

I believe this change broke a few things such as the execution of ConcatResTemplate. We concluded to not use this solution and alter the test suite instead because this endtag byte is usually ignored anyway. To answer your question, this was to deal with a theoretical scenario.

Erik
> --
>
> Thanks,
> Sasha

From 1584311986906242367@xxx Fri Nov 17 11:20:51 +0000 2017
X-GM-THRID: 1584098975829671593
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread