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

RE: [PATCH] xen/arm/acpi: Crash when unmapping from the ACPI fixmap area


  • To: "Orzel, Michal" <michal.orzel@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
  • Date: Fri, 4 Dec 2026 03:48:08 +0000
  • Accept-language: ja-JP, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=valinux.co.jp; dmarc=pass action=none header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7CAHPAh2tTRMuiwkhZc0HCX4qjc/j99ZbItDWYF1pcc=; b=meg2KE1ELGqFkpNAPTHzTG+5HDuMttMBpTcZ7YZEi5tNtTyiozsZa5oa2uxp5y7s7WqijG/flxNom1hQE7/L0PFEmYW9j8MbfloOhXErgOzhRkZM+GxF/WEqgr4qCKipbOxqb9p111JlPQi4D8neaPrsFiLdUKglBKdKBEN8Clkx4/A6dNj8Mo8n/KcytifZGsrdLV4CHp2fBtsdnyyYqpaczvo4Ehl/lYe2ODVnpnuJSElkvo8po+Usl3oLI0E9yls1FCjeGdrECHyNUDsJ3PTFebzEWGr5mo5WxxxLxdmAsk840ha0PzkADiJQPStmnWvxwtmo5UbUhXFmaLmztQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YDGHWt9NAzmc89iyZsq48HZInwl1SMfMSKgQX9narmDFNnVOEWI4bA+ky38ngvbE4V3cxOR+MlwRvytqpgZY2CCMnauAE8Wt400NlZhwcLq/JtyFQr2McfbSkkq8xpMkxVCdhrymvZgXIYTy7FILm4gUEcgHZTRJp5q+ubp4EpEGGlf52txT5EEBjuynq5a4pUgk2a+YvWAlChngGDKfYKR5UUMXUfOOTFrC49ZKQtqHaJKBMjlSeG9iykx2/xttdvUCrY/d9Io1Q3KjlFOD0qL39Xt5i4CcDw77oFDAfJZ6yAbf6JdC2zijcmxMDD0cK0tJX61Bk+dDpBELNlALEw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=valinux.co.jp header.i="@valinux.co.jp" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=valinux.co.jp;
  • Cc: "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 04 Dec 2026 03:48:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHdgkS+qv7F2pyTF0GhtHRurutm5bdLLqWAgAEQgIA=
  • Thread-topic: [PATCH] xen/arm/acpi: Crash when unmapping from the ACPI fixmap area

Hi Michal,

> Subject: Re: [PATCH] xen/arm/acpi: Crash when unmapping from the ACPI
> fixmap area
> 
> Title should say what the patch does, so for example:
> "xen/arm: acpi: Fix off-by-one in __acpi_unmap_table() ASSERT"

Okay.

> On 02-Dec-26 11:05, Hirokazu Takahashi wrote:
> > Mapping a very large ACPI table may trigger an ASSERT crash in
> what's a very large table? Please specify the exact condition that ASSERT
> describes.

An ASSERT is triggered when mapping and unmapping a table large enough
to reach the very end of the ACPI fixmap area.

> > __acpi_unmap_table().
> > This happens because the boundary condition used to validate the
> > region to be unmapped from the ACPI fixmap area is off by one byte.
> >
> > Signed-off-by: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
> > ---
> >  xen/arch/arm/acpi/lib.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/xen/arch/arm/acpi/lib.c b/xen/arch/arm/acpi/lib.c
> > index 736cf09eca..026bce9b73 100644
> > --- a/xen/arch/arm/acpi/lib.c
> > +++ b/xen/arch/arm/acpi/lib.c
> > @@ -84,7 +84,7 @@ bool __acpi_unmap_table(const void *ptr, unsigned long
> size)
> >      ASSERT((vaddr & PAGE_MASK) == FIXMAP_ADDR(FIX_ACPI_BEGIN));
> >
> >      /* The region allocated fit in the ACPI fixmap region. */
> > -    ASSERT(size < (FIXMAP_ADDR(FIX_ACPI_END) + PAGE_SIZE - vaddr));
> > +    ASSERT(size <= (FIXMAP_ADDR(FIX_ACPI_END) + PAGE_SIZE - vaddr));
> >      ASSERT(fixmap_inuse);
> >
> >      fixmap_inuse = false;
> 
> 
> Please also add:
> Fixes: 4d625ff3c3a9 ("xen/arm: acpi: The fixmap area should always be cleared
> during failure/unmap")

Okay.

> With that addressed:
> Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
> 
> ~Michal

Thank you,
Hirokazu Takahashi.

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.