371 Commits
Author SHA1 Message Date
Kevin Parsons 3dac69f6ea pkg/guid: Switch from json.Marshaler to encoding.TextMarshaler
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-13 14:31:21 -07:00
Kevin Parsons b940a6f7ae pkg/guid: Improve error messages
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-13 14:30:09 -07:00
Kevin Parsons 2dc6637e2c pkg/guid: Support big-endian and Windows encodings
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-13 14:28:49 -07:00
Kevin Parsons 6dd84a2574 pkg/guid: Add helper functions to tests
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-13 14:25:53 -07:00
Kevin Parsons 1197d54849 pkg/guid: Add variant and version support
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-13 14:22:42 -07:00
Kevin Parsons 01fe22a8b8 Merge pull request #142 from microsoft/fix-guid
Fix errors introduced with guid-by-value change
2019-05-09 11:20:14 -07:00
Kevin Parsons a2a7cd6b7d Fix errors introduced with guid-by-value change
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-08 16:43:22 -07:00
Kevin Parsons d918a0ad4e Merge pull request #141 from microsoft/guid-by-value
pkg/guid: Prefer passing GUID by value
2019-05-08 16:11:02 -07:00
Kevin Parsons 7185c03f75 pkg/guid: Prefer passing GUID by value
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-08 15:52:52 -07:00
John Starks 2be8053e58 Merge pull request #138 from microsoft/etw-write-error
etwlogrus: Ignore error from ETW WriteEvent
2019-05-08 08:21:23 -07:00
John Starks 1bcf844dd4 Merge pull request #140 from microsoft/etwlogrus-tests
etwlogrus: Improve tests to actually go through logrus hook
2019-05-08 08:20:37 -07:00
John Starks b092048eb0 Merge pull request #139 from microsoft/fix-etw-logrus
etwlogrus: Fix event logging not including fields
2019-05-08 08:19:54 -07:00
Kevin Parsons afa8dc2e8d etwlogrus: Improve tests to actually go through logrus hook
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-08 00:01:40 -07:00
Kevin Parsons ed00d9afc1 etwlogrus: Fix event logging not including fields
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-07 23:51:39 -07:00
Kevin Parsons 2093f10e12 etwlogrus: Ignore error from ETW WriteEvent
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-07 23:41:01 -07:00
Kevin Parsons fa965998be Merge pull request #136 from microsoft/modules
Transition to Go modules
2019-05-07 23:25:44 -07:00
Kevin Parsons f9e746f4e5 Transition to Go modules
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-07 19:33:56 -07:00
John Starks e90d8317de Merge pull request #133 from jstarks/sort_keys
pkg/etwlogrus: Ensure stable event field order
2019-05-07 13:40:08 -07:00
John Starks 664840fcdb pkg/etwlogrus: Ensure stable event field order
This change updates the logrus hook to sort the incoming logrus data
before passing it to the tracelogging code. This is useful because it
ensures that two instances of the same event have the fields in the same
order, which is necessary to get WPA to line the fields up.
2019-05-07 19:27:13 +00:00
Justin f4260581c2 Merge pull request #132 from jstarks/etwtime
pkg/etw: Add support for time.Time
2019-05-07 10:25:08 -07:00
John Starks 89c1d0e19d pkg/etw: Add support for time.Time
This change adds support for encoding time.Time values as FILETIME
values in tracelogging events. FILETIME has slightly less precision than
time.Time (100ns vs 1ns), but it is the closest availble match.
2019-05-05 00:02:18 +00:00
Kevin Parsons 3fe4fa3166 Merge pull request #130 from kevpar/etw-386
Fix ETW package to work on 386
2019-04-22 14:05:07 -07:00
Kevin Parsons 0112307ab4 Fix ETW package to work on 386
The ETW registration handle is defined to be 64-bits on all platforms. The Go
type previously used a uintptr which created problems on 32-bit systems. This
change adds a new wrapper file which receives a 64-bit handle for the functions
defined in it, and correctly passes it to the native ETW functions either as-is
(on 64-bit) or as two 32-bit values (on 32-bit).

