Re: Re: [PATCH v2] virtio-blk: Add validation for block size in config space

From
Yongji Xie <hidden>
Date
2021-06-16 08:35:23
Also in
lkml
Reply to
Michael S. Tsirkin, 2021-06-15
On Tue, Jun 15, 2021 at 11:27 PM Michael S. Tsirkin [off-list ref] wrote:
On Tue, Jun 15, 2021 at 06:48:10PM +0800, Xie Yongji wrote:
quoted
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 <redacted>
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
Thread (3 messages) 3 messages, 2 authors, last reply 2021-06-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help