All of lore.kernel.org
 help / color / mirror / Atom feed
From: Demi Marie Obenour <demiobenour@gmail.com>
To: Xen developer discussion <xen-devel@lists.xenproject.org>
Subject: Undefined behavior in libxenvchan
Date: Sun, 14 Dec 2025 14:09:15 -0500	[thread overview]
Message-ID: <e06eb432-289b-447a-8c3d-43da4705b4e9@gmail.com> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 441 bytes --]

I noticed that libxenvchan has undefined behavior: it passes pointers
to guest memory to memcpy() even though they can be concurrently
changed.

Would it make sense to reuse some of Xen's copy_from_guest() code
instead?  There might be a licensing problem (GPL vs LGPL), though.
I think the only approach that isn't UB and has decent performance
is to do the whole copy in assembly.
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2025-12-14 19:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-14 19:09 Demi Marie Obenour [this message]
2025-12-14 22:50 ` Undefined behavior in libxenvchan Andrew Cooper
2025-12-14 23:08   ` Demi Marie Obenour
2025-12-15  9:41     ` Jan Beulich
2025-12-15 11:10     ` Teddy Astie
2025-12-15 18:17       ` Demi Marie Obenour

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=e06eb432-289b-447a-8c3d-43da4705b4e9@gmail.com \
    --to=demiobenour@gmail.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.