This required a minor change in mksyscall_windows.go, to allow multiple syscalls
that map to the same underlying function without causing a duplicate definition
error in the generated file.
2019-04-22 10:28:49 -07:00
Kevin Parsons 1af701744e Add stock mksyscall_windows.go to ETW package
This is just so we can see the alterations we make to this file as a diff in
the next commit.
2019-04-22 10:24:50 -07:00
John Starks d132a827c0 Merge pull request #128 from jstarks/hvsock
winio: Add AF_HYPERV listener
2019-04-22 09:32:45 -07:00
Kevin Parsons 5187f74e04 Merge pull request #129 from kevpar/no-etw-arm
Make ETW no-op on ARM
2019-04-21 16:51:22 -07:00
John Starks 7776571819 winio: Add AF_HYPERV listener 2019-04-21 15:35:05 -07:00
Kevin Parsons a4918f0a0f Make ETW no-op on ARM
Proper support for ETW on ARM will require additional changes in Go to support
more than 16 bytes of arguments to a syscall callback. Until this work is done,
the ETW package is being changed to no-op on ARM.
2019-04-20 19:23:37 -07:00
Kevin Parsons dac77d8a7c etw: Fix panic when provider creation fails
There is a cleanup function deferred to remove the provider from the global
provider map. However, this function didn't bind the value of provider ahead of
time, so when the provider creation returned with nil for provider, we tried to
cleanup a nil provider, and panicked.
2019-04-19 10:43:53 -07:00
John Howard 84b4ab48a5 Merge pull request #125 from jstarks/listenpipe
pipe: Fix ListenPipe/DialPipe race
2019-04-08 10:36:21 -07:00
John Starks bd71ef0e5d pipe: Fix ListenPipe/DialPipe race
ListenPipe can fail if there is a concurrent DialPipe because there is a
race window where DialPipe can connect to the initial server named pipe
before it is connected to and closed by ListenPipe.

To fix this, use the lower-level NT API for creating the server pipe,
since this API allows for specifying that a server pipe should initially
be in the disconnected state instead of the listening state. This allows
us to avoid the race condition by creating the pipe in the correct state
initially, so there is no longer a need to create a dummy client
connection.
2019-04-08 10:08:23 -07:00
Kevin Parsons b30741e1fe Merge pull request #124 from kevpar/guid
Add guid package
2019-04-02 10:44:00 -07:00
Kevin Parsons 88da7d1491 Add guid package 2019-04-01 16:07:14 -07:00
Kevin Parsons 8710e5dda3 Merge pull request #123 from kevpar/etw-opcode
Add opcode support to etw package
2019-03-28 14:42:35 -07:00
Kevin Parsons 873693efb7 Add opcode support to etw package 2019-03-28 14:34:17 -07:00
Justin 812eb80041 Merge pull request #121 from sime1/context
add DialPipeContext
2019-03-26 11:52:53 -07:00
sime1 6e309c3584 remove newOpenError 2019-03-26 18:39:51 +01:00
sime1 498f830763 formatting, inline Dial returned error 2019-03-26 18:37:37 +01:00
sime1 693f74258b context timeout test 2019-03-26 18:36:36 +01:00
Simeone 665a579a64 test context cancel error type 2019-03-26 10:10:46 +01:00
Simeone b9aaa11ea0 errors coercion to pass the tests 2019-03-26 10:09:27 +01:00
Simeone 5fdbdcc2ae add DialPipeContext 2019-03-26 09:43:43 +01:00
Kevin Parsons dd3d7fa178 Merge pull request #120 from kevpar/etw-smart-field
Move smart ETW field logging to base etw library
2019-03-22 14:48:08 -07:00
Kevin Parsons d39b93dec6 Merge pull request #119 from kevpar/fix-activity-id
Fix activity ID not being passed in ETW
2019-03-22 14:37:41 -07:00
Kevin Parsons a132ab2270 Move smart ETW field logging to base etw library 2019-03-22 14:16:54 -07:00
Kevin Parsons 9ea416ec01 Fix activity ID not being passed in ETW 2019-03-22 11:11:18 -07:00
John Howard c599b533b4 Merge pull request #117 from Microsoft/jjh/gvmga-take2
Fix GrantVmGroupAccess
2019-03-21 13:07:17 -07:00
John Howard 8df5952535 Fix GrantVmGroupAccess
Signed-off-by: John Howard <jhoward@microsoft.com>
2019-03-21 12:32:46 -07:00
John Howard cf4178e271 Merge pull request #116 from Microsoft/jjh/grantvmgroupaccess
Add GrantVmGroupAccess
2019-03-20 21:04:50 -07:00
John Howard 884f680ab9 Add GrantVmGroupAccess
Signed-off-by: John Howard <jhoward@microsoft.com>
2019-03-20 19:35:27 -07:00