qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] sd: Don't trace SDRequest crc field


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] sd: Don't trace SDRequest crc field
Date: Thu, 28 Jun 2018 17:58:06 +0100

On 26 June 2018 at 19:20, Philippe Mathieu-Daudé <address@hidden> wrote:
> On 06/26/2018 03:03 PM, Peter Maydell wrote:
>> We don't actually implement SD command CRC checking, because
>> for almost all of our SD controllers the CRC generation is
>> done in hardware, and so modelling CRC generation and checking
>> would be a bit pointless. (The exception is that milkymist-memcard
>> makes the guest software compute the CRC.)
>>
>> As a result almost all of our SD controller models don't bother
>> to set the SDRequest crc field, and the SD card model doesn't
>> check it. So the tracing of it in sdbus_do_command() provokes
>> Coverity warnings about use of uninitialized data.
>>
>> Drop the CRC field from the trace; we can always add it back
>> if and when we do anything useful with the CRC.
>>
>> Fixes Coverity issues 1386072, 1386074, 1386076, 1390571.
>>
>> Signed-off-by: Peter Maydell <address@hidden>
>> ---
>> We might also want to try to improve our CRC handling
>> (eg so that the controller can say "I have not set the CRC,
>> don't bother checking it" or "I have set the CRC, do check
>> it because it's come from the guest software"), but let's
>> put in the simple tweak to make Coverity happy for the moment.
>
> Thanks for this simple patch... So simple I couldn't even think of it...
>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

Thanks; applied to target-arm.next.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]