mbox series

[v2,00/17] live update and gnttab patches

Message ID cover.1620755942.git.edvin.torok@citrix.com (mailing list archive)
Headers show
Series live update and gnttab patches | expand

Message

Edwin Torok May 11, 2021, 6:05 p.m. UTC
These patches have been posted previously.
The gnttab patches (tools/ocaml/libs/mmap) were not applied at the time
to avoid conflicts with an in-progress XSA.
The binary format live-update and fuzzing patches were not applied
because it was too close to the next Xen release freeze.

The patches depend on each-other: live-update only works correctly when the gnttab
patches are taken too (MFN is not part of the binary live-update stream),
so they are included here as a single series.
The gnttab patches replaces one use of libxenctrl with stable interfaces, leaving one unstable
libxenctrl interface used by oxenstored.

The 'vendor external dependencies' may be optional, it is useful to be part
of a patchqueue in a specfile so that you can build everything without external dependencies,
but might as well commit it so everyone has it easily available not just XenServer.

Note that the live-update fuzz test doesn't yet pass, it is still able to find bugs.
However the reduced version with a fixed seed used as a unit test does pass,
so it is useful to have it committed, and further improvements can be made later
as more bugs are discovered and fixed.

Edwin Török (17):
  docs/designs/xenstore-migration.md: clarify that deletes are recursive
  tools/ocaml: add unit test skeleton with Dune build system
  tools/ocaml: vendor external dependencies for convenience
  tools/ocaml/xenstored: implement the live migration binary format
  tools/ocaml/xenstored: add binary dump format support
  tools/ocaml/xenstored: add support for binary format
  tools/ocaml/xenstored: validate config file before live update
  Add structured fuzzing unit test
  tools/ocaml: use common macros for manipulating mmap_interface
  tools/ocaml/libs/mmap: allocate correct number of bytes
  tools/ocaml/libs/mmap: Expose stub_mmap_alloc
  tools/ocaml/libs/mmap: mark mmap/munmap as blocking
  tools/ocaml/libs/xb: import gnttab stubs from mirage
  tools/ocaml: safer Xenmmap interface
  tools/ocaml/xenstored: use gnttab instead of xenctrl's
    foreign_map_range
  tools/ocaml/xenstored: don't store domU's mfn of ring page
  tools/ocaml/libs/mmap: Clean up unused read/write

 docs/designs/xenstore-migration.md            |    3 +-
 tools/ocaml/.gitignore                        |    2 +
 tools/ocaml/Makefile                          |   53 +
 tools/ocaml/dune-project                      |    5 +
 tools/ocaml/duniverse/cmdliner/.gitignore     |   10 +
 tools/ocaml/duniverse/cmdliner/.ocp-indent    |    1 +
 tools/ocaml/duniverse/cmdliner/B0.ml          |    9 +
 tools/ocaml/duniverse/cmdliner/CHANGES.md     |  255 +++
 tools/ocaml/duniverse/cmdliner/LICENSE.md     |   13 +
 tools/ocaml/duniverse/cmdliner/Makefile       |   77 +
 tools/ocaml/duniverse/cmdliner/README.md      |   51 +
 tools/ocaml/duniverse/cmdliner/_tags          |    3 +
 tools/ocaml/duniverse/cmdliner/build.ml       |  155 ++
 tools/ocaml/duniverse/cmdliner/cmdliner.opam  |   32 +
 tools/ocaml/duniverse/cmdliner/doc/api.odocl  |    1 +
 tools/ocaml/duniverse/cmdliner/dune-project   |    2 +
 tools/ocaml/duniverse/cmdliner/pkg/META       |    7 +
 tools/ocaml/duniverse/cmdliner/pkg/pkg.ml     |   33 +
 .../ocaml/duniverse/cmdliner/src/cmdliner.ml  |  309 ++++
 .../ocaml/duniverse/cmdliner/src/cmdliner.mli | 1624 +++++++++++++++++
 .../duniverse/cmdliner/src/cmdliner.mllib     |   11 +
 .../duniverse/cmdliner/src/cmdliner_arg.ml    |  356 ++++
 .../duniverse/cmdliner/src/cmdliner_arg.mli   |  111 ++
 .../duniverse/cmdliner/src/cmdliner_base.ml   |  302 +++
 .../duniverse/cmdliner/src/cmdliner_base.mli  |   68 +
 .../duniverse/cmdliner/src/cmdliner_cline.ml  |  199 ++
 .../duniverse/cmdliner/src/cmdliner_cline.mli |   34 +
 .../duniverse/cmdliner/src/cmdliner_docgen.ml |  352 ++++
 .../cmdliner/src/cmdliner_docgen.mli          |   30 +
 .../duniverse/cmdliner/src/cmdliner_info.ml   |  233 +++
 .../duniverse/cmdliner/src/cmdliner_info.mli  |  140 ++
 .../cmdliner/src/cmdliner_manpage.ml          |  502 +++++
 .../cmdliner/src/cmdliner_manpage.mli         |  100 +
 .../duniverse/cmdliner/src/cmdliner_msg.ml    |  116 ++
 .../duniverse/cmdliner/src/cmdliner_msg.mli   |   56 +
 .../cmdliner/src/cmdliner_suggest.ml          |   54 +
 .../cmdliner/src/cmdliner_suggest.mli         |   25 +
 .../duniverse/cmdliner/src/cmdliner_term.ml   |   41 +
 .../duniverse/cmdliner/src/cmdliner_term.mli  |   40 +
 .../duniverse/cmdliner/src/cmdliner_trie.ml   |   97 +
 .../duniverse/cmdliner/src/cmdliner_trie.mli  |   35 +
 tools/ocaml/duniverse/cmdliner/src/dune       |    4 +
 tools/ocaml/duniverse/cmdliner/test/chorus.ml |   31 +
 tools/ocaml/duniverse/cmdliner/test/cp_ex.ml  |   54 +
 .../ocaml/duniverse/cmdliner/test/darcs_ex.ml |  149 ++
 tools/ocaml/duniverse/cmdliner/test/dune      |   12 +
 tools/ocaml/duniverse/cmdliner/test/revolt.ml |    9 +
 tools/ocaml/duniverse/cmdliner/test/rm_ex.ml  |   53 +
 .../ocaml/duniverse/cmdliner/test/tail_ex.ml  |   73 +
 .../ocaml/duniverse/cmdliner/test/test_man.ml |  100 +
 .../duniverse/cmdliner/test/test_man_utf8.ml  |   11 +
 .../duniverse/cmdliner/test/test_opt_req.ml   |   13 +
 .../ocaml/duniverse/cmdliner/test/test_pos.ml |   13 +
 .../duniverse/cmdliner/test/test_pos_all.ml   |   11 +
 .../duniverse/cmdliner/test/test_pos_left.ml  |   11 +
 .../duniverse/cmdliner/test/test_pos_req.ml   |   15 +
 .../duniverse/cmdliner/test/test_pos_rev.ml   |   14 +
 .../duniverse/cmdliner/test/test_term_dups.ml |   19 +
 .../cmdliner/test/test_with_used_args.ml      |   18 +
 tools/ocaml/duniverse/cppo/.gitignore         |    5 +
 tools/ocaml/duniverse/cppo/.ocp-indent        |   22 +
 tools/ocaml/duniverse/cppo/.travis.yml        |   16 +
 tools/ocaml/duniverse/cppo/CODEOWNERS         |    8 +
 tools/ocaml/duniverse/cppo/Changes            |   85 +
 tools/ocaml/duniverse/cppo/INSTALL.md         |   17 +
 tools/ocaml/duniverse/cppo/LICENSE.md         |   24 +
 tools/ocaml/duniverse/cppo/Makefile           |   18 +
 tools/ocaml/duniverse/cppo/README.md          |  521 ++++++
 tools/ocaml/duniverse/cppo/VERSION            |    1 +
 tools/ocaml/duniverse/cppo/appveyor.yml       |   14 +
 tools/ocaml/duniverse/cppo/cppo.opam          |   31 +
 .../ocaml/duniverse/cppo/cppo_ocamlbuild.opam |   27 +
 tools/ocaml/duniverse/cppo/dune-project       |    3 +
 tools/ocaml/duniverse/cppo/examples/Makefile  |    8 +
 tools/ocaml/duniverse/cppo/examples/debug.ml  |    7 +
 tools/ocaml/duniverse/cppo/examples/dune      |   32 +
 tools/ocaml/duniverse/cppo/examples/french.ml |   34 +
 tools/ocaml/duniverse/cppo/examples/lexer.mll |    9 +
 .../duniverse/cppo/ocamlbuild_plugin/_tags    |    1 +
 .../duniverse/cppo/ocamlbuild_plugin/dune     |    6 +
 .../cppo/ocamlbuild_plugin/ocamlbuild_cppo.ml |   35 +
 .../ocamlbuild_plugin/ocamlbuild_cppo.mli     |    9 +
 tools/ocaml/duniverse/cppo/src/compat.ml      |    7 +
 .../ocaml/duniverse/cppo/src/cppo_command.ml  |   63 +
 .../ocaml/duniverse/cppo/src/cppo_command.mli |   11 +
 tools/ocaml/duniverse/cppo/src/cppo_eval.ml   |  697 +++++++
 tools/ocaml/duniverse/cppo/src/cppo_eval.mli  |   29 +
 tools/ocaml/duniverse/cppo/src/cppo_lexer.mll |  721 ++++++++
 tools/ocaml/duniverse/cppo/src/cppo_main.ml   |  230 +++
 .../ocaml/duniverse/cppo/src/cppo_parser.mly  |  266 +++
 tools/ocaml/duniverse/cppo/src/cppo_types.ml  |   98 +
 tools/ocaml/duniverse/cppo/src/cppo_types.mli |   70 +
 .../ocaml/duniverse/cppo/src/cppo_version.mli |    1 +
 tools/ocaml/duniverse/cppo/src/dune           |   21 +
 tools/ocaml/duniverse/cppo/test/capital.cppo  |    6 +
 tools/ocaml/duniverse/cppo/test/capital.ref   |    6 +
 tools/ocaml/duniverse/cppo/test/comments.cppo |    7 +
 tools/ocaml/duniverse/cppo/test/comments.ref  |    8 +
 tools/ocaml/duniverse/cppo/test/cond.cppo     |   47 +
 tools/ocaml/duniverse/cppo/test/cond.ref      |   17 +
 tools/ocaml/duniverse/cppo/test/dune          |  130 ++
 tools/ocaml/duniverse/cppo/test/ext.cppo      |   10 +
 tools/ocaml/duniverse/cppo/test/ext.ref       |   28 +
 tools/ocaml/duniverse/cppo/test/incl.cppo     |    3 +
 tools/ocaml/duniverse/cppo/test/incl2.cppo    |    1 +
 tools/ocaml/duniverse/cppo/test/loc.cppo      |    8 +
 tools/ocaml/duniverse/cppo/test/loc.ref       |   21 +
 .../ocaml/duniverse/cppo/test/paren_arg.cppo  |    3 +
 tools/ocaml/duniverse/cppo/test/paren_arg.ref |    4 +
 tools/ocaml/duniverse/cppo/test/source.sh     |   13 +
 tools/ocaml/duniverse/cppo/test/test.cppo     |  144 ++
 tools/ocaml/duniverse/cppo/test/tuple.cppo    |   38 +
 tools/ocaml/duniverse/cppo/test/tuple.ref     |   20 +
 .../ocaml/duniverse/cppo/test/unmatched.cppo  |   14 +
 tools/ocaml/duniverse/cppo/test/unmatched.ref |   15 +
 tools/ocaml/duniverse/cppo/test/version.cppo  |   30 +
 tools/ocaml/duniverse/crowbar/.gitignore      |    5 +
 tools/ocaml/duniverse/crowbar/CHANGES.md      |    9 +
 tools/ocaml/duniverse/crowbar/LICENSE.md      |    8 +
 tools/ocaml/duniverse/crowbar/README.md       |   82 +
 tools/ocaml/duniverse/crowbar/crowbar.opam    |   33 +
 tools/ocaml/duniverse/crowbar/dune            |    1 +
 tools/ocaml/duniverse/crowbar/dune-project    |    2 +
 .../duniverse/crowbar/examples/.gitignore     |    1 +
 .../duniverse/crowbar/examples/calendar/dune  |    3 +
 .../examples/calendar/test_calendar.ml        |   29 +
 .../duniverse/crowbar/examples/fpath/dune     |    4 +
 .../crowbar/examples/fpath/test_fpath.ml      |   18 +
 .../duniverse/crowbar/examples/input/testcase |    1 +
 .../ocaml/duniverse/crowbar/examples/map/dune |    3 +
 .../crowbar/examples/map/test_map.ml          |   47 +
 .../duniverse/crowbar/examples/pprint/dune    |    3 +
 .../crowbar/examples/pprint/test_pprint.ml    |   39 +
 .../crowbar/examples/serializer/dune          |    3 +
 .../crowbar/examples/serializer/serializer.ml |   34 +
 .../examples/serializer/test_serializer.ml    |   47 +
 .../duniverse/crowbar/examples/uunf/dune      |    3 +
 .../crowbar/examples/uunf/test_uunf.ml        |   75 +
 .../duniverse/crowbar/examples/xmldiff/dune   |    3 +
 .../crowbar/examples/xmldiff/test_xmldiff.ml  |   42 +
 tools/ocaml/duniverse/crowbar/src/crowbar.ml  |  582 ++++++
 tools/ocaml/duniverse/crowbar/src/crowbar.mli |  251 +++
 tools/ocaml/duniverse/crowbar/src/dune        |    3 +
 tools/ocaml/duniverse/crowbar/src/todo        |   16 +
 tools/ocaml/duniverse/csexp/CHANGES.md        |   45 +
 tools/ocaml/duniverse/csexp/LICENSE.md        |   21 +
 tools/ocaml/duniverse/csexp/Makefile          |   23 +
 tools/ocaml/duniverse/csexp/README.md         |   33 +
 .../duniverse/csexp/bench/csexp_bench.ml      |   22 +
 tools/ocaml/duniverse/csexp/bench/dune        |   11 +
 tools/ocaml/duniverse/csexp/bench/main.ml     |    1 +
 tools/ocaml/duniverse/csexp/bench/runner.sh   |    4 +
 tools/ocaml/duniverse/csexp/csexp.opam        |   51 +
 .../ocaml/duniverse/csexp/csexp.opam.template |   14 +
 tools/ocaml/duniverse/csexp/dune-project      |   42 +
 .../ocaml/duniverse/csexp/dune-workspace.dev  |    6 +
 tools/ocaml/duniverse/csexp/src/csexp.ml      |  333 ++++
 tools/ocaml/duniverse/csexp/src/csexp.mli     |  369 ++++
 tools/ocaml/duniverse/csexp/src/dune          |    3 +
 tools/ocaml/duniverse/csexp/test/dune         |    6 +
 tools/ocaml/duniverse/csexp/test/test.ml      |  142 ++
 tools/ocaml/duniverse/dune                    |    4 +
 tools/ocaml/duniverse/fmt/.gitignore          |    8 +
 tools/ocaml/duniverse/fmt/.ocp-indent         |    1 +
 tools/ocaml/duniverse/fmt/CHANGES.md          |   98 +
 tools/ocaml/duniverse/fmt/LICENSE.md          |   13 +
 tools/ocaml/duniverse/fmt/README.md           |   35 +
 tools/ocaml/duniverse/fmt/_tags               |    7 +
 tools/ocaml/duniverse/fmt/doc/api.odocl       |    3 +
 tools/ocaml/duniverse/fmt/doc/index.mld       |   11 +
 tools/ocaml/duniverse/fmt/dune-project        |    2 +
 tools/ocaml/duniverse/fmt/fmt.opam            |   35 +
 tools/ocaml/duniverse/fmt/pkg/META            |   40 +
 tools/ocaml/duniverse/fmt/pkg/pkg.ml          |   18 +
 tools/ocaml/duniverse/fmt/src/dune            |   30 +
 tools/ocaml/duniverse/fmt/src/fmt.ml          |  787 ++++++++
 tools/ocaml/duniverse/fmt/src/fmt.mli         |  689 +++++++
 tools/ocaml/duniverse/fmt/src/fmt.mllib       |    1 +
 tools/ocaml/duniverse/fmt/src/fmt_cli.ml      |   32 +
 tools/ocaml/duniverse/fmt/src/fmt_cli.mli     |   45 +
 tools/ocaml/duniverse/fmt/src/fmt_cli.mllib   |    1 +
 tools/ocaml/duniverse/fmt/src/fmt_top.ml      |   23 +
 tools/ocaml/duniverse/fmt/src/fmt_top.mllib   |    1 +
 tools/ocaml/duniverse/fmt/src/fmt_tty.ml      |   78 +
 tools/ocaml/duniverse/fmt/src/fmt_tty.mli     |   50 +
 tools/ocaml/duniverse/fmt/src/fmt_tty.mllib   |    1 +
 .../duniverse/fmt/src/fmt_tty_top_init.ml     |   23 +
 tools/ocaml/duniverse/fmt/test/test.ml        |  322 ++++
 .../duniverse/ocaml-afl-persistent/.gitignore |    2 +
 .../duniverse/ocaml-afl-persistent/CHANGES.md |   22 +
 .../duniverse/ocaml-afl-persistent/LICENSE.md |    8 +
 .../duniverse/ocaml-afl-persistent/README.md  |   17 +
 .../ocaml-afl-persistent/afl-persistent.opam  |   49 +
 .../afl-persistent.opam.template              |   16 +
 .../aflPersistent.available.ml                |   21 +
 .../ocaml-afl-persistent/aflPersistent.mli    |    1 +
 .../aflPersistent.stub.ml                     |    1 +
 .../duniverse/ocaml-afl-persistent/detect.sh  |   43 +
 .../ocaml/duniverse/ocaml-afl-persistent/dune |   20 +
 .../ocaml-afl-persistent/dune-project         |   23 +
 .../duniverse/ocaml-afl-persistent/test.ml    |    3 +
 .../ocaml-afl-persistent/test/harness.ml      |   22 +
 .../ocaml-afl-persistent/test/test.ml         |   73 +
 .../ocaml-afl-persistent/test/test.sh         |   33 +
 .../ocaml/duniverse/ocplib-endian/.gitignore  |    3 +
 .../ocaml/duniverse/ocplib-endian/.travis.yml |   19 +
 .../ocaml/duniverse/ocplib-endian/CHANGES.md  |   55 +
 .../ocaml/duniverse/ocplib-endian/COPYING.txt |  521 ++++++
 tools/ocaml/duniverse/ocplib-endian/Makefile  |   13 +
 tools/ocaml/duniverse/ocplib-endian/README.md |   16 +
 .../duniverse/ocplib-endian/dune-project      |    2 +
 .../ocplib-endian/ocplib-endian.opam          |   30 +
 .../ocplib-endian/src/be_ocaml_401.ml         |   32 +
 .../duniverse/ocplib-endian/src/common.ml     |   24 +
 .../ocplib-endian/src/common_401.cppo.ml      |  100 +
 .../ocplib-endian/src/common_float.ml         |    5 +
 tools/ocaml/duniverse/ocplib-endian/src/dune  |   75 +
 .../ocplib-endian/src/endianBigstring.cppo.ml |  112 ++
 .../src/endianBigstring.cppo.mli              |  128 ++
 .../ocplib-endian/src/endianBytes.cppo.ml     |  130 ++
 .../ocplib-endian/src/endianBytes.cppo.mli    |  124 ++
 .../ocplib-endian/src/endianString.cppo.ml    |  118 ++
 .../ocplib-endian/src/endianString.cppo.mli   |  121 ++
 .../ocplib-endian/src/le_ocaml_401.ml         |   32 +
 .../ocplib-endian/src/ne_ocaml_401.ml         |   20 +
 .../duniverse/ocplib-endian/tests/bench.ml    |  436 +++++
 .../ocaml/duniverse/ocplib-endian/tests/dune  |   35 +
 .../duniverse/ocplib-endian/tests/test.ml     |   39 +
 .../tests/test_bigstring.cppo.ml              |  191 ++
 .../ocplib-endian/tests/test_bytes.cppo.ml    |  185 ++
 .../ocplib-endian/tests/test_string.cppo.ml   |  185 ++
 tools/ocaml/duniverse/result/CHANGES.md       |   15 +
 tools/ocaml/duniverse/result/LICENSE.md       |   24 +
 tools/ocaml/duniverse/result/Makefile         |   17 +
 tools/ocaml/duniverse/result/README.md        |    5 +
 tools/ocaml/duniverse/result/dune             |   12 +
 tools/ocaml/duniverse/result/dune-project     |    3 +
 .../duniverse/result/result-as-alias-4.08.ml  |    2 +
 .../ocaml/duniverse/result/result-as-alias.ml |    2 +
 .../duniverse/result/result-as-newtype.ml     |    2 +
 tools/ocaml/duniverse/result/result.opam      |   18 +
 tools/ocaml/duniverse/result/which_result.ml  |   14 +
 tools/ocaml/duniverse/stdlib-shims/CHANGES.md |    5 +
 tools/ocaml/duniverse/stdlib-shims/LICENSE    |  203 +++
 tools/ocaml/duniverse/stdlib-shims/README.md  |    2 +
 .../ocaml/duniverse/stdlib-shims/dune-project |    1 +
 .../duniverse/stdlib-shims/dune-workspace.dev |   14 +
 tools/ocaml/duniverse/stdlib-shims/src/dune   |   97 +
 .../duniverse/stdlib-shims/stdlib-shims.opam  |   24 +
 tools/ocaml/duniverse/stdlib-shims/test/dune  |    3 +
 .../ocaml/duniverse/stdlib-shims/test/test.ml |    2 +
 tools/ocaml/libs/eventchn/dune                |    8 +
 tools/ocaml/libs/mmap/Makefile                |   19 +-
 tools/ocaml/libs/mmap/dune                    |   18 +
 tools/ocaml/libs/mmap/gnt.ml                  |   62 +
 tools/ocaml/libs/mmap/gnt.mli                 |   87 +
 tools/ocaml/libs/mmap/gnttab_stubs.c          |  106 ++
 tools/ocaml/libs/mmap/mmap_stubs.h            |   11 +-
 tools/ocaml/libs/mmap/xenmmap.ml              |   17 +-
 tools/ocaml/libs/mmap/xenmmap.mli             |   13 +-
 tools/ocaml/libs/mmap/xenmmap_stubs.c         |   86 +-
 tools/ocaml/libs/xb/dune                      |    7 +
 tools/ocaml/libs/xb/xb.ml                     |   10 +-
 tools/ocaml/libs/xb/xb.mli                    |    4 +-
 tools/ocaml/libs/xb/xs_ring_stubs.c           |   14 +-
 tools/ocaml/libs/xc/dune                      |    9 +
 tools/ocaml/libs/xc/xenctrl.ml                |    6 +-
 tools/ocaml/libs/xc/xenctrl.mli               |    5 +-
 tools/ocaml/libs/xs/dune                      |    4 +
 tools/ocaml/xen.opam                          |    1 +
 tools/ocaml/xen.opam.locked                   |  119 ++
 tools/ocaml/xenstore.opam                     |    1 +
 tools/ocaml/xenstored.opam                    |   21 +
 tools/ocaml/xenstored/Makefile                |    4 +-
 tools/ocaml/xenstored/connection.ml           |   63 +-
 tools/ocaml/xenstored/disk.ml                 |  319 ++++
 tools/ocaml/xenstored/domain.ml               |    9 +-
 tools/ocaml/xenstored/domains.ml              |   13 +-
 tools/ocaml/xenstored/dune                    |   19 +
 tools/ocaml/xenstored/parse_arg.ml            |    6 +-
 tools/ocaml/xenstored/perms.ml                |    2 +
 tools/ocaml/xenstored/poll.ml                 |    3 +-
 tools/ocaml/xenstored/process.ml              |   30 +-
 tools/ocaml/xenstored/store.ml                |    1 +
 tools/ocaml/xenstored/test/dune               |   23 +
 tools/ocaml/xenstored/test/generator.ml       |  189 ++
 tools/ocaml/xenstored/test/gnt.ml             |   52 +
 tools/ocaml/xenstored/test/model.ml           |  253 +++
 tools/ocaml/xenstored/test/old/arbitrary.ml   |  261 +++
 tools/ocaml/xenstored/test/old/gen_paths.ml   |   66 +
 .../xenstored/test/old/xenstored_test.ml      |  527 ++++++
 tools/ocaml/xenstored/test/pathtree.ml        |   40 +
 tools/ocaml/xenstored/test/testable.ml        |  380 ++++
 tools/ocaml/xenstored/test/types.ml           |  437 +++++
 .../xenmmap.mli => xenstored/test/xenctrl.ml} |   40 +-
 tools/ocaml/xenstored/test/xeneventchn.ml     |   50 +
 tools/ocaml/xenstored/test/xenstored_test.ml  |  147 ++
 tools/ocaml/xenstored/test/xs_protocol.ml     |  733 ++++++++
 tools/ocaml/xenstored/transaction.ml          |  119 +-
 tools/ocaml/xenstored/xenstored.ml            |  224 ++-
 tools/ocaml/xenstored/xenstored_main.ml       |    1 +
 301 files changed, 22724 insertions(+), 193 deletions(-)
 create mode 100644 tools/ocaml/.gitignore
 create mode 100644 tools/ocaml/dune-project
 create mode 100644 tools/ocaml/duniverse/cmdliner/.gitignore
 create mode 100644 tools/ocaml/duniverse/cmdliner/.ocp-indent
 create mode 100644 tools/ocaml/duniverse/cmdliner/B0.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/CHANGES.md
 create mode 100644 tools/ocaml/duniverse/cmdliner/LICENSE.md
 create mode 100644 tools/ocaml/duniverse/cmdliner/Makefile
 create mode 100644 tools/ocaml/duniverse/cmdliner/README.md
 create mode 100644 tools/ocaml/duniverse/cmdliner/_tags
 create mode 100755 tools/ocaml/duniverse/cmdliner/build.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/cmdliner.opam
 create mode 100644 tools/ocaml/duniverse/cmdliner/doc/api.odocl
 create mode 100644 tools/ocaml/duniverse/cmdliner/dune-project
 create mode 100644 tools/ocaml/duniverse/cmdliner/pkg/META
 create mode 100755 tools/ocaml/duniverse/cmdliner/pkg/pkg.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner.mli
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner.mllib
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_arg.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_arg.mli
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_base.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_base.mli
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_cline.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_cline.mli
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_docgen.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_docgen.mli
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_info.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_info.mli
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_manpage.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_manpage.mli
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_msg.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_msg.mli
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_suggest.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_suggest.mli
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_term.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_term.mli
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_trie.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner_trie.mli
 create mode 100644 tools/ocaml/duniverse/cmdliner/src/dune
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/chorus.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/cp_ex.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/darcs_ex.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/dune
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/revolt.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/rm_ex.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/tail_ex.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_man.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_man_utf8.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_opt_req.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_pos.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_pos_all.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_pos_left.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_pos_req.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_pos_rev.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_term_dups.ml
 create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_with_used_args.ml
 create mode 100644 tools/ocaml/duniverse/cppo/.gitignore
 create mode 100644 tools/ocaml/duniverse/cppo/.ocp-indent
 create mode 100644 tools/ocaml/duniverse/cppo/.travis.yml
 create mode 100644 tools/ocaml/duniverse/cppo/CODEOWNERS
 create mode 100644 tools/ocaml/duniverse/cppo/Changes
 create mode 100644 tools/ocaml/duniverse/cppo/INSTALL.md
 create mode 100644 tools/ocaml/duniverse/cppo/LICENSE.md
 create mode 100644 tools/ocaml/duniverse/cppo/Makefile
 create mode 100644 tools/ocaml/duniverse/cppo/README.md
 create mode 100644 tools/ocaml/duniverse/cppo/VERSION
 create mode 100644 tools/ocaml/duniverse/cppo/appveyor.yml
 create mode 100644 tools/ocaml/duniverse/cppo/cppo.opam
 create mode 100644 tools/ocaml/duniverse/cppo/cppo_ocamlbuild.opam
 create mode 100644 tools/ocaml/duniverse/cppo/dune-project
 create mode 100644 tools/ocaml/duniverse/cppo/examples/Makefile
 create mode 100644 tools/ocaml/duniverse/cppo/examples/debug.ml
 create mode 100644 tools/ocaml/duniverse/cppo/examples/dune
 create mode 100644 tools/ocaml/duniverse/cppo/examples/french.ml
 create mode 100644 tools/ocaml/duniverse/cppo/examples/lexer.mll
 create mode 100644 tools/ocaml/duniverse/cppo/ocamlbuild_plugin/_tags
 create mode 100644 tools/ocaml/duniverse/cppo/ocamlbuild_plugin/dune
 create mode 100644 tools/ocaml/duniverse/cppo/ocamlbuild_plugin/ocamlbuild_cppo.ml
 create mode 100644 tools/ocaml/duniverse/cppo/ocamlbuild_plugin/ocamlbuild_cppo.mli
 create mode 100644 tools/ocaml/duniverse/cppo/src/compat.ml
 create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_command.ml
 create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_command.mli
 create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_eval.ml
 create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_eval.mli
 create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_lexer.mll
 create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_main.ml
 create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_parser.mly
 create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_types.ml
 create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_types.mli
 create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_version.mli
 create mode 100644 tools/ocaml/duniverse/cppo/src/dune
 create mode 100644 tools/ocaml/duniverse/cppo/test/capital.cppo
 create mode 100644 tools/ocaml/duniverse/cppo/test/capital.ref
 create mode 100644 tools/ocaml/duniverse/cppo/test/comments.cppo
 create mode 100644 tools/ocaml/duniverse/cppo/test/comments.ref
 create mode 100644 tools/ocaml/duniverse/cppo/test/cond.cppo
 create mode 100644 tools/ocaml/duniverse/cppo/test/cond.ref
 create mode 100644 tools/ocaml/duniverse/cppo/test/dune
 create mode 100644 tools/ocaml/duniverse/cppo/test/ext.cppo
 create mode 100644 tools/ocaml/duniverse/cppo/test/ext.ref
 create mode 100644 tools/ocaml/duniverse/cppo/test/incl.cppo
 create mode 100644 tools/ocaml/duniverse/cppo/test/incl2.cppo
 create mode 100644 tools/ocaml/duniverse/cppo/test/loc.cppo
 create mode 100644 tools/ocaml/duniverse/cppo/test/loc.ref
 create mode 100644 tools/ocaml/duniverse/cppo/test/paren_arg.cppo
 create mode 100644 tools/ocaml/duniverse/cppo/test/paren_arg.ref
 create mode 100755 tools/ocaml/duniverse/cppo/test/source.sh
 create mode 100644 tools/ocaml/duniverse/cppo/test/test.cppo
 create mode 100644 tools/ocaml/duniverse/cppo/test/tuple.cppo
 create mode 100644 tools/ocaml/duniverse/cppo/test/tuple.ref
 create mode 100644 tools/ocaml/duniverse/cppo/test/unmatched.cppo
 create mode 100644 tools/ocaml/duniverse/cppo/test/unmatched.ref
 create mode 100644 tools/ocaml/duniverse/cppo/test/version.cppo
 create mode 100644 tools/ocaml/duniverse/crowbar/.gitignore
 create mode 100644 tools/ocaml/duniverse/crowbar/CHANGES.md
 create mode 100644 tools/ocaml/duniverse/crowbar/LICENSE.md
 create mode 100644 tools/ocaml/duniverse/crowbar/README.md
 create mode 100644 tools/ocaml/duniverse/crowbar/crowbar.opam
 create mode 100644 tools/ocaml/duniverse/crowbar/dune
 create mode 100644 tools/ocaml/duniverse/crowbar/dune-project
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/.gitignore
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/calendar/dune
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/calendar/test_calendar.ml
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/fpath/dune
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/fpath/test_fpath.ml
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/input/testcase
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/map/dune
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/map/test_map.ml
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/pprint/dune
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/pprint/test_pprint.ml
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/serializer/dune
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/serializer/serializer.ml
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/serializer/test_serializer.ml
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/uunf/dune
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/uunf/test_uunf.ml
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/xmldiff/dune
 create mode 100644 tools/ocaml/duniverse/crowbar/examples/xmldiff/test_xmldiff.ml
 create mode 100644 tools/ocaml/duniverse/crowbar/src/crowbar.ml
 create mode 100644 tools/ocaml/duniverse/crowbar/src/crowbar.mli
 create mode 100644 tools/ocaml/duniverse/crowbar/src/dune
 create mode 100644 tools/ocaml/duniverse/crowbar/src/todo
 create mode 100644 tools/ocaml/duniverse/csexp/CHANGES.md
 create mode 100644 tools/ocaml/duniverse/csexp/LICENSE.md
 create mode 100644 tools/ocaml/duniverse/csexp/Makefile
 create mode 100644 tools/ocaml/duniverse/csexp/README.md
 create mode 100644 tools/ocaml/duniverse/csexp/bench/csexp_bench.ml
 create mode 100644 tools/ocaml/duniverse/csexp/bench/dune
 create mode 100644 tools/ocaml/duniverse/csexp/bench/main.ml
 create mode 100755 tools/ocaml/duniverse/csexp/bench/runner.sh
 create mode 100644 tools/ocaml/duniverse/csexp/csexp.opam
 create mode 100644 tools/ocaml/duniverse/csexp/csexp.opam.template
 create mode 100644 tools/ocaml/duniverse/csexp/dune-project
 create mode 100644 tools/ocaml/duniverse/csexp/dune-workspace.dev
 create mode 100644 tools/ocaml/duniverse/csexp/src/csexp.ml
 create mode 100644 tools/ocaml/duniverse/csexp/src/csexp.mli
 create mode 100644 tools/ocaml/duniverse/csexp/src/dune
 create mode 100644 tools/ocaml/duniverse/csexp/test/dune
 create mode 100644 tools/ocaml/duniverse/csexp/test/test.ml
 create mode 100644 tools/ocaml/duniverse/dune
 create mode 100644 tools/ocaml/duniverse/fmt/.gitignore
 create mode 100644 tools/ocaml/duniverse/fmt/.ocp-indent
 create mode 100644 tools/ocaml/duniverse/fmt/CHANGES.md
 create mode 100644 tools/ocaml/duniverse/fmt/LICENSE.md
 create mode 100644 tools/ocaml/duniverse/fmt/README.md
 create mode 100644 tools/ocaml/duniverse/fmt/_tags
 create mode 100644 tools/ocaml/duniverse/fmt/doc/api.odocl
 create mode 100644 tools/ocaml/duniverse/fmt/doc/index.mld
 create mode 100644 tools/ocaml/duniverse/fmt/dune-project
 create mode 100644 tools/ocaml/duniverse/fmt/fmt.opam
 create mode 100644 tools/ocaml/duniverse/fmt/pkg/META
 create mode 100755 tools/ocaml/duniverse/fmt/pkg/pkg.ml
 create mode 100644 tools/ocaml/duniverse/fmt/src/dune
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt.ml
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt.mli
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt.mllib
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_cli.ml
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_cli.mli
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_cli.mllib
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_top.ml
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_top.mllib
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_tty.ml
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_tty.mli
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_tty.mllib
 create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_tty_top_init.ml
 create mode 100644 tools/ocaml/duniverse/fmt/test/test.ml
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/.gitignore
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/CHANGES.md
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/LICENSE.md
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/README.md
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/afl-persistent.opam
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/afl-persistent.opam.template
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/aflPersistent.available.ml
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/aflPersistent.mli
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/aflPersistent.stub.ml
 create mode 100755 tools/ocaml/duniverse/ocaml-afl-persistent/detect.sh
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/dune
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/dune-project
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/test.ml
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/test/harness.ml
 create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/test/test.ml
 create mode 100755 tools/ocaml/duniverse/ocaml-afl-persistent/test/test.sh
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/.gitignore
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/.travis.yml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/CHANGES.md
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/COPYING.txt
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/Makefile
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/README.md
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/dune-project
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/ocplib-endian.opam
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/be_ocaml_401.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/common.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/common_401.cppo.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/common_float.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/dune
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/endianBigstring.cppo.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/endianBigstring.cppo.mli
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/endianBytes.cppo.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/endianBytes.cppo.mli
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/endianString.cppo.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/endianString.cppo.mli
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/le_ocaml_401.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/ne_ocaml_401.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/tests/bench.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/tests/dune
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/tests/test.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/tests/test_bigstring.cppo.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/tests/test_bytes.cppo.ml
 create mode 100644 tools/ocaml/duniverse/ocplib-endian/tests/test_string.cppo.ml
 create mode 100755 tools/ocaml/duniverse/result/CHANGES.md
 create mode 100755 tools/ocaml/duniverse/result/LICENSE.md
 create mode 100755 tools/ocaml/duniverse/result/Makefile
 create mode 100755 tools/ocaml/duniverse/result/README.md
 create mode 100755 tools/ocaml/duniverse/result/dune
 create mode 100755 tools/ocaml/duniverse/result/dune-project
 create mode 100755 tools/ocaml/duniverse/result/result-as-alias-4.08.ml
 create mode 100755 tools/ocaml/duniverse/result/result-as-alias.ml
 create mode 100755 tools/ocaml/duniverse/result/result-as-newtype.ml
 create mode 100755 tools/ocaml/duniverse/result/result.opam
 create mode 100755 tools/ocaml/duniverse/result/which_result.ml
 create mode 100644 tools/ocaml/duniverse/stdlib-shims/CHANGES.md
 create mode 100644 tools/ocaml/duniverse/stdlib-shims/LICENSE
 create mode 100644 tools/ocaml/duniverse/stdlib-shims/README.md
 create mode 100644 tools/ocaml/duniverse/stdlib-shims/dune-project
 create mode 100644 tools/ocaml/duniverse/stdlib-shims/dune-workspace.dev
 create mode 100644 tools/ocaml/duniverse/stdlib-shims/src/dune
 create mode 100644 tools/ocaml/duniverse/stdlib-shims/stdlib-shims.opam
 create mode 100644 tools/ocaml/duniverse/stdlib-shims/test/dune
 create mode 100644 tools/ocaml/duniverse/stdlib-shims/test/test.ml
 create mode 100644 tools/ocaml/libs/eventchn/dune
 create mode 100644 tools/ocaml/libs/mmap/dune
 create mode 100644 tools/ocaml/libs/mmap/gnt.ml
 create mode 100644 tools/ocaml/libs/mmap/gnt.mli
 create mode 100644 tools/ocaml/libs/mmap/gnttab_stubs.c
 create mode 100644 tools/ocaml/libs/xb/dune
 create mode 100644 tools/ocaml/libs/xc/dune
 create mode 100644 tools/ocaml/libs/xs/dune
 create mode 100644 tools/ocaml/xen.opam
 create mode 100644 tools/ocaml/xen.opam.locked
 create mode 100644 tools/ocaml/xenstore.opam
 create mode 100644 tools/ocaml/xenstored.opam
 create mode 100644 tools/ocaml/xenstored/dune
 create mode 100644 tools/ocaml/xenstored/test/dune
 create mode 100644 tools/ocaml/xenstored/test/generator.ml
 create mode 100644 tools/ocaml/xenstored/test/gnt.ml
 create mode 100644 tools/ocaml/xenstored/test/model.ml
 create mode 100644 tools/ocaml/xenstored/test/old/arbitrary.ml
 create mode 100644 tools/ocaml/xenstored/test/old/gen_paths.ml
 create mode 100644 tools/ocaml/xenstored/test/old/xenstored_test.ml
 create mode 100644 tools/ocaml/xenstored/test/pathtree.ml
 create mode 100644 tools/ocaml/xenstored/test/testable.ml
 create mode 100644 tools/ocaml/xenstored/test/types.ml
 copy tools/ocaml/{libs/mmap/xenmmap.mli => xenstored/test/xenctrl.ml} (54%)
 create mode 100644 tools/ocaml/xenstored/test/xeneventchn.ml
 create mode 100644 tools/ocaml/xenstored/test/xenstored_test.ml
 create mode 100644 tools/ocaml/xenstored/test/xs_protocol.ml
 create mode 100644 tools/ocaml/xenstored/xenstored_main.ml

