Re: [PATCH 1/5] iov: Update virtfn_max_buses to validate offset and stride

2015-10-29 Thread Bjorn Helgaas
On Wed, Oct 28, 2015 at 02:46:50PM -0700, Alexander Duyck wrote: > On 10/28/2015 11:43 AM, Bjorn Helgaas wrote: > >On Wed, Oct 28, 2015 at 11:32:16AM -0500, Bjorn Helgaas wrote: > >Here's my new proposal: > > > > static int compute_max_vf_buses(struct pci_dev *dev) > > { > > struct p

Re: [PATCH 1/5] iov: Update virtfn_max_buses to validate offset and stride

2015-10-28 Thread Alexander Duyck
On 10/28/2015 11:43 AM, Bjorn Helgaas wrote: On Wed, Oct 28, 2015 at 11:32:16AM -0500, Bjorn Helgaas wrote: Hi Alex, Thanks a lot for cleaning this up. I think this is a great improvement over what I did. On Tue, Oct 27, 2015 at 01:52:15PM -0700, Alexander Duyck wrote: This patch pulls the v

Re: [PATCH 1/5] iov: Update virtfn_max_buses to validate offset and stride

2015-10-28 Thread Bjorn Helgaas
On Wed, Oct 28, 2015 at 11:32:16AM -0500, Bjorn Helgaas wrote: > Hi Alex, > > Thanks a lot for cleaning this up. I think this is a great > improvement over what I did. > > On Tue, Oct 27, 2015 at 01:52:15PM -0700, Alexander Duyck wrote: > > This patch pulls the validation of offset and stride in

Re: [PATCH 1/5] iov: Update virtfn_max_buses to validate offset and stride

2015-10-28 Thread Alexander Duyck
On 10/28/2015 09:32 AM, Bjorn Helgaas wrote: Hi Alex, Thanks a lot for cleaning this up. I think this is a great improvement over what I did. On Tue, Oct 27, 2015 at 01:52:15PM -0700, Alexander Duyck wrote: This patch pulls the validation of offset and stride into virtfn_max_buses. The genera

Re: [PATCH 1/5] iov: Update virtfn_max_buses to validate offset and stride

2015-10-28 Thread Bjorn Helgaas
Hi Alex, Thanks a lot for cleaning this up. I think this is a great improvement over what I did. On Tue, Oct 27, 2015 at 01:52:15PM -0700, Alexander Duyck wrote: > This patch pulls the validation of offset and stride into virtfn_max_buses. > The general idea is to validate offset and stride for

[PATCH 1/5] iov: Update virtfn_max_buses to validate offset and stride

2015-10-27 Thread Alexander Duyck
This patch pulls the validation of offset and stride into virtfn_max_buses. The general idea is to validate offset and stride for each possible value of numvfs in addition to still determining the maximum bus value for the VFs. I also reversed the loop as the most likely maximum will be when numvf