From nobody Mon Nov 23 22:32:20 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=1794838924; cv=none; d=zohomail.com; s=zohoarc; b=MzK9s8Y6MT8+P0Cb/yix08Pyf1AsYftYCZCkvgfCNgvRZnszupNVrWE1D1appFVUBl1oNZoAXAMqFtGf7wU2tdGXNEWlR/l4f+4/XSgoST6t0rT+QmD3sEjOAFHa+qeOfeKXRwPO3jRYPg/JW4UYZ/K0yJG29eYkg2vsnbiJMq0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1794838924; 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=KZnGObi/Ct8KGM0Eq8ttyc4HgMX7fjJXFvCJyadvN70=; b=IVtpTI9Ya2uj+xTjPX2v0h2RoOhX8oaGC3+YUzbHu3xkorAj+oPD2KfsOg2YVUAjsbYq3ofcUVtZZuFTyCWpD3ipjXRqn9IB/064Qc9rImp33XoRchyZnw9TTjReVAhQk9wzrj9ar+UpwbBs8wPGAJmOdVfizJAkkLRxn7DK0f4= 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 1794838923805750.3216215782758; Mon, 16 Nov 2026 06:22:03 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1490988.1691897 (Exim 4.92) (envelope-from ) id 1xSxaQ-000140-2y; Mon, 16 Nov 2026 14:21:34 +0000 Received: by outflank-mailman (output) from mailman id 1490988.1691897; Mon, 16 Nov 2026 14:21:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xSxaP-00013t-WE; Mon, 16 Nov 2026 14:21:34 +0000 Received: by outflank-mailman (input) for mailman id 1490988; Mon, 16 Nov 2026 14:21:33 +0000 Received: from mx.expurgate.net ([194.145.224.20]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xSxaO-00013n-Oa for xen-devel@lists.xenproject.org; Mon, 16 Nov 2026 14:21:33 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1xSxaN-00BIvi-RV for xen-devel@lists.xenproject.org; Mon, 16 Nov 2026 15:21:31 +0100 Received: from [10.42.69.7] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6afb116a-8faa-0a2a0a5109dd-0a2a450790e0-6 for ; Mon, 16 Nov 2026 15:21:31 +0100 Received: from [185.255.28.18] (helo=prod-mta-13.swg-srv.net) by tlsNG-ef75cf.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6afb116b-b4ea-0a2a45070019-b9ff1c12a957-3 for ; Mon, 16 Nov 2026 15:21:31 +0100 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 1a1e4bbf7cb0006d3f.002 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 16 Nov 2026 14:21:26 +0000 Received: from julian.home (82-67-211-29.subs.proxad.net [82.67.211.29]) (Authenticated sender: julian.vetter@vates.tech) by mail2.vates.fr (Postfix) with ESMTPSA id 4B85C823EE; Mon, 16 Nov 2026 15:21:25 +0100 (CET) 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=KZnGObi/Ct8KGM0Eq8ttyc4HgMX7fjJXFvCJyadvN70=; h=from:subject:date:message-id:to:cc:mime-version:content-type:feedback-id; b=IPY1mMOyAKLqoFHwgVnEigvPfksYnAQx7vmthXTbziGfi/NSyxNbIIATGH9vQQZFOg9abE7y2 5HKOM/RJzYZ3ILJvZKfH9HGNyo/rWngA6T8abb4bPJYXcmrP6xG7X17vTqf6JPG1YAa9E6nMH4i 8beeAl2LfzCIN4Q1+4RVY/ujCnQEj/aGKGwum0kLlw5wwZ4S8ApU0OBMpQbt2TmWOzCKKsUAO+o GlsgiT20SK1yV4lvYufMzwZt1SP4spOooTfGnZcKU5Uj2qnASNOiZNQvhsZJmlpH0uXixUmI35G kjqkoKbwShnJpRLEj9i+C/kLqjdiSXp95JYDQa8DDXDQ== X-Zone-Loop: 9685577cebf433494ffd029f70fb34a8347a6be1e1fc x-campaign-type: default x-transaction-id: f86cc092-1139-48a4-a980-3117874cd010 x-swg-uid: 01-d02d1036-cfc8-411f-98bc-330ab304a29c X-Mailer: Sweego Message-ID: <1794838886.8631fc262581453bbf619ec5b2062170.1a1e4bbf7cb0006d3f@vates.tech> x-swg-bid: 1794838886.8631fc262581453bbf619ec5b2062170.1a1e4bbf7cb0006d3f 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: Andrew Cooper , Andrii Sultanov , Guillaume Thouvenin , Anthony PERARD , Julian Vetter Subject: [PATCH] tools/ocaml: Add misc_flags in the x86 domaininfo arch_config Date: Mon, 16 Nov 2026 15:21:19 +0100 MIME-Version: 1.0 X-BM-Disclaimer: Yes Content-Type: multipart/alternative; boundary="-=Part.1b5.33c8b9e6415a5dec.1a1e4bbf504.18e61474aad8a6f7=-" X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1794838885637 X-purgate-ID: tlsNG-ef75cf/1794838891-36CDFAE4-70E45C00/0/0 X-purgate-type: clean X-purgate-size: 2077 X-ZohoMail-DKIM: pass (identity @vates.tech) X-ZM-MESSAGEID: 1794838927993158500 ---=Part.1b5.33c8b9e6415a5dec.1a1e4bbf504.18e61474aad8a6f7=- Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The function alloc_domaininfo() allocates the x86 arch_config with a single field. Trying to access misc_flags after calling domain_getinfo() therefore results in a read past the end of the block. Allocate both fields, and convert misc_flags like emulation_flags. XEN_DOMCTL_getdomaininfo doesn't report misc_flags, so the list is always empty for now, but the record now matches its OCaml type. Signed-off-by: Julian Vetter --- tools/ocaml/libs/xc/xenctrl_stubs.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenc= trl_stubs.c index c15a3428da..7964f3e1e9 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -440,7 +440,7 @@ CAMLprim value stub_xc_domain_shutdown(value xch_val, v= alue domid, value reason) static value alloc_domaininfo(xc_domaininfo_t * info) { CAMLparam0(); - CAMLlocal4(result, tmp, arch_config, emul_list); + CAMLlocal5(result, tmp, arch_config, emul_list, misc_list); int tag =3D -1; int i; =20 @@ -490,9 +490,17 @@ static value alloc_domaininfo(xc_domaininfo_t * info) /* ! x86_arch_emulation_flags */ (info->arch_config.emulation_flags); =20 + /* + * misc_flags: x86_arch_misc_flags list; + */ + misc_list =3D c_bitmap_to_ocaml_list + /* ! x86_arch_misc_flags */ + (info->arch_config.misc_flags); + /* xen_x86_arch_domainconfig */ - arch_config =3D caml_alloc_tuple(1); + arch_config =3D caml_alloc_tuple(2); Field(arch_config, 0) =3D emul_list; + Field(arch_config, 1) =3D misc_list; =20 #endif if (tag < 0) --=20 2.53.0 --=20 Julian Vetter | Vates Hypervisor & Kernel Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech ---=Part.1b5.33c8b9e6415a5dec.1a1e4bbf504.18e61474aad8a6f7=---