Date: Mon, 14 Feb 2011 13:37:59 -0500 From: John Baldwin <jhb@freebsd.org> To: "Jung-uk Kim" <jkim@freebsd.org> Cc: freebsd-current@freebsd.org, Matthew Fleming <mdf356@gmail.com> Subject: Re: acpi_resource bug? Message-ID: <201102141337.59203.jhb@freebsd.org> In-Reply-To: <201102141330.20330.jkim@FreeBSD.org> References: <AANLkTi=C31iGJMonj7E3DGLWhx0cSKQR=b7ZHTv9CdmA@mail.gmail.com> <AANLkTimKJnyFQgTgtLTOFvmcY4fbK5gdT6mwt9zB=%2BRY@mail.gmail.com> <201102141330.20330.jkim@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, February 14, 2011 1:30:18 pm Jung-uk Kim wrote: > On Monday 14 February 2011 10:29 am, Matthew Fleming wrote: > > On Mon, Feb 14, 2011 at 6:24 AM, John Baldwin <jhb@freebsd.org> > wrote: > > > On Sunday, February 13, 2011 2:46:07 pm Matthew Fleming wrote: > > >> I'm not very familiar with the acpi code, but we have seen an > > >> intermittent issue on boot: > > >> > > >> 1) should the length of the bcopy() be changed to either respect > > >> res->Length or the actual length of the ACPI_RESOURCE_DATA for > > >> the type? > > > > > > It should just use res->Length: > > > > Is there a guarantee that res->Length is <= sizeof(ACPI_RESOURCE) ? > > No. Please try the attached patch (after your r218685). I think your patch is correct, but are you saying that ACPICA will return a resource with a size that doesn't match its type? ACPI_RESOURCE_DATA is a union of all the various resource types, and it does contain both ACPI_RESOURCE_IRQ and ACPI_RESOURCE_EXTENDED_IRQ, so it's hard to see how res->Length would be greater than the size of ACPI_RESOURCE. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102141337.59203.jhb>