From: Yongji Xie <xieyongji@bytedance.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
amit@kernel.org, arei.gonglei@huawei.com, airlied@linux.ie,
kraxel@redhat.com, dan.j.williams@intel.com,
Ohad Ben Cohen <ohad@wizery.com>,
bjorn.andersson@linaro.org, david@redhat.com, vgoyal@redhat.com,
miklos@szeredi.hu, Stefano Garzarella <sgarzare@redhat.com>,
virtualization <virtualization@lists.linux-foundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Re: [RFC PATCH 01/17] virtio_ring: Avoid reading unneeded used length
Date: Mon, 17 May 2021 17:41:31 +0800 [thread overview]
Message-ID: <CACycT3vO53+GGZ+Lw2_ervZFk-J647gmGb+G6DFL6mpfk4+gbQ@mail.gmail.com> (raw)
In-Reply-To: <1f8289f84cd4dd9f440705d3ebab2c8a3e2e6a2c.camel@sipsolutions.net>
On Mon, May 17, 2021 at 5:12 PM Johannes Berg <johannes@sipsolutions.net> wrote:
>
> On Mon, 2021-05-17 at 17:08 +0800, Xie Yongji wrote:
> > If device driver doesn't need used length, it can pass a NULL
> > len in virtqueue_get_buf()/virtqueue_get_buf_ctx().
> >
>
> Well, actually, it can't right now?
>
Yes.
> You should probably rephrase this, saying something like
>
> Allow passing NULL to len in ... if the device driver doesn't need
> the length, and don't read it in that case.
>
> or so?
>
Looks good to me.
> > Then
> > we can avoid reading and validating the len value in used
> > ring entries.
>
> Not sure what that "validating" is about, I only see reading?
>
The “validating" is actually done in the last patch of this series.
Will remove it.
Thanks,
Yongji
next prev parent reply other threads:[~2021-05-17 9:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 9:08 [RFC PATCH 00/17] Add validation for used length Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 01/17] virtio_ring: Avoid reading unneeded " Xie Yongji
2021-05-17 9:11 ` Johannes Berg
2021-05-17 9:41 ` Yongji Xie [this message]
2021-05-17 9:08 ` [RFC PATCH 02/17] virtio-blk: Remove unused " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 03/17] virtio_console: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 04/17] crypto: virtio - " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 05/17] drm/virtio: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 06/17] caif_virtio: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 07/17] virtio_net: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 08/17] mac80211_hwsim: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 09/17] virtio_pmem: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 10/17] rpmsg: virtio: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 11/17] virtio_scsi: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 12/17] virtio_balloon: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 13/17] virtio_input: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 14/17] virtio_mem: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 15/17] virtiofs: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 16/17] vsock: " Xie Yongji
2021-05-17 9:08 ` [RFC PATCH 17/17] virtio_ring: Add validation for " Xie Yongji
2021-05-17 23:39 ` Michael S. Tsirkin
2021-05-25 1:31 ` Jason Wang
2021-05-25 5:08 ` Yongji Xie
2021-05-17 23:40 ` [RFC PATCH 00/17] " Michael S. Tsirkin
2021-05-18 8:29 ` Yongji Xie
2021-05-18 9:52 ` Michael S. Tsirkin
2021-05-18 12:28 ` Yongji Xie
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=CACycT3vO53+GGZ+Lw2_ervZFk-J647gmGb+G6DFL6mpfk4+gbQ@mail.gmail.com \
--to=xieyongji@bytedance.com \
--cc=airlied@linux.ie \
--cc=amit@kernel.org \
--cc=arei.gonglei@huawei.com \
--cc=bjorn.andersson@linaro.org \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=jasowang@redhat.com \
--cc=johannes@sipsolutions.net \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mst@redhat.com \
--cc=ohad@wizery.com \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=vgoyal@redhat.com \
--cc=virtualization@lists.linux-foundation.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 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).