From: Logan Gunthorpe <logang@deltatee.com>
To: "Colin King" <colin.king@canonical.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Stephen Bates" <sbates@raithlin.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Christian König" <christian.koenig@amd.com>,
linux-pci@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][V2] PCI: Fix a potential uninitentional integer overflow issue
Date: Tue, 10 Nov 2020 16:55:41 -0700 [thread overview]
Message-ID: <aaa8ae87-170b-ada0-0465-9727967594cb@deltatee.com> (raw)
In-Reply-To: <20201110221048.3411288-1-colin.king@canonical.com>
On 2020-11-10 3:10 p.m., Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The shift of 1 by align_order is evaluated using 32 bit arithmetic
> and the result is assigned to a resource_size_t type variable that
> is a 64 bit unsigned integer on 64 bit platforms. Fix an overflow
> before widening issue by making the 1 a ULL.
>
> Addresses-Coverity: ("Unintentional integer overflow")
> Fixes: 07d8d7e57c28 ("PCI: Make specifying PCI devices in kernel parameters reusable")
I think this should probably be
Fixes: 32a9a682bef2 ("PCI: allow assignment of memory resources with a
specified alignment")
That is the commit where the original bug was introduced. 644a544fd9bcd
then extends the code a little bit and 07d8d7e57c28 only refactors it
into a reusable function. If we want this in older stable kernels then
we will probably need to make different patches for the other two vintages.
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Besides that, the change makes sense to me.
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Thanks,
Logan
next prev parent reply other threads:[~2020-11-10 23:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 22:10 Colin King
2020-11-10 23:55 ` Logan Gunthorpe [this message]
2020-11-14 21:53 ` Bjorn Helgaas
2020-11-14 22:09 ` Colin Ian King
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=aaa8ae87-170b-ada0-0465-9727967594cb@deltatee.com \
--to=logang@deltatee.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=christian.koenig@amd.com \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sbates@raithlin.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
all inboxes | Powered by JetHome®