-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
viosock: Remove Coinstaller Stuff from the INF File #1064
viosock: Remove Coinstaller Stuff from the INF File #1064
Conversation
175e5cf
to
f6c448c
Compare
Is the protocol not registered? |
It is not. I think the INFs were not responsible for registering it even before this PR (I did not notice such registrations). I can of course test this (old INFs) on a fresh machine. |
[VirtioSocket_Device_CoInstaller_AddReg] |
Ah, OK, I missed that. I will improve the PR. |
@@ -26,7 +26,7 @@ DriverPackageDisplayName = %VirtioSocket.DeviceDesc% | |||
PnpLockdown = 1 | |||
|
|||
[DestinationDirs] | |||
DefaultDestDir = 12 | |||
DefaultDestDir = 13 | |||
VirtioSocket_Lib_CopyFiles = 11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/run-from-driver-store#other-files, you should also move VirtioSocket_Lib_CopyFiles to 13. Please check if is this possible or not. This does not work for RNG providers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look into it, thanks. Yes, I know about RNG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MartinDrab Please look into changes in #1075
HLK for 2022 and attestation signing fails with DIRID13 and without TargetOS decoration
cf7e51a
to
78422de
Compare
96d9493
to
33760a4
Compare
viosock/sys/viosock.inx
Outdated
@@ -56,6 +55,15 @@ WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll = 1 ; make sure the number matches wi | |||
[VirtioSocket_Device.NT] | |||
CopyFiles=Drivers_Dir,VirtioSocket_Lib_CopyFiles | |||
|
|||
[VirtioSocket_Device.10.0.15063.Software] | |||
AddSoftware=WSKWSP,,VirtioSocket_Software |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
How do you expect to sign this driver for Windows Server 2016? After applying a Cumulative Update for Windows Server 2016 for x64-based Systems (KB4598243), the latest OS Build is 14393.4169.
-
According to https://learn.microsoft.com/en-us/windows-hardware/drivers/install/inf-addsoftware-directive:
Each AddSoftware directive describes the installation of standalone software. This directive should be used in an INF file of the **SoftwareComponent** setup class.
How will this work in this INF withClass=System
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- It seems that the
SoftwareComponent
class is not a requirement. For example, INF for NVDA Display Driver on my machine uses theAddSoftware
directive but is of classDisplay
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- well, I suppose there need to be special INF sections for handling OS versions that do not support the
AddSoftware
directive. I am currently experimenting with this.
Unfortunately, it is not possible to register the Winsock Provider by just adding certain keys and values into the Registry (like inviorng
case); theAddReg
directive is not strong enough for that.
viosock/sys/viosock.inx
Outdated
SoftwareType=1 | ||
SoftwareBinary=viosocklib-test.exe | ||
SoftwareArguments="/i" | ||
SoftwareVersion=1.0.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this version be equal to the driver version or the binary version?
The build failed
|
@MartinDrab https://learn.microsoft.com/en-us/windows-hardware/drivers/install/using-an-extension-inf-file did you try to check "Extension INFs"? |
I came across them several days ago when working on another (unrelated) issue. I did not have time to look at them in more detail and possibly use them, however, I hope to get to it shortly. |
@MartinDrab |
OK. I hope to work on this PR shortly and finish it. I apologize for this inconvenience. |
Not a problem. Disabling the build is not a complicated task. This is more problem for companies that release viosock. |
ff3e42d
to
e59ebee
Compare
a3ede78
to
ba85f14
Compare
Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
…irectory Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
ba85f14
to
6e226b5
Compare
Hello, I hope I overcame issues regarding the co-installer and the socket WSP installation from the INF file. In the end, I decided to separate the WSP installation into a special service since it is possible to install and start it from the INF file. Other possibilities seem to be problematic:
I hope this should finally pass the tests and build successfully also with new (E)WDKs. |
6e226b5
to
8ea8467
Compare
Thanks for your work. Please also revert f764600 and update buildAll.bat (ad1aed4 disabled Win11 for viosock)
|
This service is responsible for keeping the WSP for the Viosock driver installed as long as it is running (i.e. it installs the WSP during its initialization and removes it on its stop action). This approach seems to be the best/simplest regarding WSP installation from the INF file on Windows 10 since: - co-installer is no longer supported by newer WDKs, - the AddSoftware INF directive is not supported by some old (but before EoL) versions of Windows 10, - the co-installer is prohibited regardless of the Windows version (i.e. the WDK complains even if corresponding INF section is used only on old versions of Windows). Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
This reverts commit f764600.
8ea8467
to
385e669
Compare
Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
The driver is installed in the Driver Store (DIRID 13) instead of the System Drivers directory (DIRID 12).