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: <5363303b-30bb-3c4a-bf42-426dd7f8138d@nvidia.com>
Date:   Wed, 17 Aug 2022 21:34:30 +0530
From:   Abhishek Sahu <abhsahu@...dia.com>
To:     Jason Gunthorpe <jgg@...dia.com>
Cc:     Alex Williamson <alex.williamson@...hat.com>,
        Cornelia Huck <cohuck@...hat.com>,
        Yishai Hadas <yishaih@...dia.com>,
        Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>,
        Kevin Tian <kevin.tian@...el.com>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Max Gurtovoy <mgurtovoy@...dia.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        linux-pm@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH v6 5/5] vfio/pci: Implement
 VFIO_DEVICE_FEATURE_LOW_POWER_ENTRY_WITH_WAKEUP

On 8/17/2022 7:23 PM, Jason Gunthorpe wrote:
> On Wed, Aug 17, 2022 at 10:43:23AM +0530, Abhishek Sahu wrote:
> 
>> +static int
>> +vfio_pci_core_pm_entry_with_wakeup(struct vfio_device *device, u32 flags,
>> +				   void __user *arg, size_t argsz)
> 
> This should be
>   struct vfio_device_low_power_entry_with_wakeup __user *arg
> 

 Thanks Jason.

 I can update this.

 But if we look the existing code, for example
 (vfio_ioctl_device_feature_mig_device_state()), then there it still uses
 'void __user *arg' only. Is this a new guideline which we need to take
 care ?
 
>> @@ -1336,6 +1389,9 @@ int vfio_pci_core_ioctl_feature(struct vfio_device *device, u32 flags,
>>  		return vfio_pci_core_feature_token(device, flags, arg, argsz);
>>  	case VFIO_DEVICE_FEATURE_LOW_POWER_ENTRY:
>>  		return vfio_pci_core_pm_entry(device, flags, arg, argsz);
>> +	case VFIO_DEVICE_FEATURE_LOW_POWER_ENTRY_WITH_WAKEUP:
>> +		return vfio_pci_core_pm_entry_with_wakeup(device, flags,
>> +							  arg, argsz);
>>  	case VFIO_DEVICE_FEATURE_LOW_POWER_EXIT:
>>  		return vfio_pci_core_pm_exit(device, flags, arg, argsz);
> 
> Best to keep these ioctls sorted
> 
> Jason

 Do we need to keep the IOCTL name alphabetically sorted in the case list.
 Currently, I have added in the order of IOCTL numbers.

 Regards,
 Abhishek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