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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 22 Dec 2019 02:47:18 +0000
From:   Long Li <longli@...rosoft.com>
To:     Bjorn Helgaas <helgaas@...nel.org>,
        "longli@...uxonhyperv.com" <longli@...uxonhyperv.com>
CC:     KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Sasha Levin <sashal@...nel.org>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Andrew Murray <andrew.murray@....com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [Patch v2 1/2] PCI: hv: decouple the func definition in
 hv_dr_state from VSP message

>Subject: Re: [Patch v2 1/2] PCI: hv: decouple the func definition in
>hv_dr_state from VSP message
>
>Run "git log --oneline drivers/pci/controller/pci-hyperv.c" and make yours
>match.  Capitalize the first word, etc.
>
>On Tue, Dec 03, 2019 at 06:53:36PM -0800, longli@...uxonhyperv.com wrote:
>> From: Long Li <longli@...rosoft.com>
>>
>> hv_dr_state is used to find present PCI devices on the bus. The
>> structure reuses struct pci_function_description from VSP message to
>describe a device.
>>
>> To prepare support for pci_function_description v2, we need to
>> decouple this dependence in hv_dr_state so it can work with both v1 and v2
>VSP messages.
>>
>> There is no functionality change.
>>
>> Signed-off-by: Long Li <longli@...rosoft.com>
>
>> + * hv_pci_devices_present() - Handles list of new children
>> + * @hbus:	Root PCI bus, as understood by this driver
>> + * @relations:	Packet from host listing children
>> + *
>> + * This function is invoked whenever a new list of devices for
>> + * this bus appears.
>
>The comment should tell us what the function *does*, not when it is called.

I will send v3 to address the comments.

Thanks

Long

>
>> + */
>> +static void hv_pci_devices_present(struct hv_pcibus_device *hbus,
>> +				   struct pci_bus_relations *relations) {
>> +	struct hv_dr_state *dr;
>> +	int i;
>> +
>> +	dr = kzalloc(offsetof(struct hv_dr_state, func) +
>> +		     (sizeof(struct hv_pcidev_description) *
>> +		      (relations->device_count)), GFP_NOWAIT);
>> +
>> +	if (!dr)
>> +		return;
>> +
>> +	dr->device_count = relations->device_count;
>> +	for (i = 0; i < dr->device_count; i++) {
>> +		dr->func[i].v_id = relations->func[i].v_id;
>> +		dr->func[i].d_id = relations->func[i].d_id;
>> +		dr->func[i].rev = relations->func[i].rev;
>> +		dr->func[i].prog_intf = relations->func[i].prog_intf;
>> +		dr->func[i].subclass = relations->func[i].subclass;
>> +		dr->func[i].base_class = relations->func[i].base_class;
>> +		dr->func[i].subsystem_id = relations->func[i].subsystem_id;
>> +		dr->func[i].win_slot = relations->func[i].win_slot;
>> +		dr->func[i].ser = relations->func[i].ser;
>> +	}
>> +
>> +	if (hv_pci_start_relations_work(hbus, dr))
>> +		kfree(dr);
>>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