From: David Gibson <david@gibson.dropbear.id.au>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
Alex Williamson <alex.williamson@redhat.com>,
qemu-ppc <qemu-ppc@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH qemu] vfio/spapr: Fix page size calculation
Date: Thu, 26 Mar 2020 22:28:29 +1100 [thread overview]
Message-ID: <20200326112829.GA456060@umbus.fritz.box> (raw)
In-Reply-To: <CAFEAcA9M1zjbA9Ztsrd+gcgWb8+5ouVw1Nu75MUk2ZZpBNdNEw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]
On Thu, Mar 26, 2020 at 11:21:47AM +0000, Peter Maydell wrote:
> On Thu, 26 Mar 2020 at 00:39, David Gibson <david@gibson.dropbear.id.au> wrote:
> >
> > On Tue, Mar 24, 2020 at 05:39:12PM +1100, Alexey Kardashevskiy wrote:
> > > Coverity detected an issue (CID 1421903) with potential call of clz64(0)
> > > which returns 64 which make it do "<<" with a negative number.
> > >
> > > This checks the mask and avoids undefined behaviour.
> > >
> > > In practice pgsizes and memory_region_iommu_get_min_page_size() always
> > > have some common page sizes and even if they did not, the resulting page
> > > size would be 0x8000.0000.0000.0000 (gcc 9.2) and
> > > ioctl(VFIO_IOMMU_SPAPR_TCE_CREATE) would fail anyway.
> > >
> > > Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> >
> > Applied to ppc-for-5.1.
>
> As a coverity-issue-fix it would be nice to have this in
> 5.0 unless you think it's particularly risky.
In fact, I realized that shortly after and moved it.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2020-03-26 11:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 6:39 [PATCH qemu] vfio/spapr: Fix page size calculation Alexey Kardashevskiy
2020-03-24 13:27 ` Philippe Mathieu-Daudé
2020-03-24 14:30 ` Greg Kurz
2020-03-24 14:47 ` Philippe Mathieu-Daudé
2020-03-24 14:29 ` Greg Kurz
2020-03-26 0:11 ` David Gibson
2020-03-26 11:21 ` Peter Maydell
2020-03-26 11:28 ` David Gibson [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=20200326112829.GA456060@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 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).