[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACycT3u-ZUQUDVvJZEck+j0F4VZ8H62_Zo-QPDs_97aWrvgL=A@mail.gmail.com>
Date: Wed, 16 Jun 2021 16:35:06 +0800
From: Yongji Xie <xieyongji@...edance.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: Jason Wang <jasowang@...hat.com>,
Stefan Hajnoczi <stefanha@...hat.com>,
Jens Axboe <axboe@...nel.dk>,
virtualization <virtualization@...ts.linux-foundation.org>,
linux-block@...r.kernel.org,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: Re: [PATCH v2] virtio-blk: Add validation for block size in
config space
On Tue, Jun 15, 2021 at 11:27 PM Michael S. Tsirkin <mst@...hat.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@...edance.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
Powered by blists - more mailing lists