* First pass of adding SAL annotations
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Finish annotating platform
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Cleanup annotation to get lock tracking work correctly
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback and fix static analysis issues
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Fix build break from merge
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Simplify names of some ebpf_result codes
* Remove _ERROR_ for consistency
* Combine EBPF_INVALID_HANDLE and EBPF_INVALID_OBJECT
* Rename EBPF_ERROR_NOT_FOUND to EBPF_KEY_NOT_FOUND for consistency with the associated description.
* Change code that returned EBPF_ERROR_NOT_FOUND for a case other than a
key, to use a different appropriate result, so the description stays correct.
Fixes#212
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
* Synchonize client detach and hook invocation
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Check for detached program before invoking
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Remove allocations from executable memory pool
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Add direction to doxygen
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Clarify use of 4096 as page size
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Pinning a program requires a name to pin to
* The load program API doesn't correctly deal with an empty section name
(it does use the first section but then tells the execution context
that the section name is empty instead of the chosen one), so for now
require the section name in any "add program" command
* Allow netsh to hold references on multiple programs
* Fix handle leak in "show programs"
* Implement ability to pin a program, but unpinning requires
a way to look up what a program was pinned to, and no such
API exists currently.
* Implement filtering "show programs" output by filename and section
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
* Add LLVM for code generation proposal
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Revert "Add LLVM for code generation proposal"
This reverts commit cd896afd94.
* Free program object on epoch end
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Fix log function
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Workaround for VS2019 update 16.10.0
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Use correct API to map pages to system va
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback & verifier bug fixes
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Add LLVM for code generation proposal
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Revert "Add LLVM for code generation proposal"
This reverts commit cd896afd94.
* Add support for running work-item on epoch end
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Previously the script worked when there were changes and
generates an error when there's actually nothing to do
because "git commit" returns exit code 1 when there's nothing to do.
This updates the github workflow to only commit when there's something
to commit. For more discussion see
https://stackoverflow.com/questions/5139290/how-to-check-if-theres-nothing-to-be-committed-in-the-current-branch
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
"git commit -am" only adds changes to existing files, not new files
and so was missing adding docs when new headers were added, resulting
in a failure.
Also some params were missing from doxygen which resulted in
a bunch of warnings.
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
Since the program type changed from int to GUID the display has been
broken (it displays a useless pointer value). This fix makes it display
the string name of the type.
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
The IDL was generating MIDL2279 because it used const on an [out] param,
which is warned against since RPC marshaling copies the result into new
memory. See https://marc.info/?l=ms-dcom&m=103440617317922 for some
discussion.
Other changes should hopefully be obvious.
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
So pull request notifications go to more people
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
* Eliminate need for _unwind_helper
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Fix build break
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* Update driver to return ebpf_program_data_t to verifier
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Fix typo in comment
Co-authored-by: Dave Thaler <dthaler@microsoft.com>