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

384 Коммитов

Автор SHA1 Сообщение Дата
Dave Thaler d8fc96683c
Update verifier to latest (#363)
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2021-08-09 11:38:12 -07:00
Alan Jowett 0fee94598b
Pull latest ubpf (#360)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>

Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2021-08-06 15:35:36 -07:00
Dave Thaler 8006f181e0
Libbpf API compatibility (#350)
* Libbpf API compatibility

Libbpf is incorporated as a submodule just for the header file.
As discussed in issue #84, we cannot currently use the implementation
since it is very Linux and GCC specific.

This PR also fixes a bug where the user-mode API was calling
CloseHandle directly instead of Platform::CloseHandle which is needed
to make tests work with the mock platform.

Addresses #84

Some code will be cleaner once issue #81 is done

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2021-07-30 15:34:21 -07:00
Dave Thaler 00fc46993d
Update PREVAIL verifier to latest (#347)
Includes support for marking a helper as doing packet reallocation

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Co-authored-by: Alan Jowett <alanjo@microsoft.com>
2021-07-26 18:05:06 -07:00
Dave Thaler d8a26f2b6d
Revert C6011 override (#319)
Fixes #309

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Co-authored-by: Alan Jowett <alanjo@microsoft.com>
2021-06-29 16:39:03 -06:00
Alan Jowett 7870921e02
Additional analysis fixes (#315)
* Fix C26110,C28023,C28193,C6001,C6031,C6054
* Fix C6101

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

Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2021-06-29 15:51:41 -06:00
Alan Jowett a0801d410c
Suppress C26451 (#312)
* Suppress C26451 and related errors

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-06-28 16:13:29 -07:00
Alan Jowett 9d798031b4
Fix warnings due to C6011 - NULL pointer deref (#307)
* Switch from _Pre_maybenull_ to _In_opt_

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

* Fix C6011

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

* Fix C6011 in PreprocessCommand

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-06-25 10:24:03 -06:00
Dave Thaler 25ba8c3306
Update uBPF to latest (#284)
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-06-16 14:17:31 -07:00
Dave Thaler 2200ab915f
Merge eBPF types with the types in ebpf-verifier (#282)
Remove duplicate types:
* ebpf_helper_return_type_t
* ebpf_helper_argument_type_t
* ebpf_context_descriptor_t

https://github.com/vbpf/ebpf-verifier/pull/238 already made the
necessary changes in the PREVAIL project, which got rid of the
issue with VOID and so the 'undef VOID' workarounds are removed
in the present PR.

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-06-16 11:53:21 -07:00
Dave Thaler a46b00c2e3
Add VM setup scripts and docs (#281)
* Create an install script rather than having to manually do lots
  of steps
* Make Debug build use vcruntime as static libs to avoid adding
  another prerequisite on a machine before installing eBPF.  This
  isn't required for Release builds as vcruntime release DLLs
  are part of Windows, unlike vcruntime debug DLLs

Fixes #248

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-06-15 08:44:43 -07:00
Dave Thaler bf7eef76c5
Make netsh "show verification" command display max instruction count (#242)
Fixes #193

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2021-06-02 12:22:06 -06:00
Alan Jowett d765bd616d
Increase stack size for eBPF programs to 512 bytes (#197)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-05-14 10:17:26 -06:00
Alan Jowett 38dae7294d
Switch to using https://github.com/iovisor/ubpf as the upstream branch for ubpf (#178)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-05-11 20:48:32 -07:00
Dave Thaler fba10c87b3
Update verifier to get latest disassembly format (#164)
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-05-11 09:25:47 -07:00
Dave Thaler 0f7a6b0c12
Update to latest verifier version (#148)
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-05-07 17:02:54 -07:00
Alan Jowett b138e2fb83
eBPF should use Windows Handles for eBPF objects (#110)
* Pickup changes from upstream ubpf

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

* Add ebpf_handle_kernel.c to interface with Windows object manager to manage lifetimes.

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

* PR feedback

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-30 11:49:23 -07:00
Alan Jowett eecf006201
Reduce churn in upstream ubpf repo (#104)
* Reduce churn in upstream ubpf repo

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-04-29 09:43:28 -06:00
Dave Thaler 39c1819f18
Update verifier to include changes to check ctx mismatches (#106)
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-28 17:49:18 -07:00
Dave Thaler 762e25939f
Cleanup (#89)
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-25 15:25:25 -07:00
Dave Thaler 26429bc8b8
Update to latest verifier code (#69)
Also update boost to 1.75 to match what verifier uses

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-04-23 14:59:02 -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 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
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 82700d8608 Fix wrong submodule commit id 2021-03-05 22:05:37 -07:00
Alan Jowett d9f75432fb Merged PR 4202906: Refactor execution context and ubpf to allow running in either kernel or user...
Refactor execution context and ubpf to allow running in either kernel or user mode.
Remove dead code from demo branch.
Create e2e test for droppack.
2021-03-05 17:05:09 +00:00
Dave Thaler 6b9fb4b103 Use the Prevail master branch
Moves Windows platform files into the internal repo.

Also adds ebpf_windows.h file to centralize defines that were previously
duplicated in at least three places.

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-03-02 20:54:15 -08:00
Dave Thaler da8ce260c1 Update verifier to have better error messages
This pulls in the latest from the windows prevail branch

Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-02-23 17:35:04 -08:00
Alan Jowett 0f753dea28 Merged PR 4147072: First version of changes to comply with new ebpf contract
First version of changes to comply with new ebpf contract

Note:
We can't use crt handle -> fd mapping until ebpfcore returns *real* handles.
2021-02-23 17:34:19 +00:00
Alan Jowett 3a73e0f548 Merged PR 4114187: Update code to match coding conventions
Update code to match coding conventions
2021-02-16 17:06:14 +00:00
Alan Jowett 267668f5f6 Merged PR 4099366: Setup solution to build all files for demo
Setup solution to build all files for demo
2021-02-10 21:06:04 +00:00
Alan Jowett c3dd0ae742 Merged PR 4079802: Add src/ebpf/libs/EbpfJitterDemoLib/
Add src/ebpf/libs/EbpfJitterDemoLib/
2021-02-05 18:56:12 +00:00
Dave Thaler 1a3539874b Add ebpf-verifier as submodule
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
2021-01-15 17:22:07 -08:00