[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities |
Date: |
Mon, 26 Aug 2013 15:42:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
Il 26/08/2013 11:06, Nikunj A Dadhania ha scritto:
>>> + fprintf(stderr, "vscsi_send_capabilities: size out of bound !\n");
>>> + goto error_out;
>>> + }
>>
>> I am not 100% familiar with the protocol, could it be that we should
>> just read sizeof(cap) instead of erroring out or is there no way it
>> can be correct and have a len too long ?
>
> If the length is incorrect, can we trust whether cap is correct or is of
> the type we are expecting?
We shouldn't care, it'd be a guest bug.
If the guest is asking for say 1024 bytes, we do not have to fill all of
them. It is in principle possible that a subsequent revision of vscsi
will make the struct larger; perhaps a bit in the first part of the
struct will tell the guest if the second part has been filled.
Unless the spec explicitly say the opposite, I would just zero the bytes
between sizeof(cap) and len.
Paolo
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, (continued)
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, Alexander Graf, 2013/08/26
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, Benjamin Herrenschmidt, 2013/08/26
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, Nikunj A Dadhania, 2013/08/26
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, Nikunj A Dadhania, 2013/08/26
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, Alexander Graf, 2013/08/26
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, Nikunj A Dadhania, 2013/08/26
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, Alexander Graf, 2013/08/26
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, Nikunj A Dadhania, 2013/08/27
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, Benjamin Herrenschmidt, 2013/08/26
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, Nikunj A Dadhania, 2013/08/26
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities,
Paolo Bonzini <=
- Re: [Qemu-ppc] [PATCH] spapr-vscsi: Adding VSCSI capabilities, Nikunj A Dadhania, 2013/08/27