[Qemu-devel] [PATCH 3/4] scsi-generic: avoid invalid access to struct when emulating block limits

2018-10-29 Thread Paolo Bonzini
Emulation of the block limits VPD page called back into scsi-disk.c, which however expected the request to be for a SCSIDiskState and accessed a scsi-generic device outside the bounds of its struct (namely to retrieve s->max_unmap_size and s->max_io_size). To avoid this, move the emulation code to

Re: [Qemu-devel] [PATCH 3/4] scsi-generic: avoid invalid access to struct when emulating block limits

2018-11-05 Thread Max Reitz
On 29.10.18 18:34, Paolo Bonzini wrote: > Emulation of the block limits VPD page called back into scsi-disk.c, > which however expected the request to be for a SCSIDiskState and > accessed a scsi-generic device outside the bounds of its struct > (namely to retrieve s->max_unmap_size and s->max_io_s

Re: [Qemu-devel] [PATCH 3/4] scsi-generic: avoid invalid access to struct when emulating block limits

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 03:16, Max Reitz wrote: >> diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c >> index c5497bbea8..8fc74ef0bd 100644 >> --- a/hw/scsi/scsi-generic.c >> +++ b/hw/scsi/scsi-generic.c >> @@ -16,6 +16,7 @@ >> #include "qemu-common.h" >> #include "qemu/error-report.h" >> #incl