[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: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Thu, 3 Dec 2026 12:29:43 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=valinux.co.jp smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=HHS2A6JNIW+hp2YorOPLshsx0VMU9uv7CJbaSQdZ570=; b=nC+GvslClY91Rjhc4Wh5UaOoNsScSDqkR0A27EKKe1ACnFgd7fhBC49qP8rkPvZxQWOv/rI9E7zE9LQCPraqlYXk7nZ7H/xJ+jJVRMWGAUIHa/KQ4jjhMmayk/oUPKP94sgkDP4RbrzdMi2PblMWmpBolzfGwkx3E2hkbDLWP6YPeIgxkZvND8FXDF/G20YkIKCEuju1Sl69p0/6FhlsZZ1Mk/JMLEie2BxmOzpKBKXL4XeBkxBE3zCFFY36PX6dUSnPBxZJVXku4KGiyNQF3iml4zMC5n2MSg+ev9xI+iT0zENzzbeb2AHVvAyOgrtNinD91f52JlxCn2JJ+Irh2Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Jniads3NoSuNNzQrHrz4OskIdeeGcMbALvHCASRfwobKUwD0SnHqlHUz7tMPM3yNRpxZi+fzSp5TMc09Iv3ZermjrDZr0mEnOrwMgscd0ACpOOKTtKiM5HZ8NLNEcz87TQX9tVw5fJgrvCIi0X6F/ScgOljhhtq+r/MazgwUhnRjQysblBfHEwPAtKfFY1gBU4AOl9M9EBtLkSEQFT56GLxRz0ThE8DVYtZ/7MSUkxwMolmnsV8re6QtW72Ai4KVa73Pk0pviAaRB1NV7kWOsP6TW3dtKyMwQuOYqhL0k7AiJqID4DQk9jIjUsLasHgxx94ljfazH89/3OS+ki/TOg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 03 Dec 2026 11:30:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Title should say what the patch does, so for example:
"xen/arm: acpi: Fix off-by-one in __acpi_unmap_table() ASSERT"

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.

> __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")

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

~Michal




 


Rackspace

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