Comments

Edwin Torok May 11, 2021, 6:12 p.m. UTC | #1
On Tue, 2021-05-11 at 19:05 +0100, Edwin Török wrote:
> These patches have been posted previously.

A git tree is available here for easier reviewing:
https://github.com/edwintorok/xen/pull/2


> The gnttab patches (tools/ocaml/libs/mmap) were not applied at the
> time
> to avoid conflicts with an in-progress XSA.
> The binary format live-update and fuzzing patches were not applied
> because it was too close to the next Xen release freeze.
> 
> The patches depend on each-other: live-update only works correctly
> when the gnttab
> patches are taken too (MFN is not part of the binary live-update
> stream),
> so they are included here as a single series.
> The gnttab patches replaces one use of libxenctrl with stable
> interfaces, leaving one unstable
> libxenctrl interface used by oxenstored.
> 
> The 'vendor external dependencies' may be optional, it is useful to
> be part
> of a patchqueue in a specfile so that you can build everything
> without external dependencies,
> but might as well commit it so everyone has it easily available not
> just XenServer.
> 
> Note that the live-update fuzz test doesn't yet pass, it is still
> able to find bugs.
> However the reduced version with a fixed seed used as a unit test
> does pass,
> so it is useful to have it committed, and further improvements can be
> made later
> as more bugs are discovered and fixed.
> 
> Edwin Török (17):
>   docs/designs/xenstore-migration.md: clarify that deletes are
> recursive
>   tools/ocaml: add unit test skeleton with Dune build system
>   tools/ocaml: vendor external dependencies for convenience
>   tools/ocaml/xenstored: implement the live migration binary format
>   tools/ocaml/xenstored: add binary dump format support
>   tools/ocaml/xenstored: add support for binary format
>   tools/ocaml/xenstored: validate config file before live update
>   Add structured fuzzing unit test
>   tools/ocaml: use common macros for manipulating mmap_interface
>   tools/ocaml/libs/mmap: allocate correct number of bytes
>   tools/ocaml/libs/mmap: Expose stub_mmap_alloc
>   tools/ocaml/libs/mmap: mark mmap/munmap as blocking
>   tools/ocaml/libs/xb: import gnttab stubs from mirage
>   tools/ocaml: safer Xenmmap interface
>   tools/ocaml/xenstored: use gnttab instead of xenctrl's
>     foreign_map_range
>   tools/ocaml/xenstored: don't store domU's mfn of ring page
>   tools/ocaml/libs/mmap: Clean up unused read/write
> 
>  docs/designs/xenstore-migration.md            |    3 +-
>  tools/ocaml/.gitignore                        |    2 +
>  tools/ocaml/Makefile                          |   53 +
>  tools/ocaml/dune-project                      |    5 +
>  tools/ocaml/duniverse/cmdliner/.gitignore     |   10 +
>  tools/ocaml/duniverse/cmdliner/.ocp-indent    |    1 +
>  tools/ocaml/duniverse/cmdliner/B0.ml          |    9 +
>  tools/ocaml/duniverse/cmdliner/CHANGES.md     |  255 +++
>  tools/ocaml/duniverse/cmdliner/LICENSE.md     |   13 +
>  tools/ocaml/duniverse/cmdliner/Makefile       |   77 +
>  tools/ocaml/duniverse/cmdliner/README.md      |   51 +
>  tools/ocaml/duniverse/cmdliner/_tags          |    3 +
>  tools/ocaml/duniverse/cmdliner/build.ml       |  155 ++
>  tools/ocaml/duniverse/cmdliner/cmdliner.opam  |   32 +
>  tools/ocaml/duniverse/cmdliner/doc/api.odocl  |    1 +
>  tools/ocaml/duniverse/cmdliner/dune-project   |    2 +
>  tools/ocaml/duniverse/cmdliner/pkg/META       |    7 +
>  tools/ocaml/duniverse/cmdliner/pkg/pkg.ml     |   33 +
>  .../ocaml/duniverse/cmdliner/src/cmdliner.ml  |  309 ++++
>  .../ocaml/duniverse/cmdliner/src/cmdliner.mli | 1624
> +++++++++++++++++
>  .../duniverse/cmdliner/src/cmdliner.mllib     |   11 +
>  .../duniverse/cmdliner/src/cmdliner_arg.ml    |  356 ++++
>  .../duniverse/cmdliner/src/cmdliner_arg.mli   |  111 ++
>  .../duniverse/cmdliner/src/cmdliner_base.ml   |  302 +++
>  .../duniverse/cmdliner/src/cmdliner_base.mli  |   68 +
>  .../duniverse/cmdliner/src/cmdliner_cline.ml  |  199 ++
>  .../duniverse/cmdliner/src/cmdliner_cline.mli |   34 +
>  .../duniverse/cmdliner/src/cmdliner_docgen.ml |  352 ++++
>  .../cmdliner/src/cmdliner_docgen.mli          |   30 +
>  .../duniverse/cmdliner/src/cmdliner_info.ml   |  233 +++
>  .../duniverse/cmdliner/src/cmdliner_info.mli  |  140 ++
>  .../cmdliner/src/cmdliner_manpage.ml          |  502 +++++
>  .../cmdliner/src/cmdliner_manpage.mli         |  100 +
>  .../duniverse/cmdliner/src/cmdliner_msg.ml    |  116 ++
>  .../duniverse/cmdliner/src/cmdliner_msg.mli   |   56 +
>  .../cmdliner/src/cmdliner_suggest.ml          |   54 +
>  .../cmdliner/src/cmdliner_suggest.mli         |   25 +
>  .../duniverse/cmdliner/src/cmdliner_term.ml   |   41 +
>  .../duniverse/cmdliner/src/cmdliner_term.mli  |   40 +
>  .../duniverse/cmdliner/src/cmdliner_trie.ml   |   97 +
>  .../duniverse/cmdliner/src/cmdliner_trie.mli  |   35 +
>  tools/ocaml/duniverse/cmdliner/src/dune       |    4 +
>  tools/ocaml/duniverse/cmdliner/test/chorus.ml |   31 +
>  tools/ocaml/duniverse/cmdliner/test/cp_ex.ml  |   54 +
>  .../ocaml/duniverse/cmdliner/test/darcs_ex.ml |  149 ++
>  tools/ocaml/duniverse/cmdliner/test/dune      |   12 +
>  tools/ocaml/duniverse/cmdliner/test/revolt.ml |    9 +
>  tools/ocaml/duniverse/cmdliner/test/rm_ex.ml  |   53 +
>  .../ocaml/duniverse/cmdliner/test/tail_ex.ml  |   73 +
>  .../ocaml/duniverse/cmdliner/test/test_man.ml |  100 +
>  .../duniverse/cmdliner/test/test_man_utf8.ml  |   11 +
>  .../duniverse/cmdliner/test/test_opt_req.ml   |   13 +
>  .../ocaml/duniverse/cmdliner/test/test_pos.ml |   13 +
>  .../duniverse/cmdliner/test/test_pos_all.ml   |   11 +
>  .../duniverse/cmdliner/test/test_pos_left.ml  |   11 +
>  .../duniverse/cmdliner/test/test_pos_req.ml   |   15 +
>  .../duniverse/cmdliner/test/test_pos_rev.ml   |   14 +
>  .../duniverse/cmdliner/test/test_term_dups.ml |   19 +
>  .../cmdliner/test/test_with_used_args.ml      |   18 +
>  tools/ocaml/duniverse/cppo/.gitignore         |    5 +
>  tools/ocaml/duniverse/cppo/.ocp-indent        |   22 +
>  tools/ocaml/duniverse/cppo/.travis.yml        |   16 +
>  tools/ocaml/duniverse/cppo/CODEOWNERS         |    8 +
>  tools/ocaml/duniverse/cppo/Changes            |   85 +
>  tools/ocaml/duniverse/cppo/INSTALL.md         |   17 +
>  tools/ocaml/duniverse/cppo/LICENSE.md         |   24 +
>  tools/ocaml/duniverse/cppo/Makefile           |   18 +
>  tools/ocaml/duniverse/cppo/README.md          |  521 ++++++
>  tools/ocaml/duniverse/cppo/VERSION            |    1 +
>  tools/ocaml/duniverse/cppo/appveyor.yml       |   14 +
>  tools/ocaml/duniverse/cppo/cppo.opam          |   31 +
>  .../ocaml/duniverse/cppo/cppo_ocamlbuild.opam |   27 +
>  tools/ocaml/duniverse/cppo/dune-project       |    3 +
>  tools/ocaml/duniverse/cppo/examples/Makefile  |    8 +
>  tools/ocaml/duniverse/cppo/examples/debug.ml  |    7 +
>  tools/ocaml/duniverse/cppo/examples/dune      |   32 +
>  tools/ocaml/duniverse/cppo/examples/french.ml |   34 +
>  tools/ocaml/duniverse/cppo/examples/lexer.mll |    9 +
>  .../duniverse/cppo/ocamlbuild_plugin/_tags    |    1 +
>  .../duniverse/cppo/ocamlbuild_plugin/dune     |    6 +
>  .../cppo/ocamlbuild_plugin/ocamlbuild_cppo.ml |   35 +
>  .../ocamlbuild_plugin/ocamlbuild_cppo.mli     |    9 +
>  tools/ocaml/duniverse/cppo/src/compat.ml      |    7 +
>  .../ocaml/duniverse/cppo/src/cppo_command.ml  |   63 +
>  .../ocaml/duniverse/cppo/src/cppo_command.mli |   11 +
>  tools/ocaml/duniverse/cppo/src/cppo_eval.ml   |  697 +++++++
>  tools/ocaml/duniverse/cppo/src/cppo_eval.mli  |   29 +
>  tools/ocaml/duniverse/cppo/src/cppo_lexer.mll |  721 ++++++++
>  tools/ocaml/duniverse/cppo/src/cppo_main.ml   |  230 +++
>  .../ocaml/duniverse/cppo/src/cppo_parser.mly  |  266 +++
>  tools/ocaml/duniverse/cppo/src/cppo_types.ml  |   98 +
>  tools/ocaml/duniverse/cppo/src/cppo_types.mli |   70 +
>  .../ocaml/duniverse/cppo/src/cppo_version.mli |    1 +
>  tools/ocaml/duniverse/cppo/src/dune           |   21 +
>  tools/ocaml/duniverse/cppo/test/capital.cppo  |    6 +
>  tools/ocaml/duniverse/cppo/test/capital.ref   |    6 +
>  tools/ocaml/duniverse/cppo/test/comments.cppo |    7 +
>  tools/ocaml/duniverse/cppo/test/comments.ref  |    8 +
>  tools/ocaml/duniverse/cppo/test/cond.cppo     |   47 +
>  tools/ocaml/duniverse/cppo/test/cond.ref      |   17 +
>  tools/ocaml/duniverse/cppo/test/dune          |  130 ++
>  tools/ocaml/duniverse/cppo/test/ext.cppo      |   10 +
>  tools/ocaml/duniverse/cppo/test/ext.ref       |   28 +
>  tools/ocaml/duniverse/cppo/test/incl.cppo     |    3 +
>  tools/ocaml/duniverse/cppo/test/incl2.cppo    |    1 +
>  tools/ocaml/duniverse/cppo/test/loc.cppo      |    8 +
>  tools/ocaml/duniverse/cppo/test/loc.ref       |   21 +
>  .../ocaml/duniverse/cppo/test/paren_arg.cppo  |    3 +
>  tools/ocaml/duniverse/cppo/test/paren_arg.ref |    4 +
>  tools/ocaml/duniverse/cppo/test/source.sh     |   13 +
>  tools/ocaml/duniverse/cppo/test/test.cppo     |  144 ++
>  tools/ocaml/duniverse/cppo/test/tuple.cppo    |   38 +
>  tools/ocaml/duniverse/cppo/test/tuple.ref     |   20 +
>  .../ocaml/duniverse/cppo/test/unmatched.cppo  |   14 +
>  tools/ocaml/duniverse/cppo/test/unmatched.ref |   15 +
>  tools/ocaml/duniverse/cppo/test/version.cppo  |   30 +
>  tools/ocaml/duniverse/crowbar/.gitignore      |    5 +
>  tools/ocaml/duniverse/crowbar/CHANGES.md      |    9 +
>  tools/ocaml/duniverse/crowbar/LICENSE.md      |    8 +
>  tools/ocaml/duniverse/crowbar/README.md       |   82 +
>  tools/ocaml/duniverse/crowbar/crowbar.opam    |   33 +
>  tools/ocaml/duniverse/crowbar/dune            |    1 +
>  tools/ocaml/duniverse/crowbar/dune-project    |    2 +
>  .../duniverse/crowbar/examples/.gitignore     |    1 +
>  .../duniverse/crowbar/examples/calendar/dune  |    3 +
>  .../examples/calendar/test_calendar.ml        |   29 +
>  .../duniverse/crowbar/examples/fpath/dune     |    4 +
>  .../crowbar/examples/fpath/test_fpath.ml      |   18 +
>  .../duniverse/crowbar/examples/input/testcase |    1 +
>  .../ocaml/duniverse/crowbar/examples/map/dune |    3 +
>  .../crowbar/examples/map/test_map.ml          |   47 +
>  .../duniverse/crowbar/examples/pprint/dune    |    3 +
>  .../crowbar/examples/pprint/test_pprint.ml    |   39 +
>  .../crowbar/examples/serializer/dune          |    3 +
>  .../crowbar/examples/serializer/serializer.ml |   34 +
>  .../examples/serializer/test_serializer.ml    |   47 +
>  .../duniverse/crowbar/examples/uunf/dune      |    3 +
>  .../crowbar/examples/uunf/test_uunf.ml        |   75 +
>  .../duniverse/crowbar/examples/xmldiff/dune   |    3 +
>  .../crowbar/examples/xmldiff/test_xmldiff.ml  |   42 +
>  tools/ocaml/duniverse/crowbar/src/crowbar.ml  |  582 ++++++
>  tools/ocaml/duniverse/crowbar/src/crowbar.mli |  251 +++
>  tools/ocaml/duniverse/crowbar/src/dune        |    3 +
>  tools/ocaml/duniverse/crowbar/src/todo        |   16 +
>  tools/ocaml/duniverse/csexp/CHANGES.md        |   45 +
>  tools/ocaml/duniverse/csexp/LICENSE.md        |   21 +
>  tools/ocaml/duniverse/csexp/Makefile          |   23 +
>  tools/ocaml/duniverse/csexp/README.md         |   33 +
>  .../duniverse/csexp/bench/csexp_bench.ml      |   22 +
>  tools/ocaml/duniverse/csexp/bench/dune        |   11 +
>  tools/ocaml/duniverse/csexp/bench/main.ml     |    1 +
>  tools/ocaml/duniverse/csexp/bench/runner.sh   |    4 +
>  tools/ocaml/duniverse/csexp/csexp.opam        |   51 +
>  .../ocaml/duniverse/csexp/csexp.opam.template |   14 +
>  tools/ocaml/duniverse/csexp/dune-project      |   42 +
>  .../ocaml/duniverse/csexp/dune-workspace.dev  |    6 +
>  tools/ocaml/duniverse/csexp/src/csexp.ml      |  333 ++++
>  tools/ocaml/duniverse/csexp/src/csexp.mli     |  369 ++++
>  tools/ocaml/duniverse/csexp/src/dune          |    3 +
>  tools/ocaml/duniverse/csexp/test/dune         |    6 +
>  tools/ocaml/duniverse/csexp/test/test.ml      |  142 ++
>  tools/ocaml/duniverse/dune                    |    4 +
>  tools/ocaml/duniverse/fmt/.gitignore          |    8 +
>  tools/ocaml/duniverse/fmt/.ocp-indent         |    1 +
>  tools/ocaml/duniverse/fmt/CHANGES.md          |   98 +
>  tools/ocaml/duniverse/fmt/LICENSE.md          |   13 +
>  tools/ocaml/duniverse/fmt/README.md           |   35 +
>  tools/ocaml/duniverse/fmt/_tags               |    7 +
>  tools/ocaml/duniverse/fmt/doc/api.odocl       |    3 +
>  tools/ocaml/duniverse/fmt/doc/index.mld       |   11 +
>  tools/ocaml/duniverse/fmt/dune-project        |    2 +
>  tools/ocaml/duniverse/fmt/fmt.opam            |   35 +
>  tools/ocaml/duniverse/fmt/pkg/META            |   40 +
>  tools/ocaml/duniverse/fmt/pkg/pkg.ml          |   18 +
>  tools/ocaml/duniverse/fmt/src/dune            |   30 +
>  tools/ocaml/duniverse/fmt/src/fmt.ml          |  787 ++++++++
>  tools/ocaml/duniverse/fmt/src/fmt.mli         |  689 +++++++
>  tools/ocaml/duniverse/fmt/src/fmt.mllib       |    1 +
>  tools/ocaml/duniverse/fmt/src/fmt_cli.ml      |   32 +
>  tools/ocaml/duniverse/fmt/src/fmt_cli.mli     |   45 +
>  tools/ocaml/duniverse/fmt/src/fmt_cli.mllib   |    1 +
>  tools/ocaml/duniverse/fmt/src/fmt_top.ml      |   23 +
>  tools/ocaml/duniverse/fmt/src/fmt_top.mllib   |    1 +
>  tools/ocaml/duniverse/fmt/src/fmt_tty.ml      |   78 +
>  tools/ocaml/duniverse/fmt/src/fmt_tty.mli     |   50 +
>  tools/ocaml/duniverse/fmt/src/fmt_tty.mllib   |    1 +
>  .../duniverse/fmt/src/fmt_tty_top_init.ml     |   23 +
>  tools/ocaml/duniverse/fmt/test/test.ml        |  322 ++++
>  .../duniverse/ocaml-afl-persistent/.gitignore |    2 +
>  .../duniverse/ocaml-afl-persistent/CHANGES.md |   22 +
>  .../duniverse/ocaml-afl-persistent/LICENSE.md |    8 +
>  .../duniverse/ocaml-afl-persistent/README.md  |   17 +
>  .../ocaml-afl-persistent/afl-persistent.opam  |   49 +
>  .../afl-persistent.opam.template              |   16 +
>  .../aflPersistent.available.ml                |   21 +
>  .../ocaml-afl-persistent/aflPersistent.mli    |    1 +
>  .../aflPersistent.stub.ml                     |    1 +
>  .../duniverse/ocaml-afl-persistent/detect.sh  |   43 +
>  .../ocaml/duniverse/ocaml-afl-persistent/dune |   20 +
>  .../ocaml-afl-persistent/dune-project         |   23 +
>  .../duniverse/ocaml-afl-persistent/test.ml    |    3 +
>  .../ocaml-afl-persistent/test/harness.ml      |   22 +
>  .../ocaml-afl-persistent/test/test.ml         |   73 +
>  .../ocaml-afl-persistent/test/test.sh         |   33 +
>  .../ocaml/duniverse/ocplib-endian/.gitignore  |    3 +
>  .../ocaml/duniverse/ocplib-endian/.travis.yml |   19 +
>  .../ocaml/duniverse/ocplib-endian/CHANGES.md  |   55 +
>  .../ocaml/duniverse/ocplib-endian/COPYING.txt |  521 ++++++
>  tools/ocaml/duniverse/ocplib-endian/Makefile  |   13 +
>  tools/ocaml/duniverse/ocplib-endian/README.md |   16 +
>  .../duniverse/ocplib-endian/dune-project      |    2 +
>  .../ocplib-endian/ocplib-endian.opam          |   30 +
>  .../ocplib-endian/src/be_ocaml_401.ml         |   32 +
>  .../duniverse/ocplib-endian/src/common.ml     |   24 +
>  .../ocplib-endian/src/common_401.cppo.ml      |  100 +
>  .../ocplib-endian/src/common_float.ml         |    5 +
>  tools/ocaml/duniverse/ocplib-endian/src/dune  |   75 +
>  .../ocplib-endian/src/endianBigstring.cppo.ml |  112 ++
>  .../src/endianBigstring.cppo.mli              |  128 ++
>  .../ocplib-endian/src/endianBytes.cppo.ml     |  130 ++
>  .../ocplib-endian/src/endianBytes.cppo.mli    |  124 ++
>  .../ocplib-endian/src/endianString.cppo.ml    |  118 ++
>  .../ocplib-endian/src/endianString.cppo.mli   |  121 ++
>  .../ocplib-endian/src/le_ocaml_401.ml         |   32 +
>  .../ocplib-endian/src/ne_ocaml_401.ml         |   20 +
>  .../duniverse/ocplib-endian/tests/bench.ml    |  436 +++++
>  .../ocaml/duniverse/ocplib-endian/tests/dune  |   35 +
>  .../duniverse/ocplib-endian/tests/test.ml     |   39 +
>  .../tests/test_bigstring.cppo.ml              |  191 ++
>  .../ocplib-endian/tests/test_bytes.cppo.ml    |  185 ++
>  .../ocplib-endian/tests/test_string.cppo.ml   |  185 ++
>  tools/ocaml/duniverse/result/CHANGES.md       |   15 +
>  tools/ocaml/duniverse/result/LICENSE.md       |   24 +
>  tools/ocaml/duniverse/result/Makefile         |   17 +
>  tools/ocaml/duniverse/result/README.md        |    5 +
>  tools/ocaml/duniverse/result/dune             |   12 +
>  tools/ocaml/duniverse/result/dune-project     |    3 +
>  .../duniverse/result/result-as-alias-4.08.ml  |    2 +
>  .../ocaml/duniverse/result/result-as-alias.ml |    2 +
>  .../duniverse/result/result-as-newtype.ml     |    2 +
>  tools/ocaml/duniverse/result/result.opam      |   18 +
>  tools/ocaml/duniverse/result/which_result.ml  |   14 +
>  tools/ocaml/duniverse/stdlib-shims/CHANGES.md |    5 +
>  tools/ocaml/duniverse/stdlib-shims/LICENSE    |  203 +++
>  tools/ocaml/duniverse/stdlib-shims/README.md  |    2 +
>  .../ocaml/duniverse/stdlib-shims/dune-project |    1 +
>  .../duniverse/stdlib-shims/dune-workspace.dev |   14 +
>  tools/ocaml/duniverse/stdlib-shims/src/dune   |   97 +
>  .../duniverse/stdlib-shims/stdlib-shims.opam  |   24 +
>  tools/ocaml/duniverse/stdlib-shims/test/dune  |    3 +
>  .../ocaml/duniverse/stdlib-shims/test/test.ml |    2 +
>  tools/ocaml/libs/eventchn/dune                |    8 +
>  tools/ocaml/libs/mmap/Makefile                |   19 +-
>  tools/ocaml/libs/mmap/dune                    |   18 +
>  tools/ocaml/libs/mmap/gnt.ml                  |   62 +
>  tools/ocaml/libs/mmap/gnt.mli                 |   87 +
>  tools/ocaml/libs/mmap/gnttab_stubs.c          |  106 ++
>  tools/ocaml/libs/mmap/mmap_stubs.h            |   11 +-
>  tools/ocaml/libs/mmap/xenmmap.ml              |   17 +-
>  tools/ocaml/libs/mmap/xenmmap.mli             |   13 +-
>  tools/ocaml/libs/mmap/xenmmap_stubs.c         |   86 +-
>  tools/ocaml/libs/xb/dune                      |    7 +
>  tools/ocaml/libs/xb/xb.ml                     |   10 +-
>  tools/ocaml/libs/xb/xb.mli                    |    4 +-
>  tools/ocaml/libs/xb/xs_ring_stubs.c           |   14 +-
>  tools/ocaml/libs/xc/dune                      |    9 +
>  tools/ocaml/libs/xc/xenctrl.ml                |    6 +-
>  tools/ocaml/libs/xc/xenctrl.mli               |    5 +-
>  tools/ocaml/libs/xs/dune                      |    4 +
>  tools/ocaml/xen.opam                          |    1 +
>  tools/ocaml/xen.opam.locked                   |  119 ++
>  tools/ocaml/xenstore.opam                     |    1 +
>  tools/ocaml/xenstored.opam                    |   21 +
>  tools/ocaml/xenstored/Makefile                |    4 +-
>  tools/ocaml/xenstored/connection.ml           |   63 +-
>  tools/ocaml/xenstored/disk.ml                 |  319 ++++
>  tools/ocaml/xenstored/domain.ml               |    9 +-
>  tools/ocaml/xenstored/domains.ml              |   13 +-
>  tools/ocaml/xenstored/dune                    |   19 +
>  tools/ocaml/xenstored/parse_arg.ml            |    6 +-
>  tools/ocaml/xenstored/perms.ml                |    2 +
>  tools/ocaml/xenstored/poll.ml                 |    3 +-
>  tools/ocaml/xenstored/process.ml              |   30 +-
>  tools/ocaml/xenstored/store.ml                |    1 +
>  tools/ocaml/xenstored/test/dune               |   23 +
>  tools/ocaml/xenstored/test/generator.ml       |  189 ++
>  tools/ocaml/xenstored/test/gnt.ml             |   52 +
>  tools/ocaml/xenstored/test/model.ml           |  253 +++
>  tools/ocaml/xenstored/test/old/arbitrary.ml   |  261 +++
>  tools/ocaml/xenstored/test/old/gen_paths.ml   |   66 +
>  .../xenstored/test/old/xenstored_test.ml      |  527 ++++++
>  tools/ocaml/xenstored/test/pathtree.ml        |   40 +
>  tools/ocaml/xenstored/test/testable.ml        |  380 ++++
>  tools/ocaml/xenstored/test/types.ml           |  437 +++++
>  .../xenmmap.mli => xenstored/test/xenctrl.ml} |   40 +-
>  tools/ocaml/xenstored/test/xeneventchn.ml     |   50 +
>  tools/ocaml/xenstored/test/xenstored_test.ml  |  147 ++
>  tools/ocaml/xenstored/test/xs_protocol.ml     |  733 ++++++++
>  tools/ocaml/xenstored/transaction.ml          |  119 +-
>  tools/ocaml/xenstored/xenstored.ml            |  224 ++-
>  tools/ocaml/xenstored/xenstored_main.ml       |    1 +
>  301 files changed, 22724 insertions(+), 193 deletions(-)
>  create mode 100644 tools/ocaml/.gitignore
>  create mode 100644 tools/ocaml/dune-project
>  create mode 100644 tools/ocaml/duniverse/cmdliner/.gitignore
>  create mode 100644 tools/ocaml/duniverse/cmdliner/.ocp-indent
>  create mode 100644 tools/ocaml/duniverse/cmdliner/B0.ml
>  create mode 100644 tools/ocaml/duniverse/cmdliner/CHANGES.md
>  create mode 100644 tools/ocaml/duniverse/cmdliner/LICENSE.md
>  create mode 100644 tools/ocaml/duniverse/cmdliner/Makefile
>  create mode 100644 tools/ocaml/duniverse/cmdliner/README.md
>  create mode 100644 tools/ocaml/duniverse/cmdliner/_tags
>  create mode 100755 tools/ocaml/duniverse/cmdliner/build.ml
>  create mode 100644 tools/ocaml/duniverse/cmdliner/cmdliner.opam
>  create mode 100644 tools/ocaml/duniverse/cmdliner/doc/api.odocl
>  create mode 100644 tools/ocaml/duniverse/cmdliner/dune-project
>  create mode 100644 tools/ocaml/duniverse/cmdliner/pkg/META
>  create mode 100755 tools/ocaml/duniverse/cmdliner/pkg/pkg.ml
>  create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner.ml
>  create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner.mli
>  create mode 100644 tools/ocaml/duniverse/cmdliner/src/cmdliner.mllib
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_arg.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_arg.mli
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_base.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_base.mli
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_cline.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_cline.mli
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_docgen.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_docgen.mli
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_info.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_info.mli
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_manpage.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_manpage.mli
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_msg.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_msg.mli
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_suggest.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_suggest.mli
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_term.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_term.mli
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_trie.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/src/cmdliner_trie.mli
>  create mode 100644 tools/ocaml/duniverse/cmdliner/src/dune
>  create mode 100644 tools/ocaml/duniverse/cmdliner/test/chorus.ml
>  create mode 100644 tools/ocaml/duniverse/cmdliner/test/cp_ex.ml
>  create mode 100644 tools/ocaml/duniverse/cmdliner/test/darcs_ex.ml
>  create mode 100644 tools/ocaml/duniverse/cmdliner/test/dune
>  create mode 100644 tools/ocaml/duniverse/cmdliner/test/revolt.ml
>  create mode 100644 tools/ocaml/duniverse/cmdliner/test/rm_ex.ml
>  create mode 100644 tools/ocaml/duniverse/cmdliner/test/tail_ex.ml
>  create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_man.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/test/test_man_utf8.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/test/test_opt_req.ml
>  create mode 100644 tools/ocaml/duniverse/cmdliner/test/test_pos.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/test/test_pos_all.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/test/test_pos_left.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/test/test_pos_req.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/test/test_pos_rev.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/test/test_term_dups.ml
>  create mode 100644
> tools/ocaml/duniverse/cmdliner/test/test_with_used_args.ml
>  create mode 100644 tools/ocaml/duniverse/cppo/.gitignore
>  create mode 100644 tools/ocaml/duniverse/cppo/.ocp-indent
>  create mode 100644 tools/ocaml/duniverse/cppo/.travis.yml
>  create mode 100644 tools/ocaml/duniverse/cppo/CODEOWNERS
>  create mode 100644 tools/ocaml/duniverse/cppo/Changes
>  create mode 100644 tools/ocaml/duniverse/cppo/INSTALL.md
>  create mode 100644 tools/ocaml/duniverse/cppo/LICENSE.md
>  create mode 100644 tools/ocaml/duniverse/cppo/Makefile
>  create mode 100644 tools/ocaml/duniverse/cppo/README.md
>  create mode 100644 tools/ocaml/duniverse/cppo/VERSION
>  create mode 100644 tools/ocaml/duniverse/cppo/appveyor.yml
>  create mode 100644 tools/ocaml/duniverse/cppo/cppo.opam
>  create mode 100644 tools/ocaml/duniverse/cppo/cppo_ocamlbuild.opam
>  create mode 100644 tools/ocaml/duniverse/cppo/dune-project
>  create mode 100644 tools/ocaml/duniverse/cppo/examples/Makefile
>  create mode 100644 tools/ocaml/duniverse/cppo/examples/debug.ml
>  create mode 100644 tools/ocaml/duniverse/cppo/examples/dune
>  create mode 100644 tools/ocaml/duniverse/cppo/examples/french.ml
>  create mode 100644 tools/ocaml/duniverse/cppo/examples/lexer.mll
>  create mode 100644
> tools/ocaml/duniverse/cppo/ocamlbuild_plugin/_tags
>  create mode 100644 tools/ocaml/duniverse/cppo/ocamlbuild_plugin/dune
>  create mode 100644
> tools/ocaml/duniverse/cppo/ocamlbuild_plugin/ocamlbuild_cppo.ml
>  create mode 100644
> tools/ocaml/duniverse/cppo/ocamlbuild_plugin/ocamlbuild_cppo.mli
>  create mode 100644 tools/ocaml/duniverse/cppo/src/compat.ml
>  create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_command.ml
>  create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_command.mli
>  create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_eval.ml
>  create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_eval.mli
>  create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_lexer.mll
>  create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_main.ml
>  create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_parser.mly
>  create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_types.ml
>  create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_types.mli
>  create mode 100644 tools/ocaml/duniverse/cppo/src/cppo_version.mli
>  create mode 100644 tools/ocaml/duniverse/cppo/src/dune
>  create mode 100644 tools/ocaml/duniverse/cppo/test/capital.cppo
>  create mode 100644 tools/ocaml/duniverse/cppo/test/capital.ref
>  create mode 100644 tools/ocaml/duniverse/cppo/test/comments.cppo
>  create mode 100644 tools/ocaml/duniverse/cppo/test/comments.ref
>  create mode 100644 tools/ocaml/duniverse/cppo/test/cond.cppo
>  create mode 100644 tools/ocaml/duniverse/cppo/test/cond.ref
>  create mode 100644 tools/ocaml/duniverse/cppo/test/dune
>  create mode 100644 tools/ocaml/duniverse/cppo/test/ext.cppo
>  create mode 100644 tools/ocaml/duniverse/cppo/test/ext.ref
>  create mode 100644 tools/ocaml/duniverse/cppo/test/incl.cppo
>  create mode 100644 tools/ocaml/duniverse/cppo/test/incl2.cppo
>  create mode 100644 tools/ocaml/duniverse/cppo/test/loc.cppo
>  create mode 100644 tools/ocaml/duniverse/cppo/test/loc.ref
>  create mode 100644 tools/ocaml/duniverse/cppo/test/paren_arg.cppo
>  create mode 100644 tools/ocaml/duniverse/cppo/test/paren_arg.ref
>  create mode 100755 tools/ocaml/duniverse/cppo/test/source.sh
>  create mode 100644 tools/ocaml/duniverse/cppo/test/test.cppo
>  create mode 100644 tools/ocaml/duniverse/cppo/test/tuple.cppo
>  create mode 100644 tools/ocaml/duniverse/cppo/test/tuple.ref
>  create mode 100644 tools/ocaml/duniverse/cppo/test/unmatched.cppo
>  create mode 100644 tools/ocaml/duniverse/cppo/test/unmatched.ref
>  create mode 100644 tools/ocaml/duniverse/cppo/test/version.cppo
>  create mode 100644 tools/ocaml/duniverse/crowbar/.gitignore
>  create mode 100644 tools/ocaml/duniverse/crowbar/CHANGES.md
>  create mode 100644 tools/ocaml/duniverse/crowbar/LICENSE.md
>  create mode 100644 tools/ocaml/duniverse/crowbar/README.md
>  create mode 100644 tools/ocaml/duniverse/crowbar/crowbar.opam
>  create mode 100644 tools/ocaml/duniverse/crowbar/dune
>  create mode 100644 tools/ocaml/duniverse/crowbar/dune-project
>  create mode 100644 tools/ocaml/duniverse/crowbar/examples/.gitignore
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/calendar/dune
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/calendar/test_calendar.ml
>  create mode 100644 tools/ocaml/duniverse/crowbar/examples/fpath/dune
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/fpath/test_fpath.ml
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/input/testcase
>  create mode 100644 tools/ocaml/duniverse/crowbar/examples/map/dune
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/map/test_map.ml
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/pprint/dune
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/pprint/test_pprint.ml
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/serializer/dune
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/serializer/serializer.ml
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/serializer/test_serializer.ml
>  create mode 100644 tools/ocaml/duniverse/crowbar/examples/uunf/dune
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/uunf/test_uunf.ml
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/xmldiff/dune
>  create mode 100644
> tools/ocaml/duniverse/crowbar/examples/xmldiff/test_xmldiff.ml
>  create mode 100644 tools/ocaml/duniverse/crowbar/src/crowbar.ml
>  create mode 100644 tools/ocaml/duniverse/crowbar/src/crowbar.mli
>  create mode 100644 tools/ocaml/duniverse/crowbar/src/dune
>  create mode 100644 tools/ocaml/duniverse/crowbar/src/todo
>  create mode 100644 tools/ocaml/duniverse/csexp/CHANGES.md
>  create mode 100644 tools/ocaml/duniverse/csexp/LICENSE.md
>  create mode 100644 tools/ocaml/duniverse/csexp/Makefile
>  create mode 100644 tools/ocaml/duniverse/csexp/README.md
>  create mode 100644 tools/ocaml/duniverse/csexp/bench/csexp_bench.ml
>  create mode 100644 tools/ocaml/duniverse/csexp/bench/dune
>  create mode 100644 tools/ocaml/duniverse/csexp/bench/main.ml
>  create mode 100755 tools/ocaml/duniverse/csexp/bench/runner.sh
>  create mode 100644 tools/ocaml/duniverse/csexp/csexp.opam
>  create mode 100644 tools/ocaml/duniverse/csexp/csexp.opam.template
>  create mode 100644 tools/ocaml/duniverse/csexp/dune-project
>  create mode 100644 tools/ocaml/duniverse/csexp/dune-workspace.dev
>  create mode 100644 tools/ocaml/duniverse/csexp/src/csexp.ml
>  create mode 100644 tools/ocaml/duniverse/csexp/src/csexp.mli
>  create mode 100644 tools/ocaml/duniverse/csexp/src/dune
>  create mode 100644 tools/ocaml/duniverse/csexp/test/dune
>  create mode 100644 tools/ocaml/duniverse/csexp/test/test.ml
>  create mode 100644 tools/ocaml/duniverse/dune
>  create mode 100644 tools/ocaml/duniverse/fmt/.gitignore
>  create mode 100644 tools/ocaml/duniverse/fmt/.ocp-indent
>  create mode 100644 tools/ocaml/duniverse/fmt/CHANGES.md
>  create mode 100644 tools/ocaml/duniverse/fmt/LICENSE.md
>  create mode 100644 tools/ocaml/duniverse/fmt/README.md
>  create mode 100644 tools/ocaml/duniverse/fmt/_tags
>  create mode 100644 tools/ocaml/duniverse/fmt/doc/api.odocl
>  create mode 100644 tools/ocaml/duniverse/fmt/doc/index.mld
>  create mode 100644 tools/ocaml/duniverse/fmt/dune-project
>  create mode 100644 tools/ocaml/duniverse/fmt/fmt.opam
>  create mode 100644 tools/ocaml/duniverse/fmt/pkg/META
>  create mode 100755 tools/ocaml/duniverse/fmt/pkg/pkg.ml
>  create mode 100644 tools/ocaml/duniverse/fmt/src/dune
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt.ml
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt.mli
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt.mllib
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_cli.ml
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_cli.mli
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_cli.mllib
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_top.ml
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_top.mllib
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_tty.ml
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_tty.mli
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_tty.mllib
>  create mode 100644 tools/ocaml/duniverse/fmt/src/fmt_tty_top_init.ml
>  create mode 100644 tools/ocaml/duniverse/fmt/test/test.ml
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-
> persistent/.gitignore
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-
> persistent/CHANGES.md
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-
> persistent/LICENSE.md
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-
> persistent/README.md
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/afl-
> persistent.opam
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/afl-
> persistent.opam.template
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-
> persistent/aflPersistent.available.ml
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-
> persistent/aflPersistent.mli
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-
> persistent/aflPersistent.stub.ml
>  create mode 100755 tools/ocaml/duniverse/ocaml-afl-
> persistent/detect.sh
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/dune
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-persistent/dune-
> project
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-
> persistent/test.ml
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-
> persistent/test/harness.ml
>  create mode 100644 tools/ocaml/duniverse/ocaml-afl-
> persistent/test/test.ml
>  create mode 100755 tools/ocaml/duniverse/ocaml-afl-
> persistent/test/test.sh
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/.gitignore
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/.travis.yml
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/CHANGES.md
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/COPYING.txt
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/Makefile
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/README.md
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/dune-project
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/ocplib-
> endian.opam
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/src/be_ocaml_401.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/common.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/src/common_401.cppo.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/src/common_float.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/src/dune
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/src/endianBigstring.cppo.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/src/endianBigstring.cppo.mli
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/src/endianBytes.cppo.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/src/endianBytes.cppo.mli
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/src/endianString.cppo.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/src/endianString.cppo.mli
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/src/le_ocaml_401.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/src/ne_ocaml_401.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/tests/bench.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/tests/dune
>  create mode 100644 tools/ocaml/duniverse/ocplib-endian/tests/test.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/tests/test_bigstring.cppo.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/tests/test_bytes.cppo.ml
>  create mode 100644 tools/ocaml/duniverse/ocplib-
> endian/tests/test_string.cppo.ml
>  create mode 100755 tools/ocaml/duniverse/result/CHANGES.md
>  create mode 100755 tools/ocaml/duniverse/result/LICENSE.md
>  create mode 100755 tools/ocaml/duniverse/result/Makefile
>  create mode 100755 tools/ocaml/duniverse/result/README.md
>  create mode 100755 tools/ocaml/duniverse/result/dune
>  create mode 100755 tools/ocaml/duniverse/result/dune-project
>  create mode 100755 tools/ocaml/duniverse/result/result-as-alias-
> 4.08.ml
>  create mode 100755 tools/ocaml/duniverse/result/result-as-alias.ml
>  create mode 100755 tools/ocaml/duniverse/result/result-as-newtype.ml
>  create mode 100755 tools/ocaml/duniverse/result/result.opam
>  create mode 100755 tools/ocaml/duniverse/result/which_result.ml
>  create mode 100644 tools/ocaml/duniverse/stdlib-shims/CHANGES.md
>  create mode 100644 tools/ocaml/duniverse/stdlib-shims/LICENSE
>  create mode 100644 tools/ocaml/duniverse/stdlib-shims/README.md
>  create mode 100644 tools/ocaml/duniverse/stdlib-shims/dune-project
>  create mode 100644 tools/ocaml/duniverse/stdlib-shims/dune-
> workspace.dev
>  create mode 100644 tools/ocaml/duniverse/stdlib-shims/src/dune
>  create mode 100644 tools/ocaml/duniverse/stdlib-shims/stdlib-
> shims.opam
>  create mode 100644 tools/ocaml/duniverse/stdlib-shims/test/dune
>  create mode 100644 tools/ocaml/duniverse/stdlib-shims/test/test.ml
>  create mode 100644 tools/ocaml/libs/eventchn/dune
>  create mode 100644 tools/ocaml/libs/mmap/dune
>  create mode 100644 tools/ocaml/libs/mmap/gnt.ml
>  create mode 100644 tools/ocaml/libs/mmap/gnt.mli
>  create mode 100644 tools/ocaml/libs/mmap/gnttab_stubs.c
>  create mode 100644 tools/ocaml/libs/xb/dune
>  create mode 100644 tools/ocaml/libs/xc/dune
>  create mode 100644 tools/ocaml/libs/xs/dune
>  create mode 100644 tools/ocaml/xen.opam
>  create mode 100644 tools/ocaml/xen.opam.locked
>  create mode 100644 tools/ocaml/xenstore.opam
>  create mode 100644 tools/ocaml/xenstored.opam
>  create mode 100644 tools/ocaml/xenstored/dune
>  create mode 100644 tools/ocaml/xenstored/test/dune
>  create mode 100644 tools/ocaml/xenstored/test/generator.ml
>  create mode 100644 tools/ocaml/xenstored/test/gnt.ml
>  create mode 100644 tools/ocaml/xenstored/test/model.ml
>  create mode 100644 tools/ocaml/xenstored/test/old/arbitrary.ml
>  create mode 100644 tools/ocaml/xenstored/test/old/gen_paths.ml
>  create mode 100644 tools/ocaml/xenstored/test/old/xenstored_test.ml
>  create mode 100644 tools/ocaml/xenstored/test/pathtree.ml
>  create mode 100644 tools/ocaml/xenstored/test/testable.ml
>  create mode 100644 tools/ocaml/xenstored/test/types.ml
>  copy tools/ocaml/{libs/mmap/xenmmap.mli =>
> xenstored/test/xenctrl.ml} (54%)
>  create mode 100644 tools/ocaml/xenstored/test/xeneventchn.ml
>  create mode 100644 tools/ocaml/xenstored/test/xenstored_test.ml
>  create mode 100644 tools/ocaml/xenstored/test/xs_protocol.ml
>  create mode 100644 tools/ocaml/xenstored/xenstored_main.ml
>
Andrew Cooper May 11, 2021, 8:05 p.m. UTC | #2
On 11/05/2021 19:05, Edwin Török wrote:
> These patches have been posted previously.
> The gnttab patches (tools/ocaml/libs/mmap) were not applied at the time
> to avoid conflicts with an in-progress XSA.
> The binary format live-update and fuzzing patches were not applied
> because it was too close to the next Xen release freeze.
>
> The patches depend on each-other: live-update only works correctly when the gnttab
> patches are taken too (MFN is not part of the binary live-update stream),
> so they are included here as a single series.
> The gnttab patches replaces one use of libxenctrl with stable interfaces, leaving one unstable
> libxenctrl interface used by oxenstored.
>
> The 'vendor external dependencies' may be optional, it is useful to be part
> of a patchqueue in a specfile so that you can build everything without external dependencies,
> but might as well commit it so everyone has it easily available not just XenServer.
>
> Note that the live-update fuzz test doesn't yet pass, it is still able to find bugs.
> However the reduced version with a fixed seed used as a unit test does pass,
> so it is useful to have it committed, and further improvements can be made later
> as more bugs are discovered and fixed.
>
> Edwin Török (17):
>   docs/designs/xenstore-migration.md: clarify that deletes are recursive
>   tools/ocaml: add unit test skeleton with Dune build system
>   tools/ocaml: vendor external dependencies for convenience
>   tools/ocaml/xenstored: implement the live migration binary format
>   tools/ocaml/xenstored: add binary dump format support
>   tools/ocaml/xenstored: add support for binary format
>   tools/ocaml/xenstored: validate config file before live update
>   Add structured fuzzing unit test
>   tools/ocaml: use common macros for manipulating mmap_interface
>   tools/ocaml/libs/mmap: allocate correct number of bytes
>   tools/ocaml/libs/mmap: Expose stub_mmap_alloc
>   tools/ocaml/libs/mmap: mark mmap/munmap as blocking
>   tools/ocaml/libs/xb: import gnttab stubs from mirage
>   tools/ocaml: safer Xenmmap interface
>   tools/ocaml/xenstored: use gnttab instead of xenctrl's
>     foreign_map_range
>   tools/ocaml/xenstored: don't store domU's mfn of ring page
>   tools/ocaml/libs/mmap: Clean up unused read/write

