From nobody Sun Feb 8 18:08:45 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; 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=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1664808147718103.39392563505476; Mon, 3 Oct 2022 07:42:27 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.414901.659324 (Exim 4.92) (envelope-from ) id 1ofMdr-0003DH-QJ; Mon, 03 Oct 2022 14:41:59 +0000 Received: by outflank-mailman (output) from mailman id 414901.659324; Mon, 03 Oct 2022 14:41:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ofMdr-0003DA-NR; Mon, 03 Oct 2022 14:41:59 +0000 Received: by outflank-mailman (input) for mailman id 414901; Mon, 03 Oct 2022 14:41:58 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ofMdq-0003D4-Nx for xen-devel@lists.xenproject.org; Mon, 03 Oct 2022 14:41:58 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id 8683f197-4329-11ed-964a-05401a9f4f97; Mon, 03 Oct 2022 16:41:56 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 33F50176B; Mon, 3 Oct 2022 07:42:01 -0700 (PDT) Received: from e125920.arm.com (unknown [10.57.80.219]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 38DCC3F73B; Mon, 3 Oct 2022 07:41:53 -0700 (PDT) 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" X-Inumbo-ID: 8683f197-4329-11ed-964a-05401a9f4f97 From: Peter Hoyes To: xen-devel@lists.xenproject.org Cc: bertrand.marquis@arm.com, diego.sueiro@arm.com, Peter Hoyes , Ian Jackson , Wei Liu Subject: [PATCH] tools/xendomains: Restrict domid pattern in LIST_GREP Date: Mon, 3 Oct 2022 15:42:16 +0100 Message-Id: <20221003144216.2297632-1-peter.hoyes@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1664808148644100001 Content-Type: text/plain; charset="utf-8" From: Peter Hoyes The xendomains script uses the output of `xl list -l` to collect the id and name of each domain, which is used in the shutdown logic, amongst other purposes. The linked commit added a "domid" field to libxl_domain_create_info. This causes the output of `xl list -l` to contain two "domid"s per domain, which may not be equal. This in turn causes `xendomains stop` to issue two shutdown commands per domain, one of which is to a duplicate and/or invalid domid. To work around this, make the LIST_GREP pattern more restrictive for domid, so it only detects the domid at the top level and not the domid inside c_info. Fixes: 4a3a25678d92 ("libxl: allow creation of domains with a specified or random domid") Signed-off-by: Peter Hoyes Acked-by: Anthony PERARD --- tools/hotplug/Linux/xendomains.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/hotplug/Linux/xendomains.in b/tools/hotplug/Linux/xendom= ains.in index 334d244882..70f4129ef4 100644 --- a/tools/hotplug/Linux/xendomains.in +++ b/tools/hotplug/Linux/xendomains.in @@ -211,7 +211,7 @@ get_xsdomid() fi } =20 -LIST_GREP=3D'(domain\|(domid\|(name\|^ {$\|"name":\|"domid":' +LIST_GREP=3D'(domain\|(domid\|(name\|^ {$\|"name":\|^ "domid":' parseln() { if [[ "$1" =3D~ '(domain' ]] || [[ "$1" =3D "{" ]]; then --=20 2.25.1