All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: David Marchand <david.marchand@redhat.com>, dev@dpdk.org
Cc: chenbo.xia@intel.com
Subject: Re: [PATCH 2/2] vhost: validate fds attached to messages
Date: Thu, 5 May 2022 16:31:09 +0200	[thread overview]
Message-ID: <fa033bd2-7517-f39d-5078-05215589c408@redhat.com> (raw)
In-Reply-To: <20220425125431.26464-2-david.marchand@redhat.com>



On 4/25/22 14:54, David Marchand wrote:
> Some message handlers do not expect any file descriptor attached as
> ancillary data.
> Provide a common way to enforce this by adding a accepts_fd boolean in
> the message handler structure. When a message handler sets accepts_fd to
> true, it is responsible for calling validate_msg_fds with a right
> expected file descriptor count.
> This will avoid leaking some file descriptor by mistake when adding
> support for new vhost user message types.
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>   lib/vhost/vhost_user.c | 145 ++++++++++++-----------------------------
>   1 file changed, 43 insertions(+), 102 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


  reply	other threads:[~2022-05-05 14:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25 12:54 [PATCH 1/2] vhost: remove unneeded max enums David Marchand
2022-04-25 12:54 ` [PATCH 2/2] vhost: validate fds attached to messages David Marchand
2022-05-05 14:31   ` Maxime Coquelin [this message]
2022-05-05 19:58   ` Maxime Coquelin
2022-05-05 14:22 ` [PATCH 1/2] vhost: remove unneeded max enums Maxime Coquelin
2022-05-05 19:57 ` Maxime Coquelin
2022-05-06  7:12   ` David Marchand

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=fa033bd2-7517-f39d-5078-05215589c408@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.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.