Gitlab CI reports failures across the board in Debian Stretch 32-bit
builds.  All logs
https://gitlab.com/xen-project/patchew/xen/-/pipelines/301146112 but the
tl;dr seems to be:

File "disk.ml", line 179, characters 26-37:
Error: Integer literal exceeds the range of representable integers of
type int

~Andrew
Edwin Torok May 12, 2021, 10:10 a.m. UTC | #3
On Tue, 2021-05-11 at 21:05 +0100, Andrew Cooper wrote:
> On 11/05/2021 19:05, Edwin Török wrote:
> > These patches have been posted previously.
> > The gnttab patches (tools/ocaml/libs/mmap) were not applied at the
> > time
> > to avoid conflicts with an in-progress XSA.
> > The binary format live-update and fuzzing patches were not applied
> > because it was too close to the next Xen release freeze.
> > 
> > The patches depend on each-other: live-update only works correctly
> > when the gnttab
> > patches are taken too (MFN is not part of the binary live-update
> > stream),
> > so they are included here as a single series.
> > The gnttab patches replaces one use of libxenctrl with stable
> > interfaces, leaving one unstable
> > libxenctrl interface used by oxenstored.
> > 
> > The 'vendor external dependencies' may be optional, it is useful to
> > be part
> > of a patchqueue in a specfile so that you can build everything
> > without external dependencies,
> > but might as well commit it so everyone has it easily available not
> > just XenServer.
> > 
> > Note that the live-update fuzz test doesn't yet pass, it is still
> > able to find bugs.
> > However the reduced version with a fixed seed used as a unit test
> > does pass,
> > so it is useful to have it committed, and further improvements can
> > be made later
> > as more bugs are discovered and fixed.
> > 
> > Edwin Török (17):
> >   docs/designs/xenstore-migration.md: clarify that deletes are
> > recursive
> >   tools/ocaml: add unit test skeleton with Dune build system
> >   tools/ocaml: vendor external dependencies for convenience
> >   tools/ocaml/xenstored: implement the live migration binary format
> >   tools/ocaml/xenstored: add binary dump format support
> >   tools/ocaml/xenstored: add support for binary format
> >   tools/ocaml/xenstored: validate config file before live update
> >   Add structured fuzzing unit test
> >   tools/ocaml: use common macros for manipulating mmap_interface
> >   tools/ocaml/libs/mmap: allocate correct number of bytes
> >   tools/ocaml/libs/mmap: Expose stub_mmap_alloc
> >   tools/ocaml/libs/mmap: mark mmap/munmap as blocking
> >   tools/ocaml/libs/xb: import gnttab stubs from mirage
> >   tools/ocaml: safer Xenmmap interface
> >   tools/ocaml/xenstored: use gnttab instead of xenctrl's
> >     foreign_map_range
> >   tools/ocaml/xenstored: don't store domU's mfn of ring page
> >   tools/ocaml/libs/mmap: Clean up unused read/write
> 
> Gitlab CI reports failures across the board in Debian Stretch 32-bit
> builds.  All logs
> https://gitlab.com/xen-project/patchew/xen/-/pipelines/301146112 but
> the
> tl;dr seems to be:
> 
> File "disk.ml", line 179, characters 26-37:
> Error: Integer literal exceeds the range of representable integers of
> type int

