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

Re: [PATCH] tools/xendomains: Restrict domid pattern in LIST_GREP


  • To: Peter Hoyes <Peter.Hoyes@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 18 Oct 2022 08:13:57 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=foh0/NlodilCKf9ZTJs38GGwrVWCeYoIbT1SNFQNe2w=; b=VUG1SMpxXe5Fjg4OnYLWeG7pfxLx76ZowdwmN7U4tru5EUAZk/bMu4q/0v3AhOpm8tk8xksgvYQF3p/rbBolQDjgTjvcIC9mCXP8qI0pzbHQ5Be9ZhmXxM89yznGUI92uOG+5mvTf6+v7Gmls1ZRQ8KTWelnPApArnzr6RduDENnVR4aWU13jp5Ht8B3Mef2sLS+sn+kR2G+qW+pO82ihVapJoA1ZuaXDlvG5BpOcna9xoIw98bazTuTCTMuJAPPkDwXl48qsSc4F7RuSKcxTi4JCCb0OY1yGVCh8qQ6NYOiIjZJEZ0rnKdP+1PPA9c5722zBVG+hFdqbf1mMuyoYg==
  • 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=foh0/NlodilCKf9ZTJs38GGwrVWCeYoIbT1SNFQNe2w=; b=G+yJrmofyuIiR421v+vrCZoMXl/D6lh3/zJ5g/itN/8JVMN5EKBkJEoTkTLE7Giu19hz3zuCPmfmnTigNRLII7BYJDbWSn24nfSYGiYr0ic9C2a9LnNJnK5+iIyWjfzc4tNpfQPyTGuwXpvJtEE7oJGEyEXCrGoulCjQsmuxtEk+SXpP0cFVnNEZglwI6pv52PfzXlk86q5ihDHpDtHH7rDN7W3IY0DKeYgf3HiHyL4H5rceuAsoJbK9XXXeDQKVBtNs/A4uHvfwU6JxVz9ej/wsAQqbwj/i/6yVHRgaAmTpMqL21cg+bhvjnjO1S+qHNTCZmXWD6snqa++DxsYvog==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Qrt77yaKtojvjMmOB1oT9TQw/l3vG8UTWEJvlpLPb5RsDLacimCne/+H8leg8xKo0xSjccHPX3ZiZUXl+ZK29fU0nBAld6Q2VxFt8G8KEl/OI+6ONE20EW3f690+26qycTMkfup2bwX3xdT1bcGoi5XltwcBvfCFBK+fm6ha5qeUITDDtk3cxWO3ExgjFCFzlzqcn0d6L+X+9esANIOxa9GNr5TYL4BzZt7DnGSprAqmDsBFJDfN31ZS0CZTYDJN2Lq4wgWNXNZWEz/WksPZQ5HEhtzMRq0kUtD8updjIS+2DvPvdQUzdWzMWK558q05hAnb7vXu/1j+MYecJPt9tQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nNw4LVSI6hNFpV8Rt7grgMKJowQdff2VugKAO+aqlqma32wMpEYseL6hH9h8WQQIKtSHBF3AUr9dg/gNWWFYNwANyDgLSak2acpFENYw4rHEEByIeITdOoK+F2eAWB+i0C0Uc01m1CBrCZKn/W9A+Ca8VACNDIvUE/6wRkRCuYpwfvOkBTLTUzFdVxmo6C7n6EvphJYxRiDx5xSeG+rIz7i5o3HpTl2UYo59P8AngbyWnSN2E7sQJi5kjhkmEXI8Y9k0Sy9iOo5PjvIK2magRll0OC4jtLu2eYmB9vjS9R3pMqt4fVmFvvXh6IKPdhli0XeDOdhrSMs3Qn2kLhgWUg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen developer discussion <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Diego Sueiro <Diego.Sueiro@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>
  • Delivery-date: Tue, 18 Oct 2022 08:14:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHY1zZSy8ha9+hxm0C1gDMvI07yO64T5LUA
  • Thread-topic: [PATCH] tools/xendomains: Restrict domid pattern in LIST_GREP

Hi,

Gentil ping on this one as it might be a suitable one for 4.17

Cheers
Bertrand

> On 3 Oct 2022, at 15:42, Peter Hoyes <Peter.Hoyes@xxxxxxx> wrote:
> 
> From: Peter Hoyes <Peter.Hoyes@xxxxxxx>
> 
> 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 <Peter.Hoyes@xxxxxxx>
> ---
> 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/xendomains.in
> index 334d244882..70f4129ef4 100644
> --- a/tools/hotplug/Linux/xendomains.in
> +++ b/tools/hotplug/Linux/xendomains.in
> @@ -211,7 +211,7 @@ get_xsdomid()
>     fi
> }
> 
> -LIST_GREP='(domain\|(domid\|(name\|^    {$\|"name":\|"domid":'
> +LIST_GREP='(domain\|(domid\|(name\|^    {$\|"name":\|^        "domid":'
> parseln()
> {
>     if [[ "$1" =~ '(domain' ]] || [[ "$1" = "{" ]]; then
> -- 
> 2.25.1
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.