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]
Message-ID: <fff62e3d-997a-69fc-fb2c-43ef9e7def30@amd.com>
Date: Mon, 24 Jul 2023 11:20:42 -0700
From: Brett Creeley <bcreeley@....com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: "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>,
 "yishaih@...dia.com" <yishaih@...dia.com>,
 "shameerali.kolothum.thodi@...wei.com"
 <shameerali.kolothum.thodi@...wei.com>,
 "shannon.nelson@....com" <shannon.nelson@....com>
Subject: Re: [PATCH v12 vfio 3/7] vfio/pds: register with the pds_core PF

On 7/24/2023 6:00 AM, Jason Gunthorpe wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> On Sat, Jul 22, 2023 at 12:09:58AM -0700, Brett Creeley wrote:
>> 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.
> 
> That seems like a hack, it would be nicer if printk could format
> errnos natively

This is already being used all over the driver hierarchy.

> 
> Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