* Add support for building ARM64 native only eBPF for Windows.
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
---------
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
* Centralize eBPF version to Directory.Build.props
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* Remove unused and failing builds
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
---------
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
* Update copyright to be eBPF for Windows contributors
Fixes#3507
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
* Undo gratuitous formatting changes in expected files
---------
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
* Add support for statically initializing BPF_MAP_TYPE_HASH_OF_MAPS
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* Update installer and add code gen tests
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* Add files to expected install list
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
---------
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
* remove store km lib and code
* fix
* more cleanup
* Apply suggestions from code review
Co-authored-by: Dave Thaler <dthaler1968@gmail.com>
---------
Co-authored-by: Dave Thaler <dthaler1968@gmail.com>
* Initial Commit
* Added tail call max exceed native test case
* Initial commit
* Initial commit
* Added bpf2c_tests/expected changed files
* Fixed the return value in bind_tailcall_max_native_test
* Addressed PR comments
* Update tests/unit/libbpf_test.cpp
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* Update tests/unit/libbpf_test.cpp
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* tests/unit/libbpf_test.cpp
* Moved MAX_TAIL_CALL_CNT to ebpf_structs.h as suggested
* Removed MAX_TAIL_CALL_CNT in api_test and stress_tests_km file
* Add the generated expected file for tail_call_max_exceed
* Removed MAX_TAIL_CALL_CNT from bpf_helpers.h
---------
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* build ebpfcore under usersim
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Work around analysis warnings
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix installer project
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Temporarily use ubpf branch with memory fix
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* WIP
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* WIP
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Create project for files shared between ebpfapi and the ebpf runtime
Move existing files from libs/platform either to:
* libs/shared, if meant to be common between user-mode and ebpf runtime
* libs/runtime, if meant to be used by the ebpf runtime only (whether in
user or kernel mode)
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Move ebpf_tracelog.c to shared
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Create shared_user and shared_kernel projects
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* WIP
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* WIP
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Remove usersim from ebpfsvc
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update to cxplat branch of usersim
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Use cxplat_utf8_string
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Cleanup
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix build errors
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix ebpf_allocate_with_tag
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fixes
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Bug fixes
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix use of ebpf_reallocate to not pass a null pointer
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix printf tests
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix memory leaks
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Temporary change to help debug double-free in test
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update to latest usersim
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix analysis warnings
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update to latest usersim
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update usersim to latest
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Change native module to use latest usersim
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update nuget package
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Only call cxplat_cleanup if cxplat_initialize succeeds
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* Revert setup_build.vcxproj change
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update usersim to latest
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
---------
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
* Update to use latest usersim
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* build ebpfcore under usersim
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update usersim to latest
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix compilation
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Work around analysis warnings
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix installer project
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix memory issues in libbpf implementation
Found my latest usersim code
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update usersim to latest
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix mismatched calloc/free function in ubpf_user.c
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix mismatched alloc/free in verifier_fuzzer
The verifier_fuzzer used ebpf_allocate() but then called free()
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Temporarily use ubpf branch with memory fix
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix memory issues in ebpfsvc
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* PR feedback from Anurag
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
---------
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Use usersim as DLL
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Convert usersim to a DLL
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Make cmake build clear program info state like VS build does
PR #1192 updated the vcxproj file but not the corresponding CMakeLists.txt file
for export_program_info
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Pick up latest usersim fix
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix deadlock in epoch_test_stale_items test
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Don't throw exceptions in unit tests
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix single instance hook initialization in test cases
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix deadlock in performance test
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add usersim.dll to installer files
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
---------
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add map_in_map_legacy.c
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Make bpf2c maps parser match verifier's maps parser
The verifier will parse "maps/*" sections, and is able to deal with
maps sections with various record sizes. This PR updates bpf2c to
use the same algorithm. In the future it would be good to refactor
the verifier so the same code can be used.
Fixes#900
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Make tests pass
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* PR feedback
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Rename map_in_map_* samples
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix BTF ID resolution
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* PR feedback
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Cleanup
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Bug fixes
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add doc fix
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update verifier
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Updates for libbtf
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Use libbtf
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix sanitize build by using updated libbtf
Temporarily point to fork until https://github.com/vbpf/ebpf-verifier/pull/515
is merged, so we can verify the fix in CI/CD.
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update ebpf-verifier
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* PR feedback
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
---------
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Remove JIT and interpreter code from NativeOnly builds
Fixes#2030Fixes#2488
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Try conditional project references
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Various test fixes
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Native-only fixes to deploy-ebpf.ps1
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Native-only support for setup-ebpf.ps1
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Native-only support for api_test.exe
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add connect_redirect_tests to deploy-ebpf.ps1
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* PR feedback from Anurag
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
---------
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add stress test for tail calls
* Added the code generated bindmonitor_mt_tailcall files
* Added the test case description to readme.md
* Update tests/stress/km/stress_tests_km.cpp
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* Update tests/stress/km/stress_tests_km.cpp
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* Addressed PR comments and Fixed merge conflicts with latest
* Fixed function name
* Regenerated the expected files, after the macro MAX TAIL CNT change done yesterday
* Update tests/stress/readme.md
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* Removed clean_up tail call
* Add bind in loop
* updated the readme
* Addressed PR comments
* Changed LOG_VERBOSE to LOG_ERROR
* Updated readme and addressed PR comment
---------
Co-authored-by: Dave Thaler <dthaler@microsoft.com>