virtio-win / kvm-guest-drivers-windows

Windows paravirtualized drivers for QEMU\KVM
https://www.linux-kvm.org/page/WindowsGuestDrivers
BSD 3-Clause "New" or "Revised" License
1.91k stars 377 forks source link

viostor: It seems that RhelScsiVerify has an improperly handled boundary condition. #1095

Closed zjmletang closed 1 week ago

zjmletang commented 1 month ago

Describe the bug In the RhelScsiVerify function, I understand that the case where lba + blocks == adaptExt->lastLBA should be a normal SRB. As shown in the figure below. If I am mistaken, please point it out to me.

image

vrozenfe commented 1 month ago

Right, we probably missed this case when applied https://github.com/virtio-win/kvm-guest-drivers-windows/commit/67f64d01967769d4b9673e4c1bd08fab184469d7

Thank you for spotting it out. The fix is welcome. Vadim.

MaxXor commented 1 month ago

Other location I found it seems to be correct: https://github.com/virtio-win/kvm-guest-drivers-windows/blob/657ad7efb539dd186cec1fd33cf31ba710f5dfb1/viostor/virtio_stor.c#L1333

zjmletang commented 1 month ago

Right, we probably missed this case when applied 67f64d0

Thank you for spotting it out. The fix is welcome. Vadim. @vrozenfe ok, I submit a patch to fix it JianMing

jumbi77 commented 2 weeks ago

Quess this can be closed with https://github.com/virtio-win/kvm-guest-drivers-windows/commit/4a388316733fd1e077262d5dfb534642f5abc5fb

zjmletang commented 2 weeks ago

yes, it can be closed