qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Richard Henderson <rth@twiddle.net>
Cc: "Andreas Färber" <andreas.faerber@web.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/3] move WORDS_ALIGNED to qemu-common.h
Date: Tue, 07 Jun 2011 11:17:15 +0200	[thread overview]
Message-ID: <4DEDEC9B.8010203@redhat.com> (raw)
In-Reply-To: <4DED518E.6090001@twiddle.net>

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

  reply	other threads:[~2011-06-07  9:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 14:25 [Qemu-devel] [PATCH v2 0/3] make endian-independent unaligned memory access functions available to libhw Paolo Bonzini
2011-06-06 14:25 ` [Qemu-devel] [PATCH v2 1/3] move WORDS_ALIGNED to qemu-common.h Paolo Bonzini
2011-06-06 17:15   ` Andreas Färber
2011-06-06 20:24     ` Paolo Bonzini
2011-06-06 22:15     ` Richard Henderson
2011-06-07  9:17       ` Paolo Bonzini [this message]
2011-06-06 14:25 ` [Qemu-devel] [PATCH v2 2/3] softfloat: change default nan definitions to variables Paolo Bonzini
2011-06-06 14:25 ` [Qemu-devel] [PATCH v2 3/3] move unaligned memory access functions to bswap.h Paolo Bonzini
2011-06-06 19:56   ` Richard Henderson
2011-06-06 20:27     ` Paolo Bonzini
2011-06-06 22:05       ` Richard Henderson
2011-06-06 23:07     ` malc
2011-06-07 16:54       ` Richard Henderson
2011-06-07 17:29         ` malc
2011-07-06 13:29 ` [Qemu-devel] [PATCH v2 0/3] make endian-independent unaligned memory access functions available to libhw Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DEDEC9B.8010203@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=andreas.faerber@web.de \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).