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

1378 Коммитов

Автор SHA1 Сообщение Дата
Gianni Trevisiol 51bdf6a681
Doc update: add .net 3.5 dependency installation step. 2023-02-14 22:52:45 +00:00
Michael Friesen 5150f2ec55
disable hook extension rundown until NMR binding is complete (#2011)
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-02-14 11:57:47 -08:00
red d2014da017
Add support for atomic instructions in bpf2c (#1936) 2023-02-14 11:15:38 -07:00
Gianni Trevisiol 4eeac61643
Remove preprocessor library dependencies from `libfuzzer.h`. 2023-02-13 19:52:57 +00:00
dependabot[bot] 1e9b854814
Bump actions/cache from 3.2.4 to 3.2.5 (#2071)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](627f0f41f6...6998d139dd)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-12 20:38:50 +00:00
dependabot[bot] e120bb0123
Bump github/codeql-action from 2.2.1 to 2.2.4 (#2070)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.1 to 2.2.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3ebbd71c74...17573ee1cc)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-12 19:16:52 +00:00
dependabot[bot] b1d7cb0dfc
Bump external/Catch2 from `cefa8fc` to `4aa8829` (#2069)
Bumps [external/Catch2](https://github.com/catchorg/Catch2) from `cefa8fc` to `4aa8829`.
- [Release notes](https://github.com/catchorg/Catch2/releases)
- [Commits](cefa8fcf32...4aa88299af)

---
updated-dependencies:
- dependency-name: external/Catch2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-12 17:47:29 +00:00
Gianni Trevisiol 7d6880ad54
Add missing libbpf includes. 2023-02-10 14:05:57 -08:00
Alan Jowett a7c10fb761
Update scripts\generate_expected_bpf2c_output.ps1 to generate custom and unsafe programs (#2058)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Anurag Saxena <43585259+saxena-anurag@users.noreply.github.com>
2023-02-09 20:09:31 +00:00
Gianni Trevisiol 65997905b9
Add restricted SID to JIT+artifacts for api_tests (#2057)
Co-authored-by: Anurag Saxena <43585259+saxena-anurag@users.noreply.github.com>
2023-02-09 19:15:17 +00:00
dependabot[bot] e032b55a8e
Bump external/Catch2 from `f3c0a3c` to `cefa8fc` (#2050)
Bumps [external/Catch2](https://github.com/catchorg/Catch2) from `f3c0a3c` to `cefa8fc`.
- [Release notes](https://github.com/catchorg/Catch2/releases)
- [Commits](f3c0a3cd09...cefa8fcf32)

---
updated-dependencies:
- dependency-name: external/Catch2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-09 18:22:23 +00:00
dependabot[bot] 28fe7e9de7
Bump external/ebpf-verifier from `cbc70d5` to `5dd6ab8` (#2051)
Bumps [external/ebpf-verifier](https://github.com/vbpf/ebpf-verifier) from `cbc70d5` to `5dd6ab8`.
- [Release notes](https://github.com/vbpf/ebpf-verifier/releases)
- [Commits](cbc70d5354...5dd6ab86e8)

---
updated-dependencies:
- dependency-name: external/ebpf-verifier
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
2023-02-08 19:49:43 -07:00
Alan Jowett 605ba578cd
Workaround to avoid race between attach failing and unregister (#2049)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-02-08 11:51:42 -07:00
Gianni Trevisiol 18a35989b7
fix bullet (#2047) 2023-02-08 09:42:03 -07:00
Dave Thaler cb43d4235d
Add test case for XDP_TX (#2029)
* Add test case for XDP_TX

This tests a failure path since FwpsInjectMacSendAsync0 is not implemented
in fwp_um.cpp.  However the CI/CD run ought to repro a leak.

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

* Fix analysis warning

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

---------

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Anurag Saxena <43585259+saxena-anurag@users.noreply.github.com>
2023-02-08 00:57:29 +00:00
Gianni Trevisiol c3325dc961
Add Wix Toolset as a `nuget` package. 2023-02-07 21:55:35 +00:00
Anurag Saxena e3c62b2a91
Update connect redirect tests to test only-v4 and only-v6 program scenarios. (#2042)
* update tests

* update expected files

* fix tests
2023-02-07 19:50:12 +00:00
Dave Thaler 3d626ff9c1
Clean up order of includes (#2015)
* Clean up order of includes

Fixes #1963

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

* Update clang-format

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

* Clean up headers

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

* Update sort

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

* FIx various build errors

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

* Fix ordering if including a .c file

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

* Fix cmake build

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

* More header cleanup

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

* Update expected bpf2c output

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

* More header fixes

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

* Update expected bpf2c output for custom bpf.c

The generate script does not handle this file.

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

* Fix tests

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

* Fix more expected bpf2c output

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

---------

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Anurag Saxena <43585259+saxena-anurag@users.noreply.github.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
2023-02-07 18:32:19 +00:00
Alan Jowett 4ad5287a29
Invoke _ebpf_extension_client_notify_change before completing binding (#2009)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Anurag Saxena <43585259+saxena-anurag@users.noreply.github.com>
2023-02-07 17:09:43 +00:00
Gianni Trevisiol 694485a5e3
Add JIT & Interpreter build switches. (#2031)
* draft

* nit

* doc update

* doc update

* description update

---------

Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-02-07 15:08:47 +00:00
Alan Jowett 31f4bbcf59
Add full low-memory-test (#1706)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2023-02-07 02:32:49 +00:00
Dave Thaler c4f8f96599
Bump version to 0.6 in preparation for another unsigned release (#2036)
Following the process documented at
https://github.com/microsoft/ebpf-for-windows/blob/main/docs/ReleaseProcess.md

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2023-02-06 20:22:27 +00:00
Anurag Saxena 0cf88e4ecd
Remove PASSIVE IRQL check for SOCK_ADDR implementation of bpf_is_current_admin() (#2023)
* allow dispatch

* fix

* fix build

* fix

* code cleanup

* code cleanup
2023-02-06 12:39:15 -07:00
dependabot[bot] e76ba9afa6
Bump external/Catch2 from `c837cb4` to `f3c0a3c` (#2032)
Bumps [external/Catch2](https://github.com/catchorg/Catch2) from `c837cb4` to `f3c0a3c`.
- [Release notes](https://github.com/catchorg/Catch2/releases)
- [Commits](c837cb4a8a...f3c0a3cd09)

---
updated-dependencies:
- dependency-name: external/Catch2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anurag Saxena <43585259+saxena-anurag@users.noreply.github.com>
2023-02-05 21:17:49 +00:00
dependabot[bot] 0c391a12bb
Bump actions/cache from 3.2.3 to 3.2.4 (#2035)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.2.3...627f0f41f6904a5b1efbaed9f96d9eb58e92e920)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-05 12:40:23 -08:00
dependabot[bot] 56ddfa4c8f
Bump microsoft/setup-msbuild from 1.1.3 to 1.3.1 (#2033)
Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 1.1.3 to 1.3.1.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Changelog](https://github.com/microsoft/setup-msbuild/blob/main/building-release.md)
- [Commits](34cfbaee7f...1ff57057b5)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anurag Saxena <43585259+saxena-anurag@users.noreply.github.com>
2023-02-05 05:36:34 +00:00
dependabot[bot] d482ef2e56
Bump external/ubpf from `cf05de5` to `40c047c` (#2034)
Bumps [external/ubpf](https://github.com/iovisor/ubpf) from `cf05de5` to `40c047c`.
- [Release notes](https://github.com/iovisor/ubpf/releases)
- [Commits](cf05de538f...40c047c5ad)

---
updated-dependencies:
- dependency-name: external/ubpf
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-04 20:47:33 -08:00
Dhiren Vispute fd1bd431ea
Incorporate post-merge feedback on PR#2004 (#2027) 2023-02-03 23:32:05 +00:00
Michael Friesen 096f10f7b1
perform a default action if the XDP program fails (#2003)
* perform a default action if the XDP program fails

* drop instead of pass upon program failure
2023-02-03 21:13:36 +00:00
Dhiren Vispute f50dcb999d
Use weak reference counts for object table entries (#2004)
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
2023-02-03 09:33:18 -08:00
Alan Jowett 2c4e418c6e
Remove vestigal division by zero code (#2007)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2023-02-02 13:29:40 -08:00
Alan Jowett c57ca7c9f7
Catch std::bad_alloc from ParsePEFromFile (#1999)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-02-02 13:05:36 -07:00
Alan Jowett d9e92200d5
Delay NMR registration until link is ready (#2005)
* Delay NMR registration until link is ready

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

* Fix ExUuidCreate at DISPATCH IRQL

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

---------

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-02-02 04:37:50 +00:00
Alan Jowett a86e905ff1
Catch and terminate exception in ebpf_ring_buffer_map_subscribe (#2000)
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2023-02-02 03:09:26 +00:00
Alan Jowett 0174977d80
Document epoch based memory management (#1988)
* Document epoch based memory management

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

* Editorial fixes

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

* Editorial fixes

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

* Add private allocation header and clarify callback

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

* Make it clear the thread state is per thread per cpu

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

---------

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-02-01 23:58:06 +00:00
Michael Friesen c556b4dfae
Add support for deploying eBPF to arbitrary filesystem locations (#1995)
* add support for deploying ebpf to arbitrary filesystem locations

* fix typo

* add documentation

* fix coding style
2023-02-01 15:13:25 -08:00
Alan Jowett 27fee383cd
Prevent loading of incompatible native modules (#1990)
* Prevent loading of incompatible native modules

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

* Apply suggestions from code review

Co-authored-by: Dave Thaler <dthaler@microsoft.com>

* Fix test failures

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

---------

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Anurag Saxena <43585259+saxena-anurag@users.noreply.github.com>
2023-02-01 20:43:58 +00:00
Dave Thaler 68544ba5e6
Update verifier to latest (#1991)
* Update verifier to latest

Fixes #1451
Fixes #1756

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

* Update samples to work around verifier limitation

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

* Update expected bpf2c output

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

* Fix cmake build

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

---------

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2023-02-01 12:52:20 -07:00
dependabot[bot] 74b1672e5b
Bump windows/nanoserver in /images (#1980)
Bumps windows/nanoserver from 10.0.17763.3887 to 10.0.20348.1487.

---
updated-dependencies:
- dependency-name: windows/nanoserver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-02-01 09:17:19 -08:00
dependabot[bot] ea31665479
Bump external/ubpf from `b39bf35` to `cf05de5` (#1976)
Bumps [external/ubpf](https://github.com/iovisor/ubpf) from `b39bf35` to `cf05de5`.
- [Release notes](https://github.com/iovisor/ubpf/releases)
- [Commits](b39bf35d57...cf05de538f)

---
updated-dependencies:
- dependency-name: external/ubpf
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
2023-02-01 06:52:11 -08:00
Delaram Amiri 3db9ff9cea
enable app verifier for cicd build (#1929)
* enable app verifier for cicd build

* change test command arguments

* modify test command

* change test command arguments

* clear path

* use the appverifier as pre_test

* install sdk

* install sdk

* modify steps

* modify yml file

* test without commit id

* test without commit id

* test without commit id

* modify resuable-test.yml

Co-authored-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-01-31 18:10:36 -08:00
dependabot[bot] b67a9c5b3b
Bump github/codeql-action from 2.1.39 to 2.2.1 (#1979)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.39 to 2.2.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](a34ca99b46...3ebbd71c74)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-01-31 15:39:15 -08:00
dependabot[bot] 73b332c47f
Bump actions/github-script from 6.3.3 to 6.4.0 (#1977)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.3 to 6.4.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](d556feaca3...98814c53be)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-31 13:48:51 -08:00
Gianni Trevisiol 64e6812784
Add JIT option for MSI Release bits and CI/CD. (#1986) 2023-01-31 10:03:20 -08:00
Alan Jowett 44602dcb1d
ebpf_program_t computes hash of program info on first attach (#1948)
* ebpf_program_t computes hash of program info on first attach

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

* Provider reload test

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

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Anurag Saxena <43585259+saxena-anurag@users.noreply.github.com>
2023-01-31 16:14:12 +00:00
Alan Jowett 39c1490fb5
Protect ebpf_link_detach_program with a ref-count (#1984)
* Protect ebpf_link_detach_program with a ref-count

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

* Fix build break

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

---------

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2023-01-31 00:54:23 +00:00
Anurag Saxena 319ba6dc6b
Implement sock_addr specific global helper functions (#1847)
* fix

* add native test

* cleanup

* CR comments

* update expected files

* fix

* cr comments

* add 2 helper

* fix proj

* add admin helper

* fix expected files

* test fix

* fix log

* fix

* fix

* fix

* fix test

* implement global helper, add tests

* fix cmake build

* fix analysis failure, update expected files

* update expected fileS

* reuse bpf_get_current_pid_tgid

* fix tests

* fix helper

* fix tests

* update expected files

* backup

* formatting

* fix bad merge

* cleanup

* cleanup

* update issue number

* add header file

* add standard user test

* update helper definition

* fix

* code cleanup

* code cleanup

* fix kernel test

* add check for API calls

* fix test, PR comments

* pr comments

* add debug logs

* add debug logs, fix netebpfext test

* fix netebpfext test

* comment out log

* add traces to debug

* CR comments

* fix netebpfext_unit sock_addr test

* cr comments
2023-01-30 23:44:30 +00:00
Gianni Trevisiol 83ddc74d1d
Fix eBPF store clear/setup and add logs to `export_program_info.exe` (#1975)
* fix ebpf store & tool logs

* bare vm pass
2023-01-30 07:53:19 -08:00
Dave Thaler 7d22d50da8
Fix ossar cicd job for doc-only changes (#1970)
Fixes issue hit in
https://github.com/microsoft/ebpf-for-windows/actions/runs/4009703491
that was introduced by PR #1950 where that PR missed updating the ossar
job.

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2023-01-27 16:46:44 +00:00
Gianni Trevisiol 715715520c
Added Wix installer native project. (#1960)
* Added Wix native installer.

* Update docs/InstallEbpf.md

Co-authored-by: Dave Thaler <dthaler@microsoft.com>

* Update docs/InstallEbpf.md

Co-authored-by: Dave Thaler <dthaler@microsoft.com>

* typos

* Change ebpfsvc as a "JIT" option for Debug-only.

* misc fixes and improvements

* fix env path

* upload the msi package as a separate artifact

* fix sample driver uninstall, added log doc

* tests passed

* Doc update

* conditional MSI upload for regular/release only

* Upload dual installer version

* Set all drivers to auto start.

* update hash in doc

* Add check for VC++ redist

* doc update

* workaround for WixQuietExec64

* doc update

* Update scripts/run_tests.bat

Co-authored-by: Dave Thaler <dthaler@microsoft.com>

Co-authored-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
2023-01-26 21:25:23 -08:00