Skip to content
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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

MartinDrab
Copy link
Contributor

@MartinDrab MartinDrab commented Mar 22, 2024

The driver is installed in the Driver Store (DIRID 13) instead of the System Drivers directory (DIRID 12).

@MartinDrab MartinDrab force-pushed the feature/viosock/remove-coinstaller branch from 175e5cf to f6c448c Compare March 22, 2024 21:07
@MartinDrab MartinDrab marked this pull request as ready for review March 24, 2024 15:33
@xuehuihui
Copy link
Contributor

Is the protocol not registered?

@MartinDrab
Copy link
Contributor Author

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.

@xuehuihui
Copy link
Contributor

[VirtioSocket_Device_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000,"viosocklib.dll,ViosockCoInstaller"
==>
The old INFs will register the protocol through the ViosockCoInstaller interface.

@MartinDrab
Copy link
Contributor Author

[VirtioSocket_Device_CoInstaller_AddReg] HKR,,CoInstallers32,0x00010000,"viosocklib.dll,ViosockCoInstaller" ==> The old INFs will register the protocol through the ViosockCoInstaller interface.

Ah, OK, I missed that. I will improve the PR.

@MartinDrab MartinDrab marked this pull request as draft March 25, 2024 14:17
@@ -26,7 +26,7 @@ DriverPackageDisplayName = %VirtioSocket.DeviceDesc%
PnpLockdown = 1

[DestinationDirs]
DefaultDestDir = 12
DefaultDestDir = 13
VirtioSocket_Lib_CopyFiles = 11
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

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

@MartinDrab MartinDrab changed the title Viosock: Remove Coinstaller Stuff from the INF File [CI-NO-BUILD] Viosock: Remove Coinstaller Stuff from the INF File Apr 30, 2024
Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
@MartinDrab MartinDrab force-pushed the feature/viosock/remove-coinstaller branch from 9191b70 to cf7e51a Compare April 30, 2024 15:24
Martin Drab added 2 commits April 30, 2024 08:25
…irectory

Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
@MartinDrab MartinDrab force-pushed the feature/viosock/remove-coinstaller branch from cf7e51a to 78422de Compare April 30, 2024 15:26
Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
@MartinDrab MartinDrab changed the title [CI-NO-BUILD] Viosock: Remove Coinstaller Stuff from the INF File Viosock: Remove Coinstaller Stuff from the INF File May 25, 2024
@MartinDrab MartinDrab force-pushed the feature/viosock/remove-coinstaller branch from aff12c4 to 96d9493 Compare May 25, 2024 13:49
Let's test how well this passes through HCK/HLK. If this approach proves working, let's add an installer app and an Uninstall key.

Signed-Off-By: Martin Drab <martin.drab@virtuozzo.com>
@MartinDrab MartinDrab force-pushed the feature/viosock/remove-coinstaller branch from 96d9493 to 33760a4 Compare May 26, 2024 19:34
@@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 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.

  2. 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 with Class=System?

SoftwareType=1
SoftwareBinary=viosocklib-test.exe
SoftwareArguments="/i"
SoftwareVersion=1.0.0.0
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants