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

[PATCH v3 05/10] xen/arm: add ASSERT_UNREACHABLE in allocate_static_memory


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>
  • From: Penny Zheng <penny.zheng@xxxxxxx>
  • Date: Tue, 16 Nov 2021 06:31:50 +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=xk9A/ODYAnbqpkicTWn0UlFfqa7O0F+EdCboEgibH8E=; b=cjutisVC4wXvgaVG8rDLNIuvzW2M/ComGEo+QvkArcwIzc1MIMtga+Q5fFdcAxohcBIeTtmu7EOMkEE+DjsOem8TVr3NET/FoiwmUzVDoJGyBr37rQeN8kgw8krBEA/aChWlifVKDCvKmc0eorfNmEJ4KkkcdxQJjCzoz0Ad+mreEZI5nf9K0Scih0paWSlvaMoK7ns8qdE/QNAKT1UDJ/0mrSMFzJ5Q/JUtEpWfX6KgP6JA6PPoBnrDbsrJIRT7mR7+eB5UHx+ksbgx0fae6WqJSo8PGPgnq62q8I2lXUICRrEdnnpgVX9eZrn0WJNnNhjOVYDyjgFbkWws8RjDQg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B1v6Vqtd9Mxb+AV/q7n3Wjye4SNZ0so5ceHMuD5v6qXlN3uFtBt9zIwb86SIJvHvefb/REfFmtd3zGYpkEsh8vBX1G8Gkgd8V2bjlhUQ8pJ9SFSuXHrKmdX/9yvedRA9yEO/dtWGuuDimbr176BAIFtF8I84IC7w4Wgnfcfg51v0AYsP8eQEskoWIvU5FonM21E3Vv4LHye0Ik5VpbJh5vhv6BzCq8DfVC2DoVYQrVC8GtItAg02QlYaWBMDGODP8g+vO1ZWD0sro5eqQjG+fNPDscp3zfQhye6oG2n/piaP0XXcwM0QNWbsnNVNODLXERTvJ9FlO0h2yNimEme6oA==
  • Cc: <Bertrand.Marquis@xxxxxxx>, <Wei.Chen@xxxxxxx>
  • Delivery-date: Tue, 16 Nov 2021 06:32:58 +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>
---
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 97a5b5dedd..b6fde74d74 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -759,6 +759,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 allocate_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®.