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

[PATCH v4 06/11] xen/arm: add ASSERT_UNREACHABLE in allocate_static_memory


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>
  • From: Penny Zheng <penny.zheng@xxxxxxx>
  • Date: Mon, 20 Dec 2021 05:21:18 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=wuR6YNjrEFjB7To66TkH4pIiwei4ENNply2Pgid4MnQ=; b=AjpU0U/V+WsaroPq88wwQyRKJwYzZrIVaLqMeSKD9s94wDGvBiqfahH5KRWvg3ARy47TwZJDd2LlEy3VM1aJnc42b0do0qu+u/N+RJ+qSYr0ocKw+pv9g6RQLVmIYFps6aFvnrbawj/KaIKoFH1NIxqSI+nvpTFnI7kZs4Kk/a2RqTUE3RVJjyMGBoecn8XA0yBj1w16vgvoKQh5+33x3mBbrtfD23tMLO4y7Jw4YP2paQ0xO/CMUjnLJvAMd/RhTqgpXcotbvRUqgKA165jFe5fhS7kx8OlfzzvvpnjQEiV/f5oCH9MzQ4/r5grgO/e1Sc/FKciFUkWlxStoKIEtQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GF0w3iZ7zgT3EQONOqrLbL31XAjPDtieQnfBrfD2Ax3h80UuXQHK/uD29V/YSp5JSXMPU9vSLQo2PbUNkA49tE8LSYoTuroTr1odioTB0Tjy089tYXZ9+U/OmyB9GULrnp4q6ANyJUYcaD7lypsKf1dOAY0N8f2snaI1aLvCnh+Eqc7df6Y0N4060SBnvU3qTwpzYkTI/drKZvoEbXyqzVE+ckhXQpVPTWqDLSOBTPZp2jH6aO9nwSPAun2YCd8D5vhvzlTPpuGgk2SXKWk58bp+SaQP6P0IBx1rd5hUY91eVdPmTdVgenK5QTADUCwf53f/Hn5Oz3p0GNaAbZLOUg==
  • Cc: <Bertrand.Marquis@xxxxxxx>, <Wei.Chen@xxxxxxx>
  • Delivery-date: Mon, 20 Dec 2021 05:22:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true

Helper allocate_static_memory is not meant to be reachable when built with
!CONFIG_STATIC_MEMORY, so this commit adds ASSERT_UNREACHABLE in it to catch
potential misuse.

Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
---
v3 changes:
- new commit
---
 xen/arch/arm/domain_build.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index d74a3eb908..b706e674c9 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -755,6 +755,7 @@ static void __init allocate_static_memory(struct domain *d,
                                           struct kernel_info *kinfo,
                                           const struct dt_device_node *node)
 {
+    ASSERT_UNREACHABLE();
 }
 
 static void __init assign_static_memory_11(struct domain *d,
-- 
2.25.1




 


Rackspace

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