From: Joerg Roedel <joro@8bytes.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Hellwig <hch@lst.de>,
Srinath Mannam <srinath.mannam@broadcom.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Oza Pawandeep <poza@codeaurora.org>,
Robin Murphy <robin.murphy@arm.com>,
Eric Auger <eric.auger@redhat.com>,
Julien Grall <julien.grall@arm.com>,
Marc Zyngier <marc.zyngier@arm.com>,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: fix integer truncation
Date: Tue, 18 Jun 2019 17:25:17 +0200 [thread overview]
Message-ID: <20190618152517.GB21128@8bytes.org> (raw)
In-Reply-To: <20190617133101.2817807-1-arnd@arndb.de>
On Mon, Jun 17, 2019 at 03:30:54PM +0200, Arnd Bergmann wrote:
> On 32-bit architectures, phys_addr_t may be different from dma_add_t,
> both smaller and bigger. This can lead to an overflow during an assignment
> that clang warns about:
>
> drivers/iommu/dma-iommu.c:230:10: error: implicit conversion from 'dma_addr_t' (aka 'unsigned long long') to
> 'phys_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Werror,-Wconstant-conversion]
>
> Use phys_addr_t here because that is the type that the variable was
> declared as.
>
> Fixes: aadad097cd46 ("iommu/dma: Reserve IOVA for PCIe inaccessible DMA address")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied, thanks.
prev parent reply other threads:[~2019-06-18 15:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 13:30 [PATCH] iommu: fix integer truncation Arnd Bergmann
2019-06-18 15:25 ` Joerg Roedel [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=20190618152517.GB21128@8bytes.org \
--to=joro@8bytes.org \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=eric.auger@redhat.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=julien.grall@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=marc.zyngier@arm.com \
--cc=poza@codeaurora.org \
--cc=robin.murphy@arm.com \
--cc=srinath.mannam@broadcom.com \
/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