From nobody Fri May 3 12:18:17 2024 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=yandex.ru ARC-Seal: i=1; a=rsa-sha256; t=1631784924; cv=none; d=zohomail.com; s=zohoarc; b=gK2GDw45fGzkLYhT9+rqkmya3R/7EOESRnSH8pfK02qKEmpqS3M67qbMVKXCT0xjkqZpIASc925RmOYlq1jCK1/Ug6tnwSHaVj7TJC35fgoeOiN/qd1iAKkEnsT0Wr/K+0BUu2PT33MGh3c7SubpSvsMWUWZZezSsZdCv2zvTP0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631784924; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=C58Nyuu69+QXNydcYAmmqxNxFseKKbI9nuzRv/qU388=; b=AFtQlNVhhvwX/Fwp50LzZmf6Xl6oZMeDZzA+P51gQuvn6ILKaZ5LlY3ZAEgPS0TbuANKAf1B4py8aJlmGFKUmzc21fFkajhEFXm0YH6k63zakF9GbLXvH39yCihSREddVLdcHU9EW2GZ8to2nRUfjWQQofN1zN63+2AyNskEwsg= 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 1631784924827174.47453812016852; Thu, 16 Sep 2021 02:35:24 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.188283.337400 (Exim 4.92) (envelope-from ) id 1mQnn7-0005d1-3y; Thu, 16 Sep 2021 09:34:49 +0000 Received: by outflank-mailman (output) from mailman id 188283.337400; Thu, 16 Sep 2021 09:34:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mQnn7-0005cu-0v; Thu, 16 Sep 2021 09:34:49 +0000 Received: by outflank-mailman (input) for mailman id 188283; Thu, 16 Sep 2021 09:34:47 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mQnn4-0005co-S4 for xen-devel@lists.xenproject.org; Thu, 16 Sep 2021 09:34:47 +0000 Received: from forward102o.mail.yandex.net (unknown [37.140.190.182]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8cfc301c-fe41-4a0e-88ae-4e046f7aaba5; Thu, 16 Sep 2021 09:34:43 +0000 (UTC) Received: from myt4-5dd3963c4bb1.qloud-c.yandex.net (myt4-5dd3963c4bb1.qloud-c.yandex.net [IPv6:2a02:6b8:c12:525:0:640:5dd3:963c]) by forward102o.mail.yandex.net (Yandex) with ESMTP id 085ED6FFAE38; Thu, 16 Sep 2021 12:34:21 +0300 (MSK) Received: from myt6-016ca1315a73.qloud-c.yandex.net (myt6-016ca1315a73.qloud-c.yandex.net [2a02:6b8:c12:4e0e:0:640:16c:a131]) by myt4-5dd3963c4bb1.qloud-c.yandex.net (mxback/Yandex) with ESMTP id EBAyEc8Chw-YKE8rcCd; Thu, 16 Sep 2021 12:34:20 +0300 Received: by myt6-016ca1315a73.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id LLaIuIUSvU-YINeeR6k; Thu, 16 Sep 2021 12:34:18 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) 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: 8cfc301c-fe41-4a0e-88ae-4e046f7aaba5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1631784860; bh=C58Nyuu69+QXNydcYAmmqxNxFseKKbI9nuzRv/qU388=; h=Message-Id:Date:Subject:To:From:Cc; b=hosA1EL9TtCwvILAPgrnm0pzj3hRubo4yXDkY0oYCpJFT7x3pFvzQZug4p/IlnOxL 2tysvuFRPovk0BYu8R0YXdWwXbEl8Ft12ZHDhqjN5KJgr8wuyiVZwiBSN0DZmCcK+1 MSwF32FmkXYsiqiU10ybfBIiXcoRoqqgPkwbGBkM= Authentication-Results: myt4-5dd3963c4bb1.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru From: Dmitry Isaikin To: xen-devel@lists.xenproject.org Cc: Dmitry Isaykin , Ian Jackson , Wei Liu , Anthony PERARD Subject: [PATCH v2] tools/xl: fix autoballoon regex Date: Thu, 16 Sep 2021 12:34:14 +0300 Message-Id: <6be4aba579bda042bef4cf0991a92444d0c3f05e.1631781599.git.isaikin-dmitry@yandex.ru> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @yandex.ru) X-ZM-MESSAGEID: 1631784925770100001 Content-Type: text/plain; charset="utf-8" From: Dmitry Isaykin This regex is used for auto-balloon mode detection based on Xen command lin= e. The case of specifying a negative size was handled incorrectly. From misc/xen-command-line documentation: dom0_mem (x86) =3D List of ( min: | max: | ) If a size is positive, it represents an absolute value. If a size is negative, it is subtracted from the total available memory. Signed-off-by: Dmitry Isaykin --- Changes in v2: - add missing Signed-off-by tag --- tools/xl/xl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xl/xl.c b/tools/xl/xl.c index 4107d10fd4..a9f7e769fd 100644 --- a/tools/xl/xl.c +++ b/tools/xl/xl.c @@ -81,7 +81,7 @@ static int auto_autoballoon(void) return 1; /* default to on */ =20 ret =3D regcomp(®ex, - "(^| )dom0_mem=3D((|min:|max:)[0-9]+[bBkKmMgG]?,?)+($| )= ", + "(^| )dom0_mem=3D((|min:|max:)-?[0-9]+[bBkKmMgG]?,?)+($|= )", REG_NOSUB | REG_EXTENDED); if (ret) return 1; --=20 2.33.0