Thanks, this should fix it, I refreshed my git tree (there is also a
fix there for the older version of Make):
https://gitlab.com/xen-project/patchew/xen/-/pipelines/301146112

Not sure whether it is worth continuing to support 32-bit i686 builds,
any modern Intel/AMD CPU would be 64-bit capable, but perhaps 32-bit is
still popular in the ARM world and keeping 32-bit Intel supported is
the easiest way to build-test it?

diff --git a/tools/ocaml/xenstored/disk.ml
b/tools/ocaml/xenstored/disk.ml
index 59794324e1..b7678af87f 100644
--- a/tools/ocaml/xenstored/disk.ml
+++ b/tools/ocaml/xenstored/disk.ml
@@ -176,7 +176,7 @@ let write store =
            output_byte ch i
 
        let w32 ch v =
-           assert (v >= 0 && v <= 0xFFFF_FFFF);
+           assert (v >= 0 && Int64.of_int v <= 0xFFFF_FFFFL);
            output_binary_int ch v
 
        let pos = pos_out
@@ -213,7 +213,7 @@ let write store =
 
        let r32 t =
            (* read unsigned 32-bit int *)
-           let r = input_binary_int t land 0xFFFF_FFFF in
+           let r = Int64.logand (Int64.of_int (input_binary_int t))
0xFFFF_FFFFL |> Int64.to_int in
            assert (r >= 0);
            r
 
