Il 24/08/2012 12:43, Hannes Reinecke ha scritto: > Hehe. So finally someone else stumbled across this one. > > All is fine and dandy as long as you're able to use scsi-disk. > As soon as you're forced to use scsi-generic we're in trouble. > > With scsi-generic we actually have two problems: > 1) scsi-generic just acts as a pass-through and passes the commands > as-is, including the scatter-gather information as formatted by > the guest. So the guest could easily format an SG_IO comand > which will not be compatible with the host. > 2) The host is not able to differentiate between a malformed > SG_IO command and a real I/O error; in both cases it'll return > -EIO. > > So we can fix this by either > a) ignore (as we do nowadays :-) > b) Fixup scsi-generic to inspect and modify SG_IO information > to ensure the host-limits are respected That's what scsi-block already does. Perhaps sooner or later we will need a scsi-tape? That would be fine. > Yes, it's painful. But in the long run we'll have to do an SG_IO > inspection anyway, otherwise we'll always be susceptible to malicious > SG_IO attacks. I would like to do this in the kernel using BPF. I posted a possible spec at http://www.redhat.com/archives/libvir-list/2012-June/msg00505.html but the response was, ehm, underwhelming. Paolo _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization