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

Re: [PATCH v1 1/1] oxenstored: fix ABI breakage introduced in Xen 4.9.0

  • To: Edwin Torok <edvin.torok@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Christian Lindig <christian.lindig@xxxxxxxxxx>
  • Date: Wed, 15 Jul 2020 15:21:50 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxx>, Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, David Scott <dave@xxxxxxxxxx>
  • Delivery-date: Wed, 15 Jul 2020 15:21:58 +0000
  • Ironport-sdr: W1DqJkeJubrxKu7yPJiWNggEIR7mSRCcbs0MeMnq2nCNDXodK9+9W1jXkiyFf5tUSRnBhVhwTe ztUnWp7F2RqW/rFl0xj+z5jAq0XW5jpqOOJEbXtGub0MY0N6/nLa2Qm0N7yGgSJ/f3jQXW4uMW sChWFKxtVBqZDgOn9GpQmyM9z8d+EmpXL56aSdxzv3S/stBjExjXw8DuUzjLNwSjPnFFQEgKuz zQc9oazQ4wGhMr7y/9WQd3rZbSANlBx2EXMP5s9jTggeZFA1yiVU14Dcn7ibG3qIqKLdvjZPaO zUE=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWWro4sadfUNXtWUGmqr5ru6wdMKkIwcwd
  • Thread-topic: [PATCH v1 1/1] oxenstored: fix ABI breakage introduced in Xen 4.9.0

From: Edwin Török <edvin.torok@xxxxxxxxxx>
Sent: 15 July 2020 16:10
To: xen-devel@xxxxxxxxxxxxxxxxxxxx
Cc: Edwin Torok; Christian Lindig; David Scott; Ian Jackson; Wei Liu; Igor 
Subject: [PATCH v1 1/1] oxenstored: fix ABI breakage introduced in Xen 4.9.0

dbc84d2983969bb47d294131ed9e6bbbdc2aec49 (Xen >= 4.9.0) deleted XS_RESTRICT
from oxenstored, which caused all the following opcodes to be shifted by 1:
reset_watches became off-by-one compared to the C version of xenstored.

Looking at the C code the opcode for reset watches needs:

So add the placeholder `Invalid` in the OCaml<->C mapping list.
(Note that the code here doesn't simply convert the OCaml constructor to
 an integer, so we don't need to introduce a dummy constructor).

Igor says that with a suitably patched xenopsd to enable watch reset,
we now see `reset watches` during kdump of a guest in xenstored-access.log.

Signed-off-by: Edwin Török <edvin.torok@xxxxxxxxxx>
Tested-by: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
 tools/ocaml/libs/xb/op.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/ocaml/libs/xb/op.ml b/tools/ocaml/libs/xb/op.ml
index d4f1f08185..9bcab0f38c 100644
--- a/tools/ocaml/libs/xb/op.ml
+++ b/tools/ocaml/libs/xb/op.ml
@@ -28,7 +28,7 @@ let operation_c_mapping =
            Transaction_end; Introduce; Release;
            Getdomainpath; Write; Mkdir; Rm;
            Setperms; Watchevent; Error; Isintroduced;
-           Resume; Set_target; Reset_watches |]
+           Resume; Set_target; Invalid; Reset_watches |]
 let size = Array.length operation_c_mapping

 let array_search el a =

Acked-by: Christian Lindig <christian.lindig@xxxxxxxxxx>



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