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

2020-11-14 Thread Colin Ian King
On 14/11/2020 21:53, Bjorn Helgaas wrote: > [+cc Dan] > > On Tue, Nov 10, 2020 at 10:10:48PM +, 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

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

2020-11-14 Thread Bjorn Helgaas
[+cc Dan] On Tue, Nov 10, 2020 at 10:10:48PM +, 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

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

2020-11-10 Thread Logan Gunthorpe
On 2020-11-10 3:10 p.m., 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 > before widening

[PATCH][V2] PCI: Fix a potential uninitentional integer overflow issue

2020-11-10 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 making the 1 a ULL. Addresses-Coverity: