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] [thread-next>] [day] [month] [year] [list]
Date: Wed, 28 Feb 2024 10:16:16 -0800
From: Brett Creeley <bcreeley@....com>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>,
 Brett Creeley <brett.creeley@....com>, "jgg@...pe.ca" <jgg@...pe.ca>,
 "yishaih@...dia.com" <yishaih@...dia.com>,
 "kevin.tian@...el.com" <kevin.tian@...el.com>,
 "alex.williamson@...hat.com" <alex.williamson@...hat.com>,
 "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: "shannon.nelson@....com" <shannon.nelson@....com>
Subject: Re: [PATCH v2 vfio 0/2] vfio/pds: Fix and simplify resets

On 2/28/2024 1:05 AM, Shameerali Kolothum Thodi wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
>> -----Original Message-----
>> From: Brett Creeley <brett.creeley@....com>
>> Sent: Wednesday, February 28, 2024 12:32 AM
>> To: jgg@...pe.ca; yishaih@...dia.com; Shameerali Kolothum Thodi
>> <shameerali.kolothum.thodi@...wei.com>; kevin.tian@...el.com;
>> alex.williamson@...hat.com; kvm@...r.kernel.org; linux-
>> kernel@...r.kernel.org
>> Cc: shannon.nelson@....com; brett.creeley@....com
>> Subject: [PATCH v2 vfio 0/2] vfio/pds: Fix and simplify resets
>>
>> This small series contains a fix and readability improvements for
>> resets.
>>
>> v2:
>> - Split single patch into 2 patches
>> - Improve commit messages
> 
> Just a query on the reset_done handler and the deferred_reset()
> logic in this driver. From a quick look, it doesn't look like you have
> a condition where a copy_to/from_user() is under state_mutex. So
> do you think we can get rid of the deferred_reset logic from this
> driver? Please see the discussion here,
> https://lore.kernel.org/kvm/20240220132459.GM13330@nvidia.com/
> 
> For HiSilicon, we do have the lock taken for PRE_COPY, but that needs fixing
> and then can get rid of the deferred_reset. I will sent out a patch for
> that soon.
> 
> Thanks,
> Shameer

Hi Shameer,

You are probably right that we can get rid of this logic, but the 
current 2 patch series is very simple and I would prefer to keep it that 
way. If you plan to make changes to the HiSilicon driver in the near 
future, then I can use that as a reference in enhancing the pds-vfio-pci 
driver.

Thanks,

Brett
> 
>>
>> v1:
>> https://lore.kernel.org/kvm/20240126183225.19193-1-
>> brett.creeley@....com/
>>
>> Brett Creeley (2):
>>    vfio/pds: Always clear the save/restore FDs on reset
>>    vfio/pds: Refactor/simplify reset logic
>>
>>   drivers/vfio/pci/pds/pci_drv.c  |  2 +-
>>   drivers/vfio/pci/pds/vfio_dev.c | 14 +++++++-------
>>   drivers/vfio/pci/pds/vfio_dev.h |  7 ++++++-
>>   3 files changed, 14 insertions(+), 9 deletions(-)
>>
>> --
>> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