patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: "Cole Helbling" <>
To: "Alyssa Ross" <>, <>
Subject: Re: [PATCH crosvm 1/2] msg_socket: introduce UnixSeqpacketExt
Date: Mon, 15 Jun 2020 17:17:47 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sun Jun 14, 2020 at 11:43 AM, Alyssa Ross wrote:
> Occasionally, it is useful to be able to use UnixSeqpacket as a type
> that can represent any kind of MsgSocket. For example, to keep some
> MsgSockets of different types in a Vec. In this case, it may be known
> what type of messages should be sent over a socket, even though that
> may not be represantable in the type system.
> To accomodate this situation, this patch introduces send_msg_on_socket
> and recv_msg_on_socket methods on UnixSeqpacket, that can be used to
> send or receive any kind of MsgOnSocket. The caller is obviously
> responsible for ensuring that the messages being sent are of the type
> expected by the socket.
> This lack of type safety for message types is not ideal, and so
> MsgSender and MsgReceiver should still be preferred wherever possible.

Is there anyway this can or will be rectified?

> ---
> msg_socket/src/ | 52 ++++++++++++++++++++++++++-----------------
> 1 file changed, 32 insertions(+), 20 deletions(-)

Otherwise, I don't see anything obviously wrong, but I'm also not very
familiar with sockets.

Reviewed-by: Cole Helbling <>

  reply	other threads:[~2020-06-16  0:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14 11:43 [PATCH crosvm 0/2] Fix deadlock on early VmRequest Alyssa Ross
2020-06-14 11:43 ` [PATCH crosvm 1/2] msg_socket: introduce UnixSeqpacketExt Alyssa Ross
2020-06-16  0:17   ` Cole Helbling [this message]
2020-06-16  9:32     ` Alyssa Ross
2020-06-22 22:06       ` Cole Helbling
2020-06-23  2:32         ` Alyssa Ross
2020-06-25  1:54       ` impaqt
2020-07-09 13:24         ` Alyssa Ross
2020-06-14 11:43 ` [PATCH crosvm 2/2] crosvm: fix deadlock on early VmRequest Alyssa Ross
2020-06-16  1:08   ` Cole Helbling
2020-06-16  9:39     ` Alyssa Ross

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:

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

  git send-email \ \ \ \ \

* 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.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).