Граф коммитов

155 Коммитов

Автор SHA1 Сообщение Дата
Alan Jowett a1c6e9d73a
Implement handles as an abstraction (#68)
Implement handles as an abstraction

Resolves: #60

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-23 14:26:54 -06:00
Alan Jowett 44e748fcd8
Add doxygen style comments to all common ebpf headers (#58)
Update shared headers with Doxygen comments.

Resolves: #57

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2021-04-23 10:48:13 -06:00
Alan Jowett 2dee0dcebd
Add support for generic objects reference counting (#66)
Add support for generic objects reference counting.

Resolves: #65

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-23 10:21:12 -06:00
Alan Jowett ff1bbbf749
Add support for hook as first class object. (#54)
An ebpf_hook_instance represents the connection between an ebpf program and a attach point.

Signed-off-by: Alan Jowett alanjo@microsoft.com
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2021-04-23 09:42:55 -06:00
Alan Jowett 37dbd348f7
Remove remnants that assume CPU epoch starts at 0 (#63)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-22 16:52:08 -07:00
Alan Jowett c2611f741b
Switch ebpf_epoch to use WDM standard linked list functions. (#56)
* Switch ebpf_epoch to use WDM standard linked list functions.
Store free entries in incresing epoch to speed cleanup.

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-20 16:38:12 -06:00
Alan Jowett 199cfce121
Can't rely on initial 0 epoch to determine that a CPU isn't actively running eBPF programs.
Can't rely on initial 0 epoch to determine that a CPU isn't actively running eBPF programs.

Resolves: #51 (#52)

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-19 19:11:28 -06:00
Alan Jowett a289a253bc
Document how to run kernel driver on Windows. (#47)
* Document how to run kernel driver on Windows.

Resolves: 28

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2021-04-19 18:47:33 -06:00
Alan Jowett e7001b5c4c
Implement pinning as an abstraction. (#49)
* Implement pinning as an abstraction.
Update execution context to use pinning abstraction.

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-19 17:12:08 -06:00
Alan Jowett a57bfb30d4
Add epoch logic to handle run down of map entries. (#43)
* Add epoch logic to handle run down of map entries.
Integrate with execution context to invoke epoch_enter/epoch_exit on entry/exit of execution context.

Resolve: #24

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2021-04-19 16:43:45 -06:00
Dave Thaler b115fce38d
Fix CODEOWNERS (#45)
The alias has to be prefixed with the github org to be recognized

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-19 08:31:01 -07:00
Dave Thaler 57bef3dc03
Improve performance of boost install during windows CI pass (#44)
Pick up change to ebpf-verifier that potentially shaves a couple of minutes off the time needed for a CI pass

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-19 08:15:50 -07:00
Dave Thaler bbfb442b19
Fix format-code.ps1 extension matching (#42)
Use exact matching, not against a regex,
so "c" should not match "rc" for example.

Fixes #31

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-17 13:59:07 -07:00
Dave Thaler 8928f5eb90
Add architectural overview to README (#41)
And move instructions to a GettingStarted page.

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-17 13:37:48 -07:00
Dave Thaler 1c0e6c9b9f
Add CODEOWNERS file (#40)
So that pull request reviewers are automatically populated

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-17 13:22:43 -07:00
Dave Thaler 31b77e578c
Add option to show verbose verifier output (#38)
Fixes #20

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-17 13:09:43 -07:00
Dave Thaler c8a612ae19
Remove obsolete .sln files (#39)
And rename ebpf-demo.sln to ebpf-for-windows.sln

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-16 18:14:30 -07:00
Alan Jowett 9b45f8d24d
Switch ebpf_platform usermode to use NTDLL's Generic AVL table (#34)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>

Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2021-04-16 17:59:47 -07:00
Dave Thaler d773102b04
Make "show disassembly" work again when ebpfcore is not running (#37)
Fixes #35

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-16 17:34:57 -07:00
Dave Thaler 5b7b947ac0
Add FAQ to README file (#36)
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-16 17:23:21 -07:00
Dave Thaler d2faba3e25
Build Debug configuration (#29)
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-16 12:52:47 -07:00
Alan Jowett 1c019afc9c
Change interface to maps to use opaque type and simplify interface. (#23)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-16 12:59:38 -06:00
Dave Thaler 8246f41b8c
Fix references to ebpfverifier project (#25)
The GUID referenced didn't match the project's GUID in the ebpf-demo.sln file

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-16 11:38:56 -07:00
Dave Thaler 0f9c96e17f
Fix instruction count computation (#26)
The instruction count is shown twice, with both numbers incorrect.
This PR fixes the first one.
The second one comes from the stats section which is off by one since it
counts "entry:", which is also why the Prevail "check" tool skips
printing it.   I'm following up separately to see if that one can just be removed.

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-16 08:58:37 -07:00
Dave Thaler 648b0fe963
Convert tutorial to use netsh commands (#16)
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-15 18:36:36 -07:00
Alan Jowett 7d791e5643
Refactor maps into static lib to permit easier testing or replacement. (#15)
Resolves: #14

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-15 17:15:00 -06:00
Alan Jowett b9eb5a080b
Add -g to build of eBPF programs to run tests with debug inforormation. (#13)
Resolves: #12

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-15 14:57:31 -07:00
Alan Jowett 81358ecca3
Create static libraries containing the Platform abstraction layer for user mode and kernel (#10)
Resolves #9

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-15 13:41:57 -06:00
Alan Jowett e17f511a42
Add unit test to CI/CD workflow. (#8)
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2021-04-15 13:25:12 -06:00
Dave Thaler f4c244a9a0
Run github workflow on all pull requests (#11)
Not just ones from the original repo, but also PRs from forks

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-15 12:09:49 -07:00
Dave Thaler 089b6de6a7
Update README with latest changes (#7)
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-15 11:41:16 -07:00
Dave Thaler d2c9ba6c71 Add maps discussion to tutorial
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-14 11:47:16 -07:00
Dave Thaler bf8fd86429 Convert tutorial doc to markdown
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-14 11:47:16 -07:00
Dave Thaler 48fa5458af
Add more contributing guidelines (#4)
Using the MSQUIC project as the example to copy from.
https://github.com/microsoft/msquic/blob/main/.github/CONTRIBUTING.md

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-14 11:45:32 -07:00
Dave Thaler 9174654d26
Add build task to github workflows (#2)
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-14 11:03:01 -07:00
Dave Thaler a0304a0172 Add github files
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-13 15:48:48 -07:00
Alan Jowett b35a157c6b Merged PR 4256572: Update ebpf to use minimally changed ubpf
Update ebpf to use minimally changed ubpf

1) Revert change in ubpf to support dynamic map and helper resolution -> pre-resolve all maps and helpers.
2) Remove jitter code from kernel ubpf lib
2021-03-17 22:10:24 +00:00
Alan Jowett b431246e5d Merged PR 4249706: Pull latest ebpf verifier and fix build break
Pull latest ebpf verifier and fix build break
2021-03-16 19:33:56 +00:00
Alan Jowett aa04455d1f Merged PR 4246780: Switch to ebpf / prevail master branch
Switch to ebpf / prevail master branch
2021-03-16 01:39:35 +00:00
Alan Jowett 32eba8af72 Merged PR 4245043: Add license text to all .vcxproj files
Add license text to all .vcxproj files
2021-03-15 19:41:45 +00:00
Alan Jowett a3df5a64d5 Merged PR 4244774: Start of CI/CD pipeline
Start of CI/CD pipeline

Build static libs for user mode.
2021-03-15 19:00:32 +00:00
Alan Jowett 5af17b80ad Merged PR 4244102: Tweak for demo
Tweak for demo
2021-03-15 18:46:56 +00:00
Alan Jowett 514b942372 Enable CFG to unblock build 2021-03-15 12:32:48 -06:00
Alan Jowett 1f1b465096 Attemp to restore nuget 2021-03-15 12:22:03 -06:00
Alan Jowett 645a8c656d Switch to single feed 2021-03-15 11:47:39 -06:00
Alan Jowett 029e4cf0ab Remove project that depends on clang 2021-03-15 11:04:09 -06:00
Alan Jowett 475f7e4f01 Remove projects that don't build yet 2021-03-15 10:56:42 -06:00
Alan Jowett cf9f73aada Fix pipeline definition 2021-03-15 09:51:01 -06:00
Alan Jowett f12d139a50 Fix multi-feed nuget issue 2021-03-15 09:45:25 -06:00
Alan Jowett f9d93cffd9 Split user and kernel build sequences 2021-03-15 09:35:44 -06:00