All of lore.kernel.org
 help / color / mirror / Atom feed
* Undefined behavior in libxenvchan
@ 2025-12-14 19:09 Demi Marie Obenour
  2025-12-14 22:50 ` Andrew Cooper
  0 siblings, 1 reply; 6+ messages in thread
From: Demi Marie Obenour @ 2025-12-14 19:09 UTC (permalink / raw)
  To: Xen developer discussion


[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-12-15 18:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-14 19:09 Undefined behavior in libxenvchan Demi Marie Obenour
2025-12-14 22:50 ` 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

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.