linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yongji Xie <xieyongji@bytedance.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Jens Axboe <axboe@kernel.dk>,
	virtualization <virtualization@lists.linux-foundation.org>,
	linux-block@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Re: [PATCH v2] virtio-blk: Add validation for block size in config space
Date: Wed, 16 Jun 2021 16:35:06 +0800	[thread overview]
Message-ID: <CACycT3u-ZUQUDVvJZEck+j0F4VZ8H62_Zo-QPDs_97aWrvgL=A@mail.gmail.com> (raw)
In-Reply-To: <20210615112612-mutt-send-email-mst@kernel.org>

On Tue, Jun 15, 2021 at 11:27 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Tue, Jun 15, 2021 at 06:48:10PM +0800, Xie Yongji wrote:
> > This ensures that we will not use an invalid block size
> > in config space (might come from an untrusted device).
> >
> > Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
>
> I'd say if device presents an unreasonable value,
> and we want to ignore that, then we should not
> negotiate VIRTIO_BLK_F_BLK_SIZE so that host knows.
>
> So maybe move the logic to validate_features.
>

Looks good to me. Will do it in v3.

Thanks,
Yongji

      reply	other threads:[~2021-06-16  8:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 10:48 [PATCH v2] virtio-blk: Add validation for block size in config space Xie Yongji
2021-06-15 15:27 ` Michael S. Tsirkin
2021-06-16  8:35   ` Yongji Xie [this message]

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='CACycT3u-ZUQUDVvJZEck+j0F4VZ8H62_Zo-QPDs_97aWrvgL=A@mail.gmail.com' \
    --to=xieyongji@bytedance.com \
    --cc=axboe@kernel.dk \
    --cc=jasowang@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=stefanha@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).