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: Sat, 22 Jul 2023 00:09:58 -0700
From: Brett Creeley <bcreeley@....com>
To: "Tian, Kevin" <kevin.tian@...el.com>,
 Brett Creeley <brett.creeley@....com>,
 "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
 "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
 "alex.williamson@...hat.com" <alex.williamson@...hat.com>,
 "jgg@...dia.com" <jgg@...dia.com>, "yishaih@...dia.com"
 <yishaih@...dia.com>,
 "shameerali.kolothum.thodi@...wei.com" <shameerali.kolothum.thodi@...wei.com>
Cc: "shannon.nelson@....com" <shannon.nelson@....com>
Subject: Re: [PATCH v12 vfio 3/7] vfio/pds: register with the pds_core PF

On 7/21/2023 2:01 AM, Tian, Kevin wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
>> From: Brett Creeley <brett.creeley@....com>
>> Sent: Thursday, July 20, 2023 6:35 AM
>>
>> +void pds_vfio_unregister_client_cmd(struct pds_vfio_pci_device *pds_vfio)
>> +{
>> +     struct pci_dev *pdev = pds_vfio_to_pci_dev(pds_vfio);
>> +     int err;
>> +
>> +     err = pds_client_unregister(pci_physfn(pdev), pds_vfio->client_id);
>> +     if (err)
>> +             dev_err(&pdev->dev, "unregister from DSC failed: %pe\n",
>> +                     ERR_PTR(err));
> 
> Why using ERR_PTR() here? it looks a common pattern used cross
> this series.

Yes, this is intentional. This is more readable than just printing out 
the error value.

> 
>> @@ -34,12 +34,13 @@ enum pds_core_vif_types {
>>
>>   #define PDS_DEV_TYPE_CORE_STR        "Core"
>>   #define PDS_DEV_TYPE_VDPA_STR        "vDPA"
>> -#define PDS_DEV_TYPE_VFIO_STR        "VFio"
>> +#define PDS_DEV_TYPE_VFIO_STR        "vfio"
>>   #define PDS_DEV_TYPE_ETH_STR "Eth"
>>   #define PDS_DEV_TYPE_RDMA_STR        "RDMA"
>>   #define PDS_DEV_TYPE_LM_STR  "LM"
>>
>>   #define PDS_VDPA_DEV_NAME     "."
>> PDS_DEV_TYPE_VDPA_STR
>> +#define PDS_LM_DEV_NAME              PDS_CORE_DRV_NAME "."
>> PDS_DEV_TYPE_LM_STR "." PDS_DEV_TYPE_VFIO_STR
>>
> 
> then should the name be changed to PDS_VFIO_LM_DEV_NAME?
> 
> Or is mentioning *LM* important? what would be the problem to just
> use "pds_core.vfio"?

LM is important for the device. I don't plan to change this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