[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Varargs in AdapterVifCallbacks.


  • To: "paul@xxxxxxx" <paul@xxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Martin Harvey <martin.harvey@xxxxxxxxxx>
  • Date: Thu, 12 May 2022 15:42:26 +0000
  • Accept-language: 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=M4aCqPsn2tjt4Sqk6gf9AxPgbRqX6aBiuSLnvobnxho=; b=Hic6M5F2iV6TFvkgegpBMsjSoOHA/Ctgm7J/NNYKRBR1OOGauNBDjwsd1JrD5+QVwIFhjUGdvEOR5mxmERJgVnBdA8IwZvSuOqLDLLW8P+D6dwV9FGTVyYCMwImtnkJRGOHTmvDs8QFXXK3QHByZjdg7EMv7sT2qDU9lz5TfLmAvYKl/UoMEovbOnp/Vu+RlDgD2xWYYyUaFNtty2CnWevQCG/kFTaS77etaAIR80QPtZhs8ExFyc2IBmgwm76XU5ObVVc6oaNywB0sODEsHwC6r1L5ELHVRkKyrZdRStF0T9Ll2eocIjAk+yQwN5HH+Si63+rckKU18e75wzxhj9A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=klmL9wntvOYm+jdC7+mD+vsIUlxU8QGV2Qc13r1b1hE9WL8Sj00t59A0wqH32tOQPb2QkG5EG+Bh3vQIO+CdtfMhTXLSyUHSLXYa/sbM4myBzoQnqIbd79X+m6rUyvSiczwLHQtJoDI7pyjNiViPp9emzLNB27bkKBNah4djlBB38uFm/mHQ5RiGyWdQIK/cENuEuLNzln1HIcSRJtAAwQ3alcFuUlX+JiJZ93s+D3IrQmm+ExAYSu+ZpyxB4OA/n99lQ6f0VfX7ZDKpsMj3ycugDOXxcDAZ33uLQnVBoO7R31qQGR4R6PUotMBt2bQ8X+yvkR8apo0LDCB9ZEoJdA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Thu, 12 May 2022 15:42:36 +0000
  • Ironport-data: A9a23:G4vhjqoIhraLk4P4XYs/5Y3gPlNeBmJ6ZBIvgKrLsJaIsI4StFCzt garIBmPOf2KZmGmLYxwPInj/EhX75HRzN41QFE/qykwQXtA85uZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlVEliefQAOCU5NfsYkidfyc9IMsaoU8lyrdRbrJA24DjWVvQ4 Imq+aUzBXf+s9JKGjNMg068gEsHUMTa4Fv0aXRnOJinFHeH/5UkJMp3yZOZdhMUcaENdgKOf M7RzanRw4/s10xF5uVJMFrMWhZirrb6ZWBig5fNMkSoqkAqSicais7XOBeAAKv+Zvrgc91Zk b1wWZKMpQgBIO7MtacnUCZhNQZcZocB/Y2bOkGwrpnGp6HGWyOEL/RGKmgTZNRd0MAnRGZE+ LofNSwHaQ2Fi6Su2rWnR+Jwh8Mlas72IIcYvXImxjbcZRokacmbH+OWupkFjHFp2Z0m8fX2P qL1bRJqZQ7cYhsJOl4NFp8vtOypmmP+Y3tTr1f9Sa8fvDGKk1YtiOOF3Nz9IOOlZoJerlShv kWcwnXcEwkjboSg1m/Qmp6rrqqV9c/hY6oKHaC83u5nhhuU3GN7IAIXUx6jv7y1h1CzX/pbK lcI4Ww+oK4q7kupQ9LhGRqirxa5UgU0XtNRF6gw7lGLw6+NugKBXDFbE3hGdcAss9IwSXoyz FiVktj1BDtp9rqIVXaa8bTSpjS3UcQIEVI/ieY/ZVNty7HeTEsb1Hojkv4L/HaJs+DI
  • Ironport-hdrordr: A9a23:zvTCrKloEEgBe0ECDXJ/wnBSyGjpDfOZimdD5ihNYBxZY6Wkfp +V8cjzhCWftN9OYhodcIi7SdK9qXO1z+8X3WBjB8bZYOCGghrkEGgG1+ffKlLbakrDH4JmtJ uINpIOcOEYbmIKwfoSgjPIderIqePvmM/HuQ6d9QYVcegAUdAD0+4NMHf+LqQAfngiOXNWLv qhz/sCgwDlVWUcb8y9CHVAdfPEvcf3mJXvZgNDLwI76SGV5AnYpoLSIly95FMzQjlPybAt/S zuiAri/JiutPm911v1y3LT1ZJLg9Hso+EzRfBky/JlagkEuDzYJriJaIfy+QzdZ9vfrGrCpe O84CvI+f4DrE85MFvF5ycFkDOQrQrGo0WStWNwx0GT7vARDQhKdPZplMZXdADU5FEnu8w52K VX33iBv54SFh/Ymj/hjuK4Hy2COXDE0kbKvNRj+UC3a7FuIYO5bLZvjn99AdMFBmb3+YonGO 5hAIXV4+tXa0qTazTcsnN0yNKhU3wvFlPeK3Jy8PC9wnxThjR03kEYzMsQkjMJ8488UYBN46 DBPr5znL9DQ8cKZeZ2BfsHQ8GwFmvRKCi8e166MBDiDuUKKnjNo5n47PE84/yrYoUByN8olJ HIQDpjxBkPkoLVeLmzNbFwg2HwqT+GLErQI+llluhEk6y5WbbtNiWFVTkV4r6dn8k=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AdhmC7aA17C99R2kT1uNNjmZQqMw8QAAj1kAAAHXr2A=
  • Thread-topic: Varargs in AdapterVifCallbacks.


-----Original Message-----
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of 
Durrant, Paul
Sent: 12 May 2022 15:39
To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Subject: Re: Varargs in AdapterVifCallbacks.

> Not necessarily. Can you elaborate on "not as wonderful as it should be"?

There is some nastiness when you end up with a large number of parameters or 
pointers to certain types - unfortunately it's a heisenbug, and keeps moving 
around as I add / remove debugging statements / params to the call. However, 
it's fairly clear the stack eats itself for lunch. All I did was add a single 
PBOOLEAN to the parameter list of one of the callback parameters, upped the 
version number of the interface, and it all went very badly wrong. Then I then 
"fixed" the problem by adding a couple more ULONG's padding to the varargs and 
it all works again.

However, I do notice that none of the windows kernel interfaces use varargs, 
I'm not even sure they are "officially" supported for kernel development, and I 
would far prefer to declare and maintain a struct/union for parameters. That 
way, all the details are in fact kept in the interface, and there is good 
debugging symbolic information for all of them.

> Any complaints if I remove varargs from upcoming v9  of XENVIF_VIF 
> interface? Speak now or forever …


> I could be persuaded that an argument struct is a suitable replacement but 
> I'd like to understand what the exact nature of the problem is.

OK. I hope my partial explanation above is at least a bit of an explanation. 
That and the fact that varargs are extremely difficult to debug when they go 
wrong.

One final thing: We may have things afoot here that I can't talk about on the 
list. Might this be a good time for me, you and owen to meet in a pub some time?

MH.

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.