Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Collect all the 'before-build' actions in single batch file.
Download the DLL required for AppVeyor during the build.
Remove the DLL from the repository.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Device redirection often fails when the device is in D3/D2 when
we start redirecting it. Current commit brings the device to
D0 before sending 'cycle power' command to the device port if
the device is in low power mode at the moment of starting
redirection.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Previous commit 4de57a9ff causes driver verifier assertion with
latest Windows builds. Note that this assertion is not in latest
WDF sources on GitHub. The verifier does not allow to forward
the MJ_CREATE requestto local IO target using "send-and-forget".
It requires the request to set completion callback.
There is an option to remove the file create callback at all, but
we prefer to have printout on file open for better diagnostics.
So we add completion callback for forwarded request and complete
the request in it.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Discard wdf folder renaming, it is not needed.
Discard WiX renaming, we use WIX environment variable.
Populate proper VS2015 build DLL.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
tracepdb utility does not work as expected, it overrides
TMF file with each processed PDB file. Build each TMF
file separately and concatenate all the TMF files to one.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Use %WIX% instead of absolute path
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
https://github.com/daynix/UsbDk/issues/81
OnClose -> RemoveRedirect -> NotifyRedirectorRemovalStarted
NotifyRedirectorRemovalStarted passes process id to ModifyOne
in order to avoid stopping redirection if another not related
process just opens the filter device and then closes it.
Example (before this commit):
Start VM and use remote-viewer to it.
Separate application 'App' registers notification on USB
device interface arrival. When new device comes, the application
opens a file using symbolic link name and closes it.
Redirect USB device to VM.
The UsbDk forces device to be reenumerated.
Open-close operation from the 'App' unexpectedly discards
device redirection.
After this commit: because the 'App' process is not an owner
of the redirection, OnClose will not cause removal of the
redirection.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Add optional process id parameter to the template
arguments. If process id is provided, the entry will be
additionally checked for match of owner process id saved in
the redirection object and caller process id.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Set owner process id when device redirection successfully
established (i.e. filter device is open and respective user
mode handle created for the process).
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Currently we stop redirection when filter device file handle
closed. This might be incorrect if some application just opens
and closes the file. Log entry with process id will help
diagnosing such problems.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Add callback when filter device receives file open request.
Propagate open operation down the stack and log it.
ETW log will contain process id of open request.
It is possible that more than one process opens the device.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
https://github.com/daynix/UsbDk/issues/81
If during redirection the redirection object is deleted
we may try accessing the deleted object in the loop of
attempts to create the redirection handle.
To avoid this we reference the redirection object until
the redirection request completely satisfied or failed.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
The application that uses Hider API does not have an ability
to query which persistent rules exist. So in order to use
UsbDk_DeletePersistentHideRule the application shall guess
which rule it needs to delete. Current commit adds ability to
delete all existing the persistent rules. This API requires
administrative privileges as all APIs related to persistent
hide rules.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Extended rules processing uses bitmask OR between device type
determination bitmap and class/type bitmap provided in 'Class'
parameter of the extended rule.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Load dynamic and persistent rules with type == 1
to extended rules sets.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Device type bitmask is calculated for device class and classes
of all its interfaces by narrowing set of device classes to set
of device types.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Add set of dynamic and persistent rules for advanced
device hiding feature.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Extending UsbDkController commands by adding 'Type' parameter.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
This commit adds implementation of registry operation for
extended rules in user-mode. Kernel driver still recognizes
all the entries as default ones (it ignores the Type value).
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Added:
UsbDk_AddExtendedHideRule
UsbDk_AddExtendedPersistentHideRule
UsbDk_DeleteExtendedPersistentHideRule
All existing APIs continue working as before.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Extend structure USB_DK_HIDE_RULE by adding 'Type'
member derived from backward-compatible structure
USB_DK_HIDE_RULE_PUBLIC. Public API procedures of UsbDkHelper
receive USB_DK_HIDE_RULE_PUBLIC describing hiding rules.
Internally UsbDk works with extended structure.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Added option MSGBOX=n to MSI package that forces the
installer to run without pop-up message boxes in case
of failure or request to reboot.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Add optional command-line parameter to suppress message
box in case the installation requires reboot or aborted.
This supports use case when the UsbDk is installed along
with other product and restart is required regardless
installation status of UsbDk. When installation helper
runs with -in or -iN, the message boxes are suppressed.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
https://github.com/daynix/UsbDk/issues/66
According to interface definition, the UsbDk shall return
actual length on transfer completion. For isoch OUT transfers
the controller does not return it on respective URB field on
Win10 and the updated WDK documentation states this field is
not used for ISOCH OUT transfers. Current commit populates
the initial packet length in the URB, making the result
consistent on both Win7 and Win10.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
When higher WDK than 14393 is installed on the machine, the modified
files related to build of drivers and driver-related applications may
produce errors on build using VS2015. Fixed project files solve this.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Win7 with USB 3.0 stack might not report superspeed
the same way as Win8 does. Use bcdUSB field of device
descriptor for that (USB 3.0 device connected to USB 2.x
port usually falls to USB 2 compatible configuration).
Getting the speed from HUB driver via IOCTL is more
complicated.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
This commit aims to address
https://bugzilla.redhat.com/show_bug.cgi?id=1575043
The driver definitely may try accessing USB device where
it is not USB and sending 'Submit URB' IOCTL down the stack
may cause unpredictable result. Current commit change
the order of checks when the device is enumerated by its
parent device: first ensure this is USB device, then try
to get USB-specific information.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
This reverts previous commit that actually has removed the check
that the driver is accessible. Prior to removal this at least should
be investigated in corner cases which are also to be defined
(like UsbDk uninstall when it has active redirected device).
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Closes #56
|
|
It is more correct to use lower device in stack for queries
during filter initialization. Lower device is in initialized
state and can process all kinds of requests, when current one is
not ready yet.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
|
|
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
|
|
Currently, in some cases, attempting to start the driver can fail
and cause Usb devices to become non functional. An example of such
case is attemteting to install an unsigned version of UsbDk on Windows
where the driver signature enforcement is enabled. The reason why this
happens is not making sure the driver can start on the system prior to
attaching it to all of the devices.
This patch solves this issue by checking that the driver can start on the
system prior to step 2 in the list below.
UsbDk's installation process:
1) Create and register UsbDk's service
2) Add UsbDk to the registry
3) Reset all Usb host conrollers on the system
4) PNP manager attaches and starts the driver for each Usb device's stack
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
|
|
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
|
|
Include getting traces using logman and converting binary traces
to text using installed TMF file.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
|
|
Existing batch file records binary trace using TraceView that
shall be copied from WDK, which is not always installed on end
user machine. Added batch file allows recording without additional
tools, using built-in logman application.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
|
|
Single TMF file contains all the data required for converting
binary trace to text for all the operating systems.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
|
|
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
|
|
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
|
|
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
|
|
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
|
|
According to msdn [1]:
"When you install an .msi installation package on Windows 10 or Windows
Server 2016, the VersionNT value is 603." which is the same value for
Windows 8.1.
In order to differentiate between Windows 8.1 and Windows 10 the trick in
[2] was used.
[1] https://support.microsoft.com/en-us/help/3202260/versionnt-value-for-windows-10-and-windows-server-2016
[2] http://stackoverflow.com/questions/31932646/versionnt-msi-property-on-windows-10
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
|
|
This commit deletes "Release" and "Debug" build configuration which
weren't used.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
|
|
This commit migrates from VS 2013 to VS 2015. Beside the auto conversion
which was performed by VS this commit includes the following fixes
which enabled the builld to work:
Win (7, 8, 8.1, 10):
* Set the KMDF Version Major to 1.
* Set the KMDF Version Minor to 11.
Win XP:
* Add _When_ define.
* Add empty implementation to guard functions which else would cause an
unresolved symbols.
* Add path to WinDDK's wdfinstaller.h in UsbDkHelper project.
* Add "GetDriverProjectAttributes" and "GetPackageFiles" targets to
UsbDkController, UsbDkHelper and UsbDkInstHelper project files.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
|