Commit graph

619 commits

Author SHA1 Message Date
Dmitry Fleytman
5df028f84c Redirector: Drop empty Delete() override
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:32:31 +02:00
Dmitry Fleytman
92527fd8b8 Redirector: Introduce additional traces
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:32:31 +02:00
Dmitry Fleytman
a3ee8f04c0 ControlDevice: Refactoring: Rename some private members
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:32:30 +02:00
Dmitry Fleytman
464fbef889 Redirector: Make some debug traces more clear
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:31:00 +02:00
Dmitry Fleytman
900b148f0a Redirector: allow zero length pipe Read/Write requests
This patch fixes issue reported at
https://github.com/daynix/UsbDk/issues/11

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:30:59 +02:00
Dmitry Fleytman
39144b74ef WdfRequest: Handle buffer-less requests properly
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:30:58 +02:00
Dmitry Fleytman
11be0fe902 MemoryBuffer: Handle empty memory objects properly
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:30:58 +02:00
Dmitry Fleytman
082be5ea33 WdfRequest: Add some failure traces
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:30:57 +02:00
Dmitry Fleytman
48982b98eb WdfRequest: Drop unused functions
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:30:56 +02:00
Dmitry Fleytman
cbd15f5d55 ControlDevice: Do not process AddRedirect in IoInCallerContext
This commit moves processing of AddRedirect IOCTL from
IoInCallerContext callback of control device to normal
default queue DeviceIoControl callback.

This change eliminates posibility for parallel execution
of AddRedirect and other operations, particularly RemoveRedirect.

Initially AddRedirect was perfomed in IoInCallerContext callback
to open user mode handle to the device being redirected in context
of correct user mode process. This patch achieves the same goal
by storing caller's process handle in request context in
IoInCallerContext callback and duplicating handle to the original
calling process from queue's DeviceIoControl callback.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:20:23 +02:00
Dmitry Fleytman
742f044334 Utils: Introduce helper for opening current process handle
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-16 15:37:14 +02:00
Dmitry Fleytman
065604373f ControlDevice: Make WDF allocate context area for control requests
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-16 15:37:13 +02:00
Leonid Bloch
63bcd972dd UsbDk: Added documentation on creating and sharing crash dumps
Signed-off-by: Leonid Bloch <leonid@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-10 19:06:57 +02:00
Dmitry Fleytman
db0053897f msi: Add 32-bit UsbDkHelper.dll to 64-bit MSIs
Needed for WoW64 clients.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-28 14:59:48 +02:00
Dmitry Fleytman
4a0354fdcd UsbDk: Perform ReadPipe/WritePipe via IOCTLs
This commit fixes issues with accessing USB devices on
some USB host controllers.

Before this fix UsbDk assumed IO type NEITHER for
ReadFile/WriteFile operations performed on captured
USB device. This assumption is not true in some cases
because UsbDk creates filter devices which use the
same IO type as device being filtered, i.e. IO type
is effectively defined by USB host controller driver.

While some host controllers work in NEITHER IO mode,
others use DIRECT IO instead. When capturing device
plugged into such a controller UsbDk failed to retrieve
ReadFile/WriteFile buffers because there are different API
used different IO types and UsbDk used the wrond one.

This patch changes UsbDk DLL/Driver interface to use IOCTL
for ReadPipe/WritePipe operations. Since IO type for IOCTL
requests is determined by IOCTL code and not by target device
settings UsbDk need not consider IO type used by the host
controller being filtered.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-28 09:11:41 +02:00
Dmitry Fleytman
a01f9214ac UsbDk: trivial: make function parameters const
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-28 09:11:40 +02:00
Dmitry Fleytman
8e4d181f82 UsbDk: Add debug trace for request enqueue failure
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-28 09:11:40 +02:00
Dmitry Fleytman
f228c840e1 UsbDk: Fix paged memory access under spinlock
This patch fixes access to bus device relations array
allocated from paged memory pool under child device list
spinlock.

Fixed by creation of temporary non-paged copy of the paged data.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-28 09:11:39 +02:00
Dmitry Fleytman
accb8b6b77 UsbDk: Trivial: Dropping unused functions
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-27 16:00:54 +02:00
Dmitry Fleytman
6d353a69a3 Trace: Fix binary trace scripts
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-27 16:00:53 +02:00
Dmitry Fleytman
78f7717261 Trace: Enable all trace flags by default
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-27 15:33:32 +02:00
Dmitry Fleytman
bf7696e06a docs: Document obtaining user mode debug traces
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-09-24 14:33:49 +03:00
Dmitry Fleytman
06717ee178 docs: Add documentation about tracing facilities
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-09-24 14:12:13 +03:00
Dmitry Fleytman
6f8e22cffa tools: Add scripts for binary tracing
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-09-24 14:11:18 +03:00
Dmitry Fleytman
5ce1042575 tools: Disable useless trace script echo-ing
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-09-24 14:09:16 +03:00
Dmitry Fleytman
1136813ff3 docs: Introduce driver signing documentation
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-09-22 14:38:16 +03:00
Dmitry Fleytman
2b1c206e3f readme: Add link to Documentation folder
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-09-22 14:38:16 +03:00
Dmitry Fleytman
96e8b6dfcd docs: Introduce location for project documentation
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-09-22 14:36:12 +03:00
Dmitry Fleytman
07baa62166 UsbDk: Fix type in word Interrupt
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-07-19 12:02:54 +03:00
Dmitry Fleytman
458ad0f9a6 Installer: Fix MSI reinstallation and downgrade
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-06-18 19:52:14 +03:00
Dmitry Fleytman
cf281029a3 README: Specify that VS2013 Update 4 or newer is required
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-06-09 11:32:08 +03:00
Jay.han
4dbbf0c86c UsbDk: Add support for USB 3.0 controllers
Add search strategy for USB3 controllers:

- Standard Microsoft controller
- Renesas controller (NUSB3)
- Intel controller (IUSB3)

Signed-off-by: Jay.Han <ezzzehxx@gmail.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-05-31 10:56:18 +03:00
Dmitry Fleytman
29814251f4 UsbDk: Introduce UsbDk_ResetPipe() user mode API
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-05-03 10:36:23 +03:00
Dmitry Fleytman
c0fd0b9692 UsbDk: Fix extra PDO dereference for redirected objects
This problem lead to BSOD on stop redirection

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-04-30 18:54:05 +03:00
Dmitry Fleytman
5a05b4669c UsbDkController: Fix stop redirection text message
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-04-30 16:39:46 +03:00
Dmitry Fleytman
59f8d972b2 MSI: Reject installation of 32 bit MSI on 64 bit system
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-31 11:19:35 +03:00
Dmitry Fleytman
455efb0638 UsbDk: Update VS2013 version number in solution file
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-31 11:18:50 +03:00
Dmitry Fleytman
ec66c90075 UsbDk: Add Wix files to VS2013 solution
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-31 11:18:09 +03:00
Dmitry Fleytman
0bb27db81f WXS: Fix/beautify indentation
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-31 11:16:50 +03:00
Dmitry Fleytman
5593a1cc36 UsbDkInstHelper: Add cleanup before installation
This patch fixed MSI installation failure in case
non-MSI version is installed or previous installation
experienced unexpected exit.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-31 11:14:25 +03:00
Dmitry Fleytman
a80fa35e1d UsbDkHelper: Fix debug traces for WoW64 operation
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-31 11:13:18 +03:00
Dmitry Fleytman
bc4d72510f UsbDkHelper: Fix path to UsbDkHelperHider.h in vcxproj
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:38:02 +02:00
Dmitry Fleytman
ec04c9a874 trivial: cleanup comments
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:38:00 +02:00
Dmitry Fleytman
e05ca16aaa ControlDevice: Split dynamic and persistent hide rules lists
Required to properly support removal of persistent hide rule

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:59 +02:00
Dmitry Fleytman
cc1092cf45 FilterDevice: Fix PDO leak for hidden devices
1. Never hide PDOs indicated to PNP manager
   since we're not owning those after the indication
2. Dereferenced PDOs for hidden devices on device removal
   because we're the owner of those PDOs

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:58 +02:00
Dmitry Fleytman
456334a73f UsbDkHelper/Controller: Update persistent hide rules after modification
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:57 +02:00
Dmitry Fleytman
2baf64f1e5 UsbDk: Add IOCTL for rescanning registry configuration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:56 +02:00
Dmitry Fleytman
97cf895463 UsbDkController: Fix return values and beautifications
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:55 +02:00
Dmitry Fleytman
bccf5abebd UsbDkController: Introduce support for persistent hide rules
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:54 +02:00
Dmitry Fleytman
eb8c876fc9 UsbDkHelper: Add persistent hide rules interface
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:52 +02:00