From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] pci: fix overflow in __pci_hose_bus_to_phys w/ large RAM
Date: Thu, 14 Aug 2014 11:44:31 +0200 [thread overview]
Message-ID: <20140814114431.09e155fb@crub> (raw)
In-Reply-To: <1407794968-32106-1-git-send-email-swarren@wwwdotorg.org>
On Mon, 11 Aug 2014 16:09:28 -0600
Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> If a 32-bit system has 2GB of RAM, and the base address of that RAM is
> 2GB, then start+size will overflow a 32-bit value (to a value of 0).
>
> To avoid such an overflow, convert __pci_hose_bus_to_phys() to calculate
> the offset of a bus address into a PCI region, rather than comparing a
> bus address against the end of a PCI region.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> drivers/pci/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
applied to u-boot-staging/agust at denx.de. thanks!
Anatolij
prev parent reply other threads:[~2014-08-14 9:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 22:09 [U-Boot] [PATCH] pci: fix overflow in __pci_hose_bus_to_phys w/ large RAM Stephen Warren
2014-08-14 9:44 ` Anatolij Gustschin [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=20140814114431.09e155fb@crub \
--to=agust@denx.de \
--cc=u-boot@lists.denx.de \
/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