From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] block.h: Make BDRV_SECTOR_SIZE 64 bit safe
Date: Fri, 28 May 2010 11:38:08 +0200 [thread overview]
Message-ID: <4BFF8F00.5010707@redhat.com> (raw)
In-Reply-To: <4BFF7FBA.7080201@redhat.com>
On 05/28/10 10:32, Paolo Bonzini wrote:
> On 05/27/2010 05:44 PM, Jes Sorensen wrote:
>> > Candidate for stable too?
>> It should be safe to apply, but I didn't find any current users where
>> the mask was applied in a way where it was causing problems. Not sure if
>> you want the noise, or apply it as better safe than sorry?
>
> The only use in fact is this:
>
> addr = qemu_get_be64(f);
> flags = addr & ~BDRV_SECTOR_MASK;
>
> which is safe since the ~~ cancels to give back 511 again. So
> nevermind, just asking. If there are no bugs related to it it seems
> just as safe not to apply it.
That is correct, which is why I don't think it is necessary for the
stable release. However I want to see the fix in upstream as the macro
is likely to get used for other things in the future and it's a hidden
bug waiting to happen.
Cheers,
Jes
prev parent reply other threads:[~2010-05-28 9:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 13:46 [Qemu-devel] [PATCH] block.h: Make BDRV_SECTOR_SIZE 64 bit safe Jes.Sorensen
2010-05-27 14:27 ` Kevin Wolf
2010-05-27 15:38 ` [Qemu-devel] " Paolo Bonzini
2010-05-27 15:44 ` Jes Sorensen
2010-05-28 8:32 ` Paolo Bonzini
2010-05-28 9:38 ` Jes Sorensen [this message]
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=4BFF8F00.5010707@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.