lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0ecf52b8-af4e-172b-bac7-1461d021357c@amd.com>
Date:   Wed, 29 Mar 2023 12:24:06 -0700
From:   Brett Creeley <bcreeley@....com>
To:     Simon Horman <simon.horman@...igine.com>,
        Brett Creeley <brett.creeley@....com>
Cc:     kvm@...r.kernel.org, netdev@...r.kernel.org,
        alex.williamson@...hat.com, jgg@...dia.com, yishaih@...dia.com,
        shameerali.kolothum.thodi@...wei.com, kevin.tian@...el.com,
        shannon.nelson@....com, drivers@...sando.io
Subject: Re: [PATCH v6 vfio 1/7] vfio: Commonize combine_ranges for use in
 other VFIO drivers

On 3/29/2023 5:12 AM, Simon Horman wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> On Mon, Mar 27, 2023 at 01:05:47PM -0700, Brett Creeley wrote:
>> Currently only Mellanox uses the combine_ranges function. The
>> new pds_vfio driver also needs this function. So, move it to
>> a common location for other vendor drivers to use.
>>
>> Cc: Yishai Hadas <yishaih@...dia.com>
>> Signed-off-by: Brett Creeley <brett.creeley@....com>
>> Signed-off-by: Shannon Nelson <shannon.nelson@....com>
> 
> Reviewed-by: Simon Horman <simon.horman@...igine.com>

Hey Simon,

We really appreciate the reviews and I do have another small change that 
I need to incorporate into one of the patches, so I will include all of 
your feedback in v7.

I won't reply to each individual comment, but I looked through all of 
them and they all make sense to me.

Thanks again for the review,

Brett

> 
>> diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c
>> index 43bd6b76e2b6..49f37c1b4932 100644
>> --- a/drivers/vfio/vfio_main.c
>> +++ b/drivers/vfio/vfio_main.c
>> @@ -864,6 +864,54 @@ static int vfio_ioctl_device_feature_migration(struct vfio_device *device,
>>        return 0;
>>   }
>>
>> +void vfio_combine_iova_ranges(struct rb_root_cached *root, u32 cur_nodes,
>> +                           u32 req_nodes)
>> +{
>> +     struct interval_tree_node *prev, *curr, *comb_start, *comb_end;
>> +     unsigned long min_gap;
>> +     unsigned long curr_gap;
> 
> I appreciate that this is just moving code from one place to another.
> But if you end up respining this series for another reason
> you may want to consider rearranging the above two lines so they are in
> reverse xmas tree order - longest to shortest.
> 
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