@@ -293,7 +293,7 @@ module LiveRecord = struct
        write_record t Type.global_data 8 @@ fun b ->
        O.w32 b (FD.to_int rw_sock);
                 (* TODO: this needs a unit test/live update test too!
*)
-       O.w32 b 0xFFFF_FFFF
+       O.w32 b 0x3FFF_FFFF
 
    let read_global_data t ~len f =
        read_expect t "global_data" 8 len;
> 
> ~Andrew
Andrew Cooper May 12, 2021, 12:51 p.m. UTC | #4
On 12/05/2021 11:10, Edwin Torok wrote:
> On Tue, 2021-05-11 at 21:05 +0100, Andrew Cooper wrote:
>> On 11/05/2021 19:05, Edwin Török wrote:
>>> These patches have been posted previously.
>>> The gnttab patches (tools/ocaml/libs/mmap) were not applied at the
>>> time
>>> to avoid conflicts with an in-progress XSA.
>>> The binary format live-update and fuzzing patches were not applied
>>> because it was too close to the next Xen release freeze.
>>>
>>> The patches depend on each-other: live-update only works correctly
>>> when the gnttab
>>> patches are taken too (MFN is not part of the binary live-update
>>> stream),
>>> so they are included here as a single series.
>>> The gnttab patches replaces one use of libxenctrl with stable
>>> interfaces, leaving one unstable
>>> libxenctrl interface used by oxenstored.
>>>
>>> The 'vendor external dependencies' may be optional, it is useful to
>>> be part
>>> of a patchqueue in a specfile so that you can build everything
>>> without external dependencies,
>>> but might as well commit it so everyone has it easily available not
>>> just XenServer.
>>>
>>> Note that the live-update fuzz test doesn't yet pass, it is still
>>> able to find bugs.
>>> However the reduced version with a fixed seed used as a unit test
>>> does pass,
>>> so it is useful to have it committed, and further improvements can
>>> be made later
>>> as more bugs are discovered and fixed.
>>>
>>> Edwin Török (17):
>>>   docs/designs/xenstore-migration.md: clarify that deletes are
>>> recursive
>>>   tools/ocaml: add unit test skeleton with Dune build system
>>>   tools/ocaml: vendor external dependencies for convenience
>>>   tools/ocaml/xenstored: implement the live migration binary format
>>>   tools/ocaml/xenstored: add binary dump format support
>>>   tools/ocaml/xenstored: add support for binary format
>>>   tools/ocaml/xenstored: validate config file before live update
>>>   Add structured fuzzing unit test
>>>   tools/ocaml: use common macros for manipulating mmap_interface
>>>   tools/ocaml/libs/mmap: allocate correct number of bytes
>>>   tools/ocaml/libs/mmap: Expose stub_mmap_alloc
>>>   tools/ocaml/libs/mmap: mark mmap/munmap as blocking
>>>   tools/ocaml/libs/xb: import gnttab stubs from mirage
>>>   tools/ocaml: safer Xenmmap interface
>>>   tools/ocaml/xenstored: use gnttab instead of xenctrl's
>>>     foreign_map_range
>>>   tools/ocaml/xenstored: don't store domU's mfn of ring page
>>>   tools/ocaml/libs/mmap: Clean up unused read/write
>> Gitlab CI reports failures across the board in Debian Stretch 32-bit
>> builds.  All logs
>> https://gitlab.com/xen-project/patchew/xen/-/pipelines/301146112 but
>> the
>> tl;dr seems to be:
>>
>> File "disk.ml", line 179, characters 26-37:
>> Error: Integer literal exceeds the range of representable integers of
>> type int
> Thanks, this should fix it, I refreshed my git tree (there is also a
> fix there for the older version of Make):
> https://gitlab.com/xen-project/patchew/xen/-/pipelines/301146112
>
> Not sure whether it is worth continuing to support 32-bit i686 builds,
> any modern Intel/AMD CPU would be 64-bit capable, but perhaps 32-bit is
> still popular in the ARM world and keeping 32-bit Intel supported is
> the easiest way to build-test it?

