[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/3] move WORDS_ALIGNED to qemu-common.h
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/3] move WORDS_ALIGNED to qemu-common.h |
Date: |
Tue, 07 Jun 2011 11:17:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 |
On 06/07/2011 12:15 AM, Richard Henderson wrote:
Do we take his existing 3-part patch as-is, and the packed patch as a followup?
Do we convert to packed accesses first and move it around after?
Do we do it all in one step?
Either of the first two works for me.
However, since this series was a start towards fixing real bugs reported
by Coverity:
qemu-kvm-0.14.0/hw/scsi-bus.c:190:
sign_extension: Suspicious implicit sign extension:
"cmd[10]" with type "unsigned char" (8 bits, unsigned) is promoted
in "cmd[13] | (cmd[12] << 8) | (cmd[11] << 16) | (cmd[10] << 24)"
to type "int" (32 bits, signed), then sign-extended to type
"unsigned long" (64 bits, unsigned).
If "cmd[13] | (cmd[12] << 8) | (cmd[11] << 16) | (cmd[10] << 24)"
is greater than 0x7FFFFFFF, the upper bits of the result will all
be 1.
... and there were objections on requiring recent GCC, perhaps it's
better to just commit it as is.
Paolo