From: Ian Campbell <Ian.Campbell@citrix.com>
To: Dave Scott <Dave.Scott@citrix.com>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>,
Ian Jackson <Ian.Jackson@citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] ocaml/xenctrl: Fix stub_xc_readconsolering()
Date: Mon, 2 Feb 2015 15:28:40 +0000 [thread overview]
Message-ID: <1422890920.5838.5.camel@citrix.com> (raw)
In-Reply-To: <92607FE1-5FE3-4FD3-B119-E29A828682AB@citrix.com>
On Fri, 2015-01-30 at 14:30 +0000, Dave Scott wrote:
>
>
> > On 30 Jan 2015, at 14:11, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> >
> > The Ocaml stub to retrieve the hypervisor console ring had a few problems.
> >
> > * A single 32k buffer would truncate a large console ring.
> > * The buffer was static and not under the protection of the Ocaml GC lock so
> > could be clobbered by concurrent accesses.
> > * Embedded NUL characters would cause caml_copy_string() (which is strlen()
> > based) to truncate the buffer.
> >
> > The function is rewritten from scratch, using the same algorithm as the python
> > stubs, but uses the protection of the Ocaml GC lock to maintain a static
> > running total of the ring size, to avoid redundant realloc()ing in future
> > calls.
> >
>
> As far as the OCaml FFI goes, this looks fine to me. I can’t spot any
> problems with the more regular C parts either, although someone who is
> more used to spotting bugs in C code should probably take a look.
It looks ok to me and the fact it is based on some existing code helps
too.
> Acked-by: David Scott <dave.scott@citrix.com>
likewise + applied.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2015-02-02 15:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 14:11 [PATCH] ocaml/xenctrl: Fix stub_xc_readconsolering() Andrew Cooper
2015-01-30 14:30 ` Dave Scott
2015-02-02 15:28 ` Ian Campbell [this message]
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=1422890920.5838.5.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=Dave.Scott@citrix.com \
--cc=Ian.Jackson@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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.