[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH for-4.17 v3 00/15] OCaml fixes for Xen 4.17
These are the patches that I have outstanding for Xen 4.17. I have included a reason why I'm requesting them to be included in 4.17 after the --- line in each individual patch, see also a summary below. For convenience the patches are also available in a git repo: ``` git remote add edwintorok https://github.com/edwintorok/xen.git git fetch edwintorok private/edvint/for-4.17 git log -p origin/master..private/edvint/for-4.17 ``` And viewable with a browser too: https://github.com/edwintorok/xen/compare/private/edvint/for-4.17 * 3 patches related to OCaml 5 support https://patchwork.kernel.org/project/xen-devel/list/?series=680975 These have already been posted to the list previously, but not yet committed to master (I probably didn't use the correct subject and CC line for patches meant for 4.17, I think I've fixed that now) * Makefile.rules followup Also part of https://patchwork.kernel.org/project/xen-devel/list/?series=680975 these address some review feedback that I received after patches got committed * oxenstored live update bugfixes Testing of oxenstored live update has revealed some bugs (some of which got discovered on the C side too and fixed during one of the previous XSAs, but unfortunately none of that discussion is public, and we've ended up rediscovering the issue in the OCaml implementation too, which reminded me of the XSA discussions at the time). This brings the OCaml live update handling of event channels closer to the C xenstored version. It also fixes a few more bugs regarding logging and exception handling during live update, and during out of memory situations (theoretical now after XSA-326 fix). * a bugfix for a xenctrl binding Xen returns uninitialized data as part of a paging op domctl when a domain is dying. Workaround in the C stub by always initializing the domctl arguments to detect this. Xen fix in hypervisor side will be done separately, but even then having this is useful defensive coding. This is a 9 year old bug that still happens today, I've encountered it while testing this very series, hence the inclusion here. I expect most of these to be straight forward bugfixes, the only one slightly controversial might be the indentation one: changing tabs to spaces to match Xen coding style. I was unsure whether to include it here, but I think it is best to have it in 4.17 to simplify future (security) backports from master to 4.17, and avoid having to deal with whitespace issues all the time when writing patches. The code here used a style that was different from Xen's, and also different from every other piece of code that I work on, and OCaml indentation tools also only support spaces, not tabs, so there really is no reason to keep the code as is (initially I thought it uses tabs to follow Xen style, but after reading CODING_STYLE I realized that is not true). It is very easy to verify that the patch changes nothing with `git diff -w`, or `git log -p -1`. Edwin Török (15): tools/ocaml/libs/eventchn: do not leak event channels and OCaml 5.0 compat tools/ocaml/libs/xc: OCaml 5.0 compatibility tools/ocaml/libs/{xb, mmap}: use Data_abstract_val wrapper tools/ocaml/xenstored/Makefile: use ocamldep -sort for linking order tools/ocaml/Makefile.rules: do not run ocamldep on distclean tools/ocaml/Makefile.rules: hide -include on *clean CODING_STYLE(tools/ocaml): add 'make format' and remove tabs tools/ocaml/libs/evtchn: add xenevtchn_fdopen bindings tools/ocaml/xenstored/store.ml: fix build error tools/ocaml/xenstored: keep eventchn FD open across live update tools/ocaml/xenstored: do not rebind event channels after live update tools/ocaml/xenstored: log live update issues at warning level tools/ocaml/xenstored: set uncaught exception handler tools/ocaml/xenstored/syslog_stubs.c: avoid potential NULL dereference tools/ocaml/libs/xc: fix use of uninitialized memory in shadow_allocation_get tools/ocaml/Makefile | 5 + tools/ocaml/Makefile.rules | 4 +- tools/ocaml/libs/eventchn/xeneventchn.ml | 11 +- tools/ocaml/libs/eventchn/xeneventchn.mli | 14 +- tools/ocaml/libs/eventchn/xeneventchn_stubs.c | 199 +- tools/ocaml/libs/mmap/mmap_stubs.h | 9 +- tools/ocaml/libs/mmap/xenmmap.ml | 2 +- tools/ocaml/libs/mmap/xenmmap.mli | 4 +- tools/ocaml/libs/mmap/xenmmap_stubs.c | 114 +- tools/ocaml/libs/xb/op.ml | 76 +- tools/ocaml/libs/xb/packet.ml | 30 +- tools/ocaml/libs/xb/partial.ml | 48 +- tools/ocaml/libs/xb/xb.ml | 422 ++-- tools/ocaml/libs/xb/xb.mli | 106 +- tools/ocaml/libs/xb/xenbus_stubs.c | 50 +- tools/ocaml/libs/xb/xs_ring.ml | 28 +- tools/ocaml/libs/xb/xs_ring_stubs.c | 216 +- tools/ocaml/libs/xc/abi-check | 2 +- tools/ocaml/libs/xc/xenctrl.ml | 330 +-- tools/ocaml/libs/xc/xenctrl.mli | 12 +- tools/ocaml/libs/xc/xenctrl_stubs.c | 1428 ++++++------ tools/ocaml/libs/xentoollog/caml_xentoollog.h | 6 +- .../ocaml/libs/xentoollog/xentoollog_stubs.c | 196 +- tools/ocaml/libs/xl/xenlight_stubs.c | 2022 ++++++++--------- tools/ocaml/libs/xs/queueop.ml | 48 +- tools/ocaml/libs/xs/xs.ml | 220 +- tools/ocaml/libs/xs/xs.mli | 46 +- tools/ocaml/libs/xs/xsraw.ml | 300 +-- tools/ocaml/libs/xs/xst.ml | 76 +- tools/ocaml/libs/xs/xst.mli | 20 +- tools/ocaml/test/dmesg.ml | 26 +- tools/ocaml/test/list_domains.ml | 4 +- tools/ocaml/test/raise_exception.ml | 4 +- tools/ocaml/test/xtl.ml | 28 +- tools/ocaml/xenstored/Makefile | 6 +- tools/ocaml/xenstored/config.ml | 156 +- tools/ocaml/xenstored/connection.ml | 594 ++--- tools/ocaml/xenstored/connections.ml | 304 +-- tools/ocaml/xenstored/define.ml | 6 +- tools/ocaml/xenstored/disk.ml | 218 +- tools/ocaml/xenstored/domain.ml | 104 +- tools/ocaml/xenstored/domains.ml | 320 +-- tools/ocaml/xenstored/event.ml | 12 +- tools/ocaml/xenstored/history.ml | 62 +- tools/ocaml/xenstored/logging.ml | 467 ++-- tools/ocaml/xenstored/packet.ml | 20 +- tools/ocaml/xenstored/parse_arg.ml | 106 +- tools/ocaml/xenstored/perms.ml | 216 +- tools/ocaml/xenstored/poll.ml | 68 +- tools/ocaml/xenstored/poll.mli | 4 +- tools/ocaml/xenstored/process.ml | 1212 +++++----- tools/ocaml/xenstored/quota.ml | 74 +- tools/ocaml/xenstored/select_stubs.c | 62 +- tools/ocaml/xenstored/stdext.ml | 190 +- tools/ocaml/xenstored/store.ml | 752 +++--- tools/ocaml/xenstored/symbol.ml | 2 +- tools/ocaml/xenstored/syslog.ml | 48 +- tools/ocaml/xenstored/syslog_stubs.c | 33 +- tools/ocaml/xenstored/systemd_stubs.c | 10 +- tools/ocaml/xenstored/transaction.ml | 352 +-- tools/ocaml/xenstored/trie.ml | 222 +- tools/ocaml/xenstored/trie.mli | 22 +- tools/ocaml/xenstored/utils.ml | 146 +- tools/ocaml/xenstored/xenstored.ml | 1051 ++++----- 64 files changed, 6557 insertions(+), 6388 deletions(-) base-commit: e61a78981364925a43c9cc24dc77b62ff7b93c9f -- 2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |