From nobody Thu Sep 24 20:27:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=vates.tech ARC-Seal: i=1; a=rsa-sha256; t=1785143523; cv=none; d=zohomail.com; s=zohoarc; b=fy0VCUw8hgSfzMTqyMXCcg5aQQbwtFqgfvswg3wRJB7fC5OmONG9kyqvepV77UKcvTDrypJhx1/lgf2PZrOHd1c/vpOS/x+N5iC0Q7xgc1PeCSPOe5xqA5r/q4fIuDUdYY8n1nDto7KNplSW3M5kGjprZUj83vgupOBRJRu+2Bk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785143523; h=Content-Type:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LBol3HUYj8yNM7RMJBRbeCwo2nqp18ia/cUHJKMWjoA=; b=MZqJt3bwVpjm2AongxFiWiZ+ADxxMsH4fMwXdjiXLXRP0B21vOOQzMm9GAU0Z3DSbMg6iE1MSH7cYgFTqA2kn0xOBBfA1U+f/5GVFSRw1gJoE1TdvHZXZrsKJfDrCcTbw4gx7TWOXxrRHDo3lq/R1cGVgEo8zLdVPCC077+PVd0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1785143523078435.5685581972915; Mon, 27 Jul 2026 02:12:03 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1371480.1618983 (Exim 4.92) (envelope-from ) id 1woHN7-0006dM-A7; Mon, 27 Jul 2026 09:11:41 +0000 Received: by outflank-mailman (output) from mailman id 1371480.1618983; Mon, 27 Jul 2026 09:11:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1woHN7-0006dF-7B; Mon, 27 Jul 2026 09:11:41 +0000 Received: by outflank-mailman (input) for mailman id 1371480; Mon, 27 Jul 2026 09:11:40 +0000 Received: from mx.expurgate.net ([195.190.135.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1woHN6-0006d9-Az for xen-devel@lists.xenproject.org; Mon, 27 Jul 2026 09:11:40 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1woHN4-00Giu4-QN for xen-devel@lists.xenproject.org; Mon, 27 Jul 2026 11:11:38 +0200 Received: from [10.42.69.9] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a6720c8-e002-0a2a0a5209dd-0a2a4509de18-8 for ; Mon, 27 Jul 2026 11:11:38 +0200 Received: from [185.255.28.18] (helo=prod-mta-13.swg-srv.net) by tlsNG-bad1c0.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a6720ca-be1a-0a2a45090019-b9ff1c1288e1-3 for ; Mon, 27 Jul 2026 11:11:38 +0200 Received: from mail2.vates.fr ([37.26.189.201] mail2.vates.fr) (Authenticated sender: 8631fc262581453bbf619ec5b2062170/smtp/7773de5a-2839-4720-82ee-e06722ae1d3e) by prod-mta-13.swg-srv.net (ZoneMTA - prod-mta-13) with ESMTPSA id 19fa2d80d54000e099.002 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 27 Jul 2026 09:11:36 +0000 Received: from julian.home (areims-651-1-80-194.w90-18.abo.wanadoo.fr [90.18.187.194]) (Authenticated sender: julian.vetter@vates.tech) by mail2.vates.fr (Postfix) with ESMTPSA id 5CA768214F; Mon, 27 Jul 2026 11:11:35 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Feedback-ID" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; q=dns/txt; s=selector1; bh=LBol3HUYj8yNM7RMJBRbeCwo2nqp18ia/cUHJKMWjoA=; h=from:subject:date:message-id:to:cc:mime-version:content-type:feedback-id; b=KR2arOR9o9SmkyVDscnbf393QcVjV6uIzF/e7NUt2M5UUusSJ7/OTZ9FZ7gMOv2AEctcs2KSs Nt+b7IJ4SAt3BlBYkpijDBa5rSXgKGY4qar0+Tm1NiBFD9tcXqMqeozIT9DHLME8HIjGn130rCk Hdre2yYm+mAAVXtKIo9swREB5CtfliXx8XUP8d+dnm73pqYFItJwthMU+5AOrz81CfZqIYFRgjv GpNa7EWquU91RQ14voJ1/mtBCKDOCo14bMUZWz2wAHk9bdwkv4U7lhq/CqFMtn0g3IiMzIFwwp0 Ysa2F9HeRjDeb5IpDIHylnT9aGiu+Aq3AB2zFU4aTjMA== X-Zone-Loop: 38a3bc0b903d4d8bfe35007b78e653d491c05c0d1cf0 x-campaign-type: default x-transaction-id: 20526fa3-6386-4743-a269-1873c229619f x-swg-uid: 01-45072346-eeca-4b47-86f7-83b5cca3a019 X-Mailer: Sweego Message-ID: <1785143496.8631fc262581453bbf619ec5b2062170.19fa2d80d54000e099@vates.tech> x-swg-bid: 1785143496.8631fc262581453bbf619ec5b2062170.19fa2d80d54000e099 Feedback-ID: default:8631fc262581453bbf619ec5b2062170:Sweego x-campaign-id: default x-client-id: 8631fc262581453bbf619ec5b2062170 X-Originating-IP: [37.26.189.201] From: Julian Vetter To: xen-devel@lists.xenproject.org Cc: Anthony PERARD , Andrew Cooper , Andrii Sultanov , Guillaume Thouvenin , Julian Vetter Subject: [PATCH] tools/ocaml: fill arch_config for ARM in domain_getinfolist Date: Mon, 27 Jul 2026 11:11:29 +0200 MIME-Version: 1.0 X-BM-Disclaimer: Yes Content-Type: multipart/alternative; boundary="-=Part.13d4.6e6ab21c4c536447.19fa2d80b46.419e05ddcd83bf7f=-" X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1785143495495 X-purgate-ID: tlsNG-bad1c0/1785143498-BC4CB034-F8CED5E1/0/0 X-purgate-type: clean X-purgate-size: 2390 X-ZohoMail-DKIM: pass (identity @vates.tech) X-ZM-MESSAGEID: 1785143524171158500 ---=Part.13d4.6e6ab21c4c536447.19fa2d80b46.419e05ddcd83bf7f=- Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In the function alloc_domaininfo() the arch_config field in domaininfo is only filled inside #if defined(__i386__) || defined(__x86_64__). On ARM the field is left unpopulated. caml_alloc_tuple() does not zero new blocks, so di.Xenctrl.arch_config on ARM is uninitialised garbage for every caller of Xenctrl.domain_getinfolist/domain_getinfo. Any toolstack dereferencing that value, segfaults once a VM is enumerated in a domain scan. Add the missing ARM equivalent, populating xen_arm_arch_domainconfig from the raw xc_domaininfo_t the same way the x86 branch does for xen_x86_arch_domainconfig. Signed-off-by: Julian Vetter --- tools/ocaml/libs/xc/xenctrl_stubs.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenc= trl_stubs.c index 7f6381cdd2..b60ea9f12e 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -415,6 +415,7 @@ static value alloc_domaininfo(xc_domaininfo_t * info) { CAMLparam0(); CAMLlocal5(result, tmp, arch_config, x86_arch_config, emul_list); + CAMLlocal1(arm_arch_config); int i; =20 result =3D caml_alloc_tuple(17); @@ -460,6 +461,19 @@ static value alloc_domaininfo(xc_domaininfo_t * info) =20 Store_field(arch_config, 0, x86_arch_config); =20 + Store_field(result, 16, arch_config); +#elif defined(__arm__) || defined(__aarch64__) + /* xen_arm_arch_domainconfig */ + arm_arch_config =3D caml_alloc_tuple(3); + Store_field(arm_arch_config, 0, Val_int(info->arch_config.gic_version)); + Store_field(arm_arch_config, 1, Val_int(info->arch_config.nr_spis)); + Store_field(arm_arch_config, 2, caml_copy_int32(info->arch_config.clock_f= requency)); + + /* arch_config: arch_domainconfig */ + arch_config =3D caml_alloc_small(1, 0); + + Store_field(arch_config, 0, arm_arch_config); + Store_field(result, 16, arch_config); #endif =20 --=20 2.53.0 --=20 Julian Vetter | Vates Hypervisor & Kernel Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ---=Part.13d4.6e6ab21c4c536447.19fa2d80b46.419e05ddcd83bf7f=---