From: Wei Liu <wei.liu@kernel.org>
To: "Andrea Parri (Microsoft)" <parri.andrea@gmail.com>
Cc: linux-kernel@vger.kernel.org, kys@microsoft.com,
haiyangz@microsoft.com, sthemmin@microsoft.com,
wei.liu@kernel.org, davem@davemloft.net, kuba@kernel.org,
jejb@linux.ibm.com, martin.petersen@oracle.com,
linux-hyperv@vger.kernel.org, netdev@vger.kernel.org,
linux-scsi@vger.kernel.org, mikelley@microsoft.com,
Andres Beltran <lkmlabelt@gmail.com>
Subject: Re: [PATCH hyperv-next] Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer
Date: Thu, 6 May 2021 17:49:45 +0000 [thread overview]
Message-ID: <20210506174945.5vp72zn44uu7xkd5@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <20210408161439.341988-1-parri.andrea@gmail.com>
On Thu, Apr 08, 2021 at 06:14:39PM +0200, Andrea Parri (Microsoft) wrote:
> From: Andres Beltran <lkmlabelt@gmail.com>
>
> Pointers to ring-buffer packets sent by Hyper-V are used within the
> guest VM. Hyper-V can send packets with erroneous values or modify
> packet fields after they are processed by the guest. To defend
> against these scenarios, return a copy of the incoming VMBus packet
> after validating its length and offset fields in hv_pkt_iter_first().
> In this way, the packet can no longer be modified by the host.
>
> Signed-off-by: Andres Beltran <lkmlabelt@gmail.com>
> Co-developed-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
> Signed-off-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
> ---
> drivers/hv/channel.c | 9 ++--
> drivers/hv/hv_fcopy.c | 1 +
> drivers/hv/hv_kvp.c | 1 +
> drivers/hv/hyperv_vmbus.h | 2 +-
> drivers/hv/ring_buffer.c | 82 ++++++++++++++++++++++++++-----
> drivers/net/hyperv/hyperv_net.h | 7 +++
> drivers/net/hyperv/netvsc.c | 2 +
> drivers/net/hyperv/rndis_filter.c | 2 +
> drivers/scsi/storvsc_drv.c | 10 ++++
> include/linux/hyperv.h | 48 +++++++++++++++---
> net/vmw_vsock/hyperv_transport.c | 4 +-
> 11 files changed, 143 insertions(+), 25 deletions(-)
In theory this patch needs acks from network and scsi maintainers, but
the changes are so small and specific to Hyper-V drivers. In the
interest of making progress, I will be picking up this patch shortly
unless I hear objections.
Wei.
next prev parent reply other threads:[~2021-05-06 17:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 16:14 [PATCH hyperv-next] Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer Andrea Parri (Microsoft)
2021-04-09 15:49 ` Michael Kelley
2021-04-09 17:19 ` Andrea Parri
2021-05-06 17:49 ` Wei Liu [this message]
2021-05-10 17:32 ` Wei Liu
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=20210506174945.5vp72zn44uu7xkd5@liuwe-devbox-debian-v2 \
--to=wei.liu@kernel.org \
--cc=davem@davemloft.net \
--cc=haiyangz@microsoft.com \
--cc=jejb@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lkmlabelt@gmail.com \
--cc=martin.petersen@oracle.com \
--cc=mikelley@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=parri.andrea@gmail.com \
--cc=sthemmin@microsoft.com \
/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 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).