RE: ACPICA regression for empty ResourceTemplates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Life is hard, and then you die [mailto:ronald@xxxxxxxxxxxxx]
> Sent: Tuesday, June 27, 2017 11:59 AM
> To: Lukas Wunner <lukas@xxxxxxxxx>
> Cc: Zheng, Lv <lv.zheng@xxxxxxxxx>; Rafael J. Wysocki
> <rafael@xxxxxxxxxx>; Moore, Robert <robert.moore@xxxxxxxxx>; Wysocki,
> Rafael J <rafael.j.wysocki@xxxxxxxxx>; ACPI Devel Maling List <linux-
> acpi@xxxxxxxxxxxxxxx>
> Subject: Re: ACPICA regression for empty ResourceTemplates
> 
> 
> On Tue, Jun 27, 2017 at 11:24:25AM +0200, Lukas Wunner wrote:
> > On Tue, Jun 27, 2017 at 01:19:31AM +0000, Zheng, Lv wrote:
> > > > On Mon, Jun 26, 2017 at 01:49:03PM +0200, Rafael J. Wysocki wrote:
> > > > > On Mon, Jun 26, 2017 at 10:38 AM, Lukas Wunner <lukas@xxxxxxxxx>
> wrote:
> > > > > > Hi Robert,
> > > > > >
> > > > > > ACPICA commit c8eac101 (= Linux commit a83019eb9f1f, "ACPICA:
> > > > > > Update resource descriptor handling") is causing a regression
> > > > > > when parsing an empty ResourceTemplate:
> > >
> > > Can it be fixed by using this logic:
> > > if (AmlLength < sizeof (AML_RESOURCE_END_TAG) && AmlLength) Instead
> > > of the logic introduced in commit a83019eb9f1f?
> > > if (AmlLength < sizeof (AML_RESOURCE_END_TAG))
> >
> > Unfortunately not, AmlLength is not 0 but 2 in this case (=
> > sizeof(struct aml_resource_end_tag)).
> 
> Actually, that will work here (the use of '<' ensures that). But it's
> unclear whether this is semantically the correct thing, in particular
> because a83019eb9f1f widened the cases where NO_RESOURCE_END_TAG is
> returned, but the above suggestion narrows them. Unfortunately commit
> a83019eb9f1f is quite vague about why it reverted back to '<='.
> 
>
[Moore, Robert] 

Yes, the <= is wrong and should be <

There was an odd corner case that was solved by the <=, even though it looks stupid (and is of course incorrect for most cases.)

We have not been able to reproduce this corner case again (yet), so we will revert the <= change back to the <

Bob

>   Cheers,
> 
>   Ronald

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux