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

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


  • To: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 20 Oct 2022 16:06:16 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Peter Hoyes <Peter.Hoyes@xxxxxxx>, Xen developer discussion <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Diego Sueiro <Diego.Sueiro@xxxxxxx>, "Ian Jackson" <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>
  • Delivery-date: Thu, 20 Oct 2022 15:06:39 +0000
  • Ironport-data: A9a23:L5+ZQqz7YJOneQ45mYF6t+fVxirEfRIJ4+MujC+fZmUNrF6WrkVSx 2caWjvSOPaMYmvyLdEgPNuxpEtSuJXQyYJqSwpkpSAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHPykYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFtspvlDs15K6o4WtC5gRnDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw/dgoKGBK8 aMjOGoIVDbf29ronqOmY7w57igjBJGD0II3v3hhyXfSDOo8QICFSKLPjTNa9G5u3IYUR6+YP pdHL2o0BPjDS0Qn1lM/AZQinOCulz/nfidRsl69rqsr+WnDigd21dABNfKFJ4LbG5kPxi50o Erc1WShISMdF+fG0Bnb0FaRqKzxjBzSDdd6+LqQqacx3Qz7KnYoIBwJV3OrrP+hkEm8VtlDb UsO9UIGsqwa5EGtCN7nUHWQgHOCpA9aZNNWHMUz8gTLwa3Riy61B2ULSXh6ddEnrsgeTCYvk FSOmrvBLzF1rKecT37b076OtC6zIgAcN2pEbigBJSM97sXuuscTiQPCVf5qCqvzhdrwcRngz jbPoCUgirE7ic8Qy7797V3BmyirpJXCUkgy/Aq/Y46+xlonPsj/PdXusAWFq6YbRGqEcrWfl H86xOGf6ORRNoHXkRarHLk1Qu+4+t/QZVUwnmVTN5Um8j2s/VuqcoZR/CxyKS9VDyoURdP6S BSN4F0Mvfe/KFPvNPYqONzpV6zG2IC6TbzYuubogs2ii3SbXCuO52lQaEGZxAgBe2B8wPhka f93nStBZEv26JiLLhLsGo/xMpdxnEjSIF8/oriilnyaPUK2PiL9dFv8GALmghoFxK2Fuh7J1 N1UKtGHzR5SOMWnPHeJqNdDcQxUdiVhbXwTlyCwXrfZSjeK5Ul7U6OBqV/fU9YNc1tpehfgo SjmBx4wJKvXjnzbMwSaAk1ehEfUdc8n9xoTZHV0VX7xgiRLXGpaxPpGH3fBVeJ8r7ILID8dZ 6RtRvhs9dwTEGiYqmtAMsSmxGGgHTzy7T+z0+OeSGBXV/Zdq8bhoLcIoiOHGPEyMxeK
  • Ironport-hdrordr: A9a23:12FmS6FihngCJ35tpLqE6seALOsnbusQ8zAXP0AYc31om+ij5q eTdZUgpHvJYVkqNE3I9eruBEDEewK7yXcX2/h1AV7BZniEhILAFugLhuGO/9SjIVydygc079 YYT0EUMr3N5DZB4/rH3A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Oct 18, 2022 at 08:13:57AM +0000, Bertrand Marquis wrote:
> Hi,
> 
> Gentil ping on this one as it might be a suitable one for 4.17

Yeah, that might be a good bug fix to have.

> > 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>

Parsing json with bash, grep and sed, what could go wrong :-). Anyway,
patch looks fine:

Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Thanks,

-- 
Anthony PERARD



 


Rackspace

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