All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Christian Lindig" <christian.lindig@citrix.com>,
	"David Scott" <dave@recoil.org>,
	"Edwin Török" <edwin.torok@cloud.com>,
	"Rob Hoes" <Rob.Hoes@citrix.com>
Subject: [PATCH 0/7] tools/ocaml: Memory corruption fixes in bindings
Date: Tue, 31 Jan 2023 21:29:06 +0000	[thread overview]
Message-ID: <20230131212913.6199-1-andrew.cooper3@citrix.com> (raw)

It turns out there have been some latent memory corruption bugs and other
errors in the bindings since they were first introduced.

These were discovered after realising that we'd introduced other memory
corruption bugs as part of the Ocaml 5 fixes, and in the case of the evtchn
bindings, backported this as part of the oxenstored-lu fixes.

This series addresses all the memory corrupution issues we're aware of that
can occur in an entirely well-formed program.

Deferred for now are the (hopefully latent) memory corruption errors which
happen due to bad parameter passing, and a substantial pile of related cleanup.

Andrew Cooper (3):
  tools/ocaml/libs: Allocate the correct amount of memory for Abstract_tag
  tools/ocaml/evtchn: Misc cleanup
  tools/ocaml/xc: Don't reference Abstract_Tag objects with the GC lock released

Edwin Török (4):
  tools/ocaml/libs: Don't declare stubs as taking void
  tools/ocaml/evtchn: Don't reference Custom objects with the GC lock released
  tools/ocaml/xc: Fix binding for xc_domain_assign_device()
  tools/ocaml/xc: Don't reference Custom objects with the GC lock released

 tools/ocaml/libs/eventchn/xeneventchn_stubs.c |  89 ++---
 tools/ocaml/libs/mmap/Makefile                |   2 +
 tools/ocaml/libs/mmap/xenmmap_stubs.c         |   6 +-
 tools/ocaml/libs/xb/xenbus_stubs.c            |   5 +-
 tools/ocaml/libs/xc/xenctrl_stubs.c           | 494 ++++++++++++++------------
 5 files changed, 323 insertions(+), 273 deletions(-)

-- 
2.11.0



             reply	other threads:[~2023-01-31 21:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 21:29 Andrew Cooper [this message]
2023-01-31 21:29 ` [PATCH 1/7] tools/ocaml/libs: Don't declare stubs as taking void Andrew Cooper
2023-01-31 21:29 ` [PATCH 2/7] tools/ocaml/libs: Allocate the correct amount of memory for Abstract_tag Andrew Cooper
2023-01-31 21:29 ` [PATCH 3/7] tools/ocaml/evtchn: Don't reference Custom objects with the GC lock released Andrew Cooper
2023-01-31 21:29 ` [PATCH 4/7] tools/ocaml/evtchn: Misc cleanup Andrew Cooper
2023-01-31 21:29 ` [PATCH 5/7] tools/ocaml/xc: Fix binding for xc_domain_assign_device() Andrew Cooper
2023-01-31 21:29 ` [PATCH 6/7] tools/ocaml/xc: Don't reference Abstract_Tag objects with the GC lock released Andrew Cooper
2023-01-31 21:29 ` [PATCH 7/7] tools/ocaml/xc: Don't reference Custom " Andrew Cooper
2023-02-01  9:04 ` [PATCH 0/7] tools/ocaml: Memory corruption fixes in bindings Christian Lindig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230131212913.6199-1-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Rob.Hoes@citrix.com \
    --cc=christian.lindig@citrix.com \
    --cc=dave@recoil.org \
    --cc=edwin.torok@cloud.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.