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

11 Коммитов

Автор SHA1 Сообщение Дата
Alan Jowett 29358e405f
Update ebpf-verifer and fix name changes (#1128)
* Update ebpf-verifer and fix name changes

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

* Fix failing branch

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

Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
2022-05-19 15:36:51 -06:00
Dave Thaler e213b5c963
Add bpf_get_current_pid_tgid() helper (#1107)
* Add bpf_get_current_pid_tgid() helper

Fixes #1106

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

* Fix test

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

* Add KM test

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2022-05-18 20:12:31 -06:00
Alan Jowett 16760b2b3d
Add queue and stack helper functions (#801)
* Add queue and stack helper functions

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2022-03-11 17:16:02 -07:00
Dave Thaler 727451f3b4
Add support for integer arguments to bpf_printk helper (#797)
* Initial printk numeric args support

Also add a verification failure test case if trying to print a pointer

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

* Add varargs support to printk

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

* Validate printk format specifiers

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

* Verify that printk specifier count and arg count match

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

* Update doxygen docs

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

Co-authored-by: saxena-anurag <43585259+saxena-anurag@users.noreply.github.com>
2022-03-10 17:16:45 -08:00
Dave Thaler 08c2cbb9a7
Add support for bpf_printk helper without additional arguments (#796)
* Initial version of bpf_printk support

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

* Convert printk.c sample to use bind hook instead of xdp hook

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

* Add wprp file to deployment script

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

* Unify UM and KM platforms as much as possible for printk support

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

* Fix annotation

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

* Work around compiler warning

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

* Fix comment

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

* Fix keyword

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

* Fix test when -s is used

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2022-03-08 16:38:48 -08:00
Dave Thaler ecf4ac988e
Fix bpf_map_update_elem prototype used by the verifier (#781)
It had four arguments in:
* https://github.com/microsoft/ebpf-for-windows/blob/master/include/bpf_helper_defs.h#L33
* https://github.com/microsoft/ebpf-for-windows/blob/master/libs/execution_context/ebpf_core.c#L1261

but only three arguments in ebpf_general_helpers.c

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2022-02-25 15:44:28 -08:00
Shankar Seal 91e74be955
ring buffer map. (#659)
* ring buffer map.

* PR Feedback iteration 0.

* PR Feedback iteration 1

* Fix race.

* PR Feedback iteration 2

* bugfix.

* Bug fix.

* Fix test issue

* PR Feedback.

* Update libs/api_common/device_helper.cpp

Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2021-12-03 13:19:21 -08:00
Shankar Seal 4dfff59f49
make bpf_csum_diff a global helper. (#625)
* make bpf_csum_diff a global helper.
2021-10-04 11:29:36 -07:00
Alan Jowett bc104c03f3
Add support for bpf_map_lookup_and_delete_elem & BPF_MAP_TYPE_QUEUE (#605)
* Add support for BPF_MAP_TYPE_QUEUE
* Expose bpf_map_lookup_and_delete_elem helper and API

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2021-09-29 18:47:30 -06:00
Alan Jowett 7e12a6f920
Add support for bpf_ktime_get_ns (#511)
* Add support for bpf_ktime_get_ns

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-09-10 12:45:52 -06:00
Shankar Seal dae2a4def5
clean up test code (#492)
* cleanup test code.

* PR feedback.
2021-09-07 08:46:07 -07:00