* Build with WDK as nuget
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* Update test collateral
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* Doc update
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* Add old and new sizes
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>
Other projects can now consume ebpf-for-windows in binary form,
using either nuget or MSI install. We no longer need to build
ebpf-for-windows both ways, so removing the cmake build to free
up build resources and reduce the development cost of maintaining
both msbuild and cmake builds.
Fixes#2743
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>
* Add option to generate .spd files for sample driven PGO
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Fix test failure
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Increase bound on instruction count
And align more with other platforms
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix compiler error
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Remove ebpf_verify_program API
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* Remove old test
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* Cleanup runners
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
* Cleanup old artifacts
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
* Add map-in-map type checking
This PR enforces that all inner maps must be of the same type
as the inner map template used for verification. Other fields
might need to match too, and if so those will be updated in
a subsequent PR once it is confirmed which fields must match.
A few pieces of this PR related to map_id are prerequisites
for issue #396 which will add IDs for programs, maps, and links.
Finally, there are multiple definitions of bpf_map, since the
version used to write eBPF programs is different from what is
stored in memory (which uses map IDs) so to avoid confusion in
code and allow the compiler to do type checking to catch some
bugs, this splits ebpf_map_definition_t into two, one for
in_memory and one for in_file (meaning in an eBPF program).
This will also allow the future PR for issue 396 to be more
understandable, but also aids clarity in some parts of this PR.
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update Getting Started to recommend current release version of Clang/LLVM
Clang-format behaves differently depending on the version of Clang installed.
Update getting started guide to recommend Clang / LLVM 10.0.0.
Update the development guide to indicate that Clang 10 or higher is required for consistent formatting.
Reformat all code using Clang 10.0.0
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Previously some places had "info" and some had "information".
Both appear in dictionaries, so guidance to avoid abbreviations does not apply.
Fixes#314
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Without the annotation, clang-format would convert
`uuid(6bef171d-7205-4b63-a1e5-d00f01e6a0c1)`
to
`uuid(6bef171d - 7205 - 4b63 - a1e5 - d00f01e6a0c1)`
which would be invalid.
Fixes#269
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>