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

RE: [PATCH for-4.17] tools/ocaml/xenstored: fix live update exception


  • To: Edwin Török <edvin.torok@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 21 Oct 2022 01:51:37 +0000
  • Accept-language: zh-CN, 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=Zguq9kvnBtCiJ0MP0VGOCtOPayaIcJTAyjeljmE1njc=; b=B9IwpWYxFqxZXRnbueuS4TLXH0LYq/xBQKOqo5RV+g1v81V+Q1xelEjVdyY2Fke90VpjFpdxQFQNj6KMnxPjTlp9Sg+o+57bDvkT508NTTm8vBaKXEuxZuduVRc5XkaUMJPj3Dxx4+/eHtEgJBVLMzDczCmKKgCXoNRKOK7YC+rmSTieNZwFJjmZQfoL3FXcQfsvSKegeTUESNVDtN24gFPB5BotzMtN+1YVgLBMSwNAlY43o2bor3yw6pKcFaYAeS5EL+DoilYUfTB92cgw+bJmFdCN9dSvqQfyri/KFN4MmpqKbJ6TWx4R80e8wZjmcS7kiliRTnqzn0EOoDRnvg==
  • 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=Zguq9kvnBtCiJ0MP0VGOCtOPayaIcJTAyjeljmE1njc=; b=a4AIBBNZ42Y+iYFThu+6sAa1wQKvMjlx0c1Yt2dmpFdGPElNNEjEGGo/m8QNrYaKy6CIiX5hdtmtZcvzd88Uadk/aFwBYBmwN5ukr3m/awhASs4NxUNNfpLt89GJZUuWasvDqOvJnFTYJCs2KoPuJ3mjl9ej/7CilzQfsgLEXb3S55BpwYCD+nxk/t/0U24fS7C8FxF9mMw9/+kt3gTbSNyFMLPS6AaJ789f3EFYWhG1uMOzP0LFc2jLsCPhhziDze3o7jbZrPjtbqr9iUFWz9RepWd0EhFCN3/QIRQk0asvi7mIy8H2Nt7ZNezOE4rvmwn2dO0hF9pnUcYzL8k7JA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=hnMuhI++YiRqsJkjr9lX+C7enQSBtPCKB3lRZ9C+i6ietfAOaF8yRuMD4tyqLvaTBWDDn/ukWnL4JOtQBSdr+KVBVIjrtcSPQWq2YtoHyKj+CtqIPefaHtCyuaPQjiGoVrx/MW9rV37CMciWZNyYBrKJadObKzXIO0XhJOW1mWDGfeCgxr8yPWcZqyXBriiIUeLA7ydPLh5vOHwhhomF8pP0Ux/csplepgS6ED8CVKL0fzexAbgFchX1xkeKb5Q0Mru3QLmNfxsOOx1/V+26EryCyyzpU2DZwJQ7JiYCXB3PDzykQnLAVO1m6B3nFcMetS9WpcHhpy67z0FFFLA78g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L+T8/D7BqN90lgqYtvqMax6nPcnNHsTDtifJeq8U5jFeD7tUwPYrP3giK+xzDMrRFlmSUGz2LlFD7upoFJtZjOA2UeP2eq+b3U4+/ahCIgGrKSU1QRsLrC/4TWTOfnT1+EFnvAqG5ZtERZfEgOKHRWyRjkkWZIOkveRK6S5G7JsYHIeu2yBF8sjaWyAyNRS5i6OoFxW4DqqQAhYK1xYS3ZFhrdYbY6GklLbXhkrXcuGyQS07cHNdxDiygi8pubfFD0i7y5puYg9A+k8sg2uOVSiQJnnoI7cy5Z+oSKVI8INEhtqY7+lvdk5DcG3X3GxbmWlV61W21avFTQKQ8pAvEQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: David Scott <dave@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Fri, 21 Oct 2022 01:52:03 +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: AQHY5KTKwWQiC9Lco0elva4YOgIdSa4YFJwg
  • Thread-topic: [PATCH for-4.17] tools/ocaml/xenstored: fix live update exception

Hi Edwin,

> -----Original Message-----
> From: Edwin Török <edvin.torok@xxxxxxxxxx>
> Subject: [PATCH for-4.17] tools/ocaml/xenstored: fix live update exception
> 
> During live update we will load the /tool/xenstored path from the previous
> binary,
> and then try to mkdir /tool again which will fail with EEXIST.
> Check for existence of the path before creating it.
> 
> The write call to /tool/xenstored should not need any changes
> (and we do want to overwrite any previous path, in case it changed).
> 
> Prior to 7110192b1df6 live update would work only if the binary path was
> specified, and with 7110192b1df6 and this live update also works when
> no binary path is specified in `xenstore-control live-update`.
> 
> Fixes: 7110192b1df6 ("tools/oxenstored: Fix Oxenstored Live Update")
> Signed-off-by: Edwin Török <edvin.torok@xxxxxxxxxx>

As per [1] described, I think it is quite reasonable to include this patch for
4.17, as this patch is a bugfix and the patch in [1] already have the ack and
release ack. Although I would also like to hear the opinion from
Christian (the ocaml maintainer) to just play safe.

[1] 
https://lore.kernel.org/xen-devel/F65C8E58-EF3D-47D9-A94E-7B70EB93E068@xxxxxxxxxx/

Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry

> ---
>  tools/ocaml/xenstored/xenstored.ml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/ocaml/xenstored/xenstored.ml
> b/tools/ocaml/xenstored/xenstored.ml
> index fc90fcdeb5..3299fe73f7 100644
> --- a/tools/ocaml/xenstored/xenstored.ml
> +++ b/tools/ocaml/xenstored/xenstored.ml
> @@ -353,7 +353,9 @@ let _ =
>       ) in
> 
>       (* required for xenstore-control to detect availability of live-update 
> *)
> -     Store.mkdir store Perms.Connection.full_rights (Store.Path.of_string
> "/tool");
> +     let tool_path = Store.Path.of_string "/tool" in
> +     if not (Store.path_exists store tool_path) then
> +                                     Store.mkdir store
> Perms.Connection.full_rights tool_path;
>       Store.write store Perms.Connection.full_rights
>               (Store.Path.of_string "/tool/xenstored")
> Sys.executable_name;
> 
> 
> base-commit: 0c06760be3dc3f286015e18c4b1d1694e55da026
> --
> 2.34.1


 


Rackspace

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