[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH] Refactor Wmi.c
- To: "paul@xxxxxxx" <paul@xxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Owen Smith <owen.smith@xxxxxxxxxx>
- Date: Thu, 31 Mar 2022 07:12:51 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uzo/lpaXLg2EYLIz6/BgpuFq2oIShhAi0Ws6KsI/J/8=; b=dD9M5owSP+jNq/J01spz2ngtVWpDJVxoUkfYYQlWnkENJdYJxNOaiIFmOiwsXFyOQfRj/b8TTdupbvINmJgYs3v+mZh6DaOm37a6DL8ej8/vT5klI5q5qBpQKbwsOYMbiynBrwKPvRXT7Z8BNTNkHrHXTKSj7BjO5Dkxj5CvL2SX1yab/cGUQos22Bv6Q7zA272fo1OJVSElAdX9cVbZk517zIuNIWQG0pg9nQWtSCIU6vMZ0/U39PnzoRXYvBDasCgQIHhMR4SJ/yqArunC3JCQnGbLs6pOG89T8qnQAMmPyDqCFJ9N84x0AnvepovpPgrESbe+sptoMxTMX9UXmw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cgCQ2ZBclaa79oTKfVjgKDxeqWAerdo9JiwmLDlkhe0Yfjl39ABQgHw6EWsQ2Gz+cHPf+dO2FVKzdbk8whzBqaW10ov5VpBMGfBh1OpeSIak7goUh+YsQk3DwJ+DkFl8isadf6+Q3h1Kzyb9pN0iR3uuICpaPQHWwYtGZrVfVWDnNcP4MLk75J+0JnmsBblXgcUJ9jXSmHhFZFooGVLdUAqjVQ86sAAFqfPPTdnx851oE88PlpCQKHM8E7pUsuf/HnGJHcJrrUnqbuIL/eDPBv7k2RiEXPamO3ADi5s16JgAv6w7sVkLeqxq2vkw2HkMhrNFWnH0ShxYpt+dAxoDwg==
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Delivery-date: Thu, 31 Mar 2022 07:13:06 +0000
- Ironport-data: A9a23:rmEsLaxj1hzi5o/d8oZ6t+c3xirEfRIJ4+MujC+fZmUNrF6WrkVVz 2AWWm+PM/yOMzD1edpya4nj8EgPv8OEzYA2SQZqrSAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnj/0bv656yMUOZigHtIQMsadUsxKbVIiGX9JZS5LwbZj2NYz2oHhWmthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ Nplp5K0aRkuJ/fwp8MtYxYFFTxYA5FI9+qSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DO5wSvDd7yDDFDd4tQIzZQrWM7thdtNs1rp4RQ6yCP ZpAAdZpRE2HTxhuIEYJMdEjlaCmvX7kfzoF8WvA8MLb5ECMlVcsgdABKuH9Zd2MAN1L20qVu G/C12D4GQ0BcsySzyKf9XChjfOJmjn0MKoKHaC83u5nhhuU3GN7NfENfQLl+7/j0Bf4Ao8Bb RxPksYzkUQs3F6lSvnjWATinEGjji4TBtxNNdMG5g7Yn8I4/D2lLmQDSzdAbvkvu8k3WSEm2 ze1oj/5OdB8mObLECzAr994uRv3YHFIdjFaOUf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zQTOaNSSj5uw6zvmWehTNYd3E8LAs26RE
- List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
- Thread-index: AQHYRBktznavb3WZD0a/Bmx10iJtaKzXq+kAgAAHLmCAAAG0AIABXmrg
- Thread-topic: [PATCH] Refactor Wmi.c
-----Original Message-----
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
Durrant, Paul
Sent: Wednesday, March 30, 2022 11:11 AM
To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH] Refactor Wmi.c
[CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments
unless you have verified the sender and know the content is safe.
On 30/03/2022 11:07, Owen Smith wrote:
> -----Original Message-----
> From: Durrant, Paul <pdurrant@xxxxxxxxxxxx>
> Sent: 30 March 2022 10:40
> To: Owen Smith <owen.smith@xxxxxxxxxx>;
> win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: RE: [PATCH] Refactor Wmi.c
>
> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments
> unless you have verified the sender and know the content is safe.
>
>> -----Original Message-----
>> From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On
>> Behalf Of Owen Smith
>> Sent: 30 March 2022 10:32
>> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
>> Cc: Owen Smith <owen.smith@xxxxxxxxxx>
>> Subject: [EXTERNAL] [PATCH] Refactor Wmi.c
>>
>> CAUTION: This email originated from outside of the organization. Do
>> not click links or open attachments unless you can confirm the sender and
>> know the content is safe.
>>
>>
>>
>> * Moves functions to be in related locations in file
>> * Formats code to appropriate code style
>> * Inlines some functions that are only called from 1 location
>> * Uses LIST_ENTRY macros to access linked lists
>>
>> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
>> ---
>> src/xeniface/wmi.c | 3794
>> ++++++++++++++++++++++----------------------
>> 1 file changed, 1907 insertions(+), 1887 deletions(-)
>
> Eek. 3794 lines of change! That's almost impossible to review. Is there any
> chance you can break this down?
>
> Paul
>
>
> Its not easy to break down a refactor like this, 1 small change has many
> knock on changes throughout the file.
> Its probably easier to apply locally and compare side by side, but I'm
> not expecting this to be an easy or quick review - I probably should
> have posted 1st with RFC
>
Can you assert that there is no functional change? I will consider taking it on
trust if so.
Paul
I've not made any functional changes, except for changes to how the LIST_ENTRY
members are accessed - using the
standard LIST_ENTRY macros/functions rather than casting (this should not
affect functionality, as the LIST_ENTRY
items are the 1st entry in their respective structures).
I have run these changes, as part of the Citrix driver package (we don’t patch
this file, but do rename/re-GUID the WMI
objects), through automated testing which validates the WMI interfaces.
This patch was originally to clean up the code with the intent to track down a
0x139 (KERNEL_SECURITY_CHECK_FAILURE)
bugcheck, that indicated there was occasional LIST_ENTRY corruption. After
these changes, I have not yet reproduced
the bugcheck
Owen
|