Yes - arm32 is very much a thing, and currently 32bit userspace on x86
is a supported configuration.

>
> diff --git a/tools/ocaml/xenstored/disk.ml
> b/tools/ocaml/xenstored/disk.ml
> index 59794324e1..b7678af87f 100644
> --- a/tools/ocaml/xenstored/disk.ml
> +++ b/tools/ocaml/xenstored/disk.ml
> @@ -176,7 +176,7 @@ let write store =
>             output_byte ch i
>  
>         let w32 ch v =
> -           assert (v >= 0 && v <= 0xFFFF_FFFF);
> +           assert (v >= 0 && Int64.of_int v <= 0xFFFF_FFFFL);

In the case that v is 32 bits wide, it will underflow and fail the v >=
0 check, before the upcast to Int64.

~Andrew
Edwin Torok May 12, 2021, 3:04 p.m. UTC | #5
On Wed, 2021-05-12 at 13:51 +0100, Andrew Cooper wrote:
> On 12/05/2021 11:10, Edwin Torok wrote:
> > On Tue, 2021-05-11 at 21:05 +0100, Andrew Cooper wrote:
> > > 
> > diff --git a/tools/ocaml/xenstored/disk.ml
> > b/tools/ocaml/xenstored/disk.ml
> > index 59794324e1..b7678af87f 100644
> > --- a/tools/ocaml/xenstored/disk.ml
> > +++ b/tools/ocaml/xenstored/disk.ml
> > @@ -176,7 +176,7 @@ let write store =
> >             output_byte ch i
> >  
> >         let w32 ch v =
> > -           assert (v >= 0 && v <= 0xFFFF_FFFF);
> > +           assert (v >= 0 && Int64.of_int v <= 0xFFFF_FFFFL);
> 
> In the case that v is 32 bits wide, it will underflow and fail the v
> >=
> 0 check, before the upcast to Int64.

I'll have to review the callers of this, I think my intention was to
forbid dumping negative values because it is ambigous what it means.
In case you are running on 64-bit that is most likely a bug because I
think most 32-bit values were defined as unsigned in the migration spec
or in the original xen public headers (I'll have to double check).

However in case of a 32-bit system we can have negative values where an
otherwise unsigned 32-bit quantity in xen is represented as an ocaml
int, or even silently truncated (if the xen value actually uses all 32-
bits, because OCaml ints are only 31-bits on 32-bit systems, one would
have to use the int32 type to get true 32-bit quantities in ocaml but
that comes with additional boxing and a more complicated syntax,
so in most places in Xen I see the difference just being ignored).

Perhaps this should forbid negative values only on 64-bit systems
(where that would be a bug), and allow it on 32-bit systems (where a
negative value might be legitimate or a bug, we can't tell).
Checking Sys.word_size should tell us what system we are on.

Best regards,
--Edwin