Re: [PATCH] PCI: fix a potential uninitentional integer overflow issue

2020-11-10 Thread Colin Ian King
On 10/11/2020 20:54, Bjorn Helgaas wrote: > On Fri, Nov 06, 2020 at 11:04:19AM +0300, Dan Carpenter wrote: >> On Thu, Nov 05, 2020 at 04:24:30PM -0600, Bjorn Helgaas wrote: >>> On Wed, Oct 07, 2020 at 03:33:45PM +0300, Dan Carpenter wrote: On Wed, Oct 07, 2020 at 12:46:15PM +0100, Colin King

Re: [PATCH] PCI: fix a potential uninitentional integer overflow issue

2020-11-10 Thread Bjorn Helgaas
On Fri, Nov 06, 2020 at 11:04:19AM +0300, Dan Carpenter wrote: > On Thu, Nov 05, 2020 at 04:24:30PM -0600, Bjorn Helgaas wrote: > > On Wed, Oct 07, 2020 at 03:33:45PM +0300, Dan Carpenter wrote: > > > On Wed, Oct 07, 2020 at 12:46:15PM +0100, Colin King wrote: > > > > From: Colin Ian King > > > >

Re: [PATCH] PCI: fix a potential uninitentional integer overflow issue

2020-11-06 Thread Dan Carpenter
On Thu, Nov 05, 2020 at 04:24:30PM -0600, Bjorn Helgaas wrote: > On Wed, Oct 07, 2020 at 03:33:45PM +0300, Dan Carpenter wrote: > > On Wed, Oct 07, 2020 at 12:46:15PM +0100, Colin King wrote: > > > From: Colin Ian King > > > > > > The shift of 1 by align_order is evaluated using 32 bit

Re: [PATCH] PCI: fix a potential uninitentional integer overflow issue

2020-11-05 Thread Bjorn Helgaas
On Wed, Oct 07, 2020 at 03:33:45PM +0300, Dan Carpenter wrote: > On Wed, Oct 07, 2020 at 12:46:15PM +0100, Colin King wrote: > > From: Colin Ian King > > > > 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

Re: [PATCH] PCI: fix a potential uninitentional integer overflow issue

2020-10-07 Thread Dan Carpenter
On Wed, Oct 07, 2020 at 12:46:15PM +0100, Colin King wrote: > From: Colin Ian King > > 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 >

[PATCH] PCI: fix a potential uninitentional integer overflow issue

2020-10-07 Thread Colin King
From: Colin Ian King 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 using the BIT_ULL macro to perform the shift.