summaryrefslogtreecommitdiff
path: root/common/native/bpf_headers
Commit message (Collapse)AuthorAgeFilesLines
* support per-map/prog selinux context and cross .o map sharingMaciej Żenczykowski2022-06-212-22/+68
| | | | | | | | | | | | | | | | Tested in pieces in aosp/master and it still successfully boots. So the struct extension infrastructure works as desired. This is a sqaush of 2 aosp/master commits: 64005dd91b0cf1722ccd1767f805e0524010920e a5c641141ff74bba025a65451628308c6cbb7e0f Ignore-AOSP-First: squash of 2 aosp/master patches Bug: 218408035 Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I7136253086eaccf79cf39e7a0143b425a1019390
* BpfMap - add BpfMapRO.init() supportMaciej Żenczykowski2022-06-211-18/+29
| | | | | | | | | | | | | | | | | Really we need to fix the inheritance to make BpfMapRO the parent class of BpfMap: but that's a far more difficult thing to do, so in the short term we punt like this. This makes BpfMapRO a little bit more usable, and allows a slow transition across the codebase... Bug: 218408035 Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I1c5112db70e9e523c113cba536fbe19422b4d3f3 (cherry picked from commit b54659706758641a0ff01770644cb189e3959b29) Merged-In: I1c5112db70e9e523c113cba536fbe19422b4d3f3
* Merge "bpf_helpers.h - add #define's for S/T bpfloader versions" into tm-devMaciej Żenczykowski2022-06-211-0/+11
|\
| * bpf_helpers.h - add #define's for S/T bpfloader versionsMaciej Żenczykowski2022-06-211-0/+11
| | | | | | | | | | | | | | | | | | | | | | (by request from Lorenzo) Bug: 218408035 Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I802d2aae8b103375d7cbe0ed5c35f0abf6c04ac9 (cherry picked from commit 974ee86ff71fdfaaa0305d1623efcef1d9a16b21) Merged-In: I802d2aae8b103375d7cbe0ed5c35f0abf6c04ac9
* | BpfMap key/value access size verificationMaciej Żenczykowski2022-06-211-9/+32
| | | | | | | | | | | | | | | | | | | | | | (beginning there of) Bug: 218408035 Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ie7cf8cd51b4e272fc76a281df6231ed27955ed3f (cherry picked from commit 62315472e581ea119fb8f44d3a03b41a8ca80b3b) Merged-In: Ie7cf8cd51b4e272fc76a281df6231ed27955ed3f
* | cache kernelVersion(), make isAtLeastKernelVersion() cheaperMaciej Żenczykowski2022-06-211-1/+6
|/ | | | | | | | | | | | not perfect due to this being in a header file, so multiple copies potentially exist, but it's really simple, and works nearly as well. Bug: 218408035 Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Id90c6933d57bc12f4dd640c8918fd0885c7474cf (cherry picked from commit 9d481287aa69200a36c997200e71232b77234b0a) Merged-In: Id90c6933d57bc12f4dd640c8918fd0885c7474cf
* BpfMap: simplify .init() mMapFd assignmentMaciej Żenczykowski2022-06-201-1/+1
| | | | | | | | | | | this way is more obviously not calling dup_with_cloexec Bug: 218408035 Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I4e1ce3b0a42ccea638332ae451e291e025d57895 (cherry picked from commit 703e4682444dcab121f9657dc5c1605a7bcce65e) Merged-In: I4e1ce3b0a42ccea638332ae451e291e025d57895
* BpfMap: introduce resetMap(type, entries, flags)Maciej Żenczykowski2022-06-081-0/+17
| | | | | | | | | | | | | to replace less safe uses of BpfMap.reset(create(type, keysize, valuesize, entries, flags)) Meant to be used in tests only. Bug: 235286176 Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I869f1f935bcf5d00702c42bc46d6094ea552addc (cherry picked from commit d2dec08c73b2bc1dd2a3969ccb504a59e9cb223f) Merged-In: I869f1f935bcf5d00702c42bc46d6094ea552addc
* Allow use of shared bpf headers by recoveryStephane Lee2022-03-091-0/+1
| | | | | | | | This will allow healthd to filter uevent packets, if needed Bug: 203462310 Test: Ensure that healthd can build if it uses bpf filters Change-Id: I97bfe9509a6934444f656508176495bba38381be
* BpfUtils.h - switch to GTEST_SKIP in all 4 SKIP macrosKen Chen2022-03-021-26/+16
| | | | | | | | | patch the missing commit I3acb47a432378f257418f81b26516e18d6ff3780. Test: TreeHugger, atest libbpf_android_test netd_unit_test netd_integration_test Change-Id: I6b7114584759c0689e0d6b852387b93a799f663f
* switch from libbpf_android to bpf_headersMaciej Żenczykowski2022-02-091-1/+1
| | | | | | Test: TreeHugger, atest libbpf_android_test Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I215ac3c5d4820bfef94a48024d511ea86012eb0f
* bpf_headers/bpf_syscall_wrappers - remove visibility restrictionsMaciej Żenczykowski2022-02-091-23/+0
| | | | | | | | this doesn't appear to make sense now that it's available to vendors Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: If2d24fa8eccfb5c12832fb191a8560b024751db7
* bpf_headers for vendor.Steven Moreland2022-02-082-2/+2
| | | | | | | | For waitForProgsLoaded. Bug: 162057235 Test: build, load bpf program from vendor Change-Id: Ib670aada0a98249fed21beb72879326286b2f4c2
* libclat: Use space indentation instead of tabHungming Chen2022-01-251-1/+1
| | | | | | | | | Correct the indentation style of libclat in the follows bpf_headers/Android.bp bpf_syscall_wrappers/Android.bp Test: build Change-Id: I7cdd354141124fa8f7b4a864ddd937bef4676302
* Merge "Add BPF_ANNOTATE_KV_PAIR to BPF map definition macros"Maciej Żenczykowski2022-01-251-0/+10
|\
| * Add BPF_ANNOTATE_KV_PAIR to BPF map definition macrosConnor O'Brien2022-01-201-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | BPF_ANNOTATE_KV_PAIR is used by libbpf to associate each map with its BTF information. This is ignored for programs compiled without BTF information. Bug: 203823368 Test: build & boot; confirm all bpf progs load successfully Test: compile time_in_state.o with -g; confirm BTF is loaded Signed-off-by: Connor O'Brien <connoro@google.com> Change-Id: I45f294945d48106d39d1d105ac4f49311459a19d
* | Merge changes from topic "configure_bpf_for_clat"Maciej Żenczykowski2022-01-241-0/+1
|\ \ | | | | | | | | | | | | | | | * changes: make bpf_headers visible to libclat make bpf_syscall_wrappers visible to libclat
| * | make bpf_headers visible to libclatHungming Chen2022-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed because ClatdController and clatd binary are moved into apex. libclat is used for accessing BPF map. Bug: 212345928 Test: manual test 1. Connect to ipv6-only wifi. 2. Try IPv4 traffic. $ ping 8.8.8.8 Change-Id: If3fb00e12ef365ccf3ac782c4e6ecbfd01d2dd4c
* | | Clean up bpf_headers visibilityKen Chen2022-01-231-1/+0
|/ / | | | | | | | | | | | | | | | | | | The bpf_headers no need to explicitly specify visibility for system/netd/libnetdbpf. The libnetdbpf depends on bpf_connectivity_headers, which exports bpf_headers already. Bug: 202086915 Test: m Change-Id: I09a073b14dc74511ba9dc09a89ae6e89dff51f4d
* | Add bpf_headers visibility for CtsNativeNetPlatformTestCasesKen Chen2022-01-151-0/+1
| | | | | | | | | | | | | | | | | | The CtsNativeNetPlatformTestCases uses BpfUtils.h in bpf_headers. Bug: 29761778 Bug: 202086915 Test: atest CtsNativeNetPlatformTestCases on signed user build Change-Id: Ibbb10392a283b88328ae17d9aa54322f50878e76
* | [NETD-TC#12] Fix dependency on libtraffic_controllerWayne Ma2022-01-141-0/+1
|/ | | | | | | | | 1. Add visibility for libtraffic_control 2. Add com.android.tethering into apex_available statement Bug: 202086915 Test: m; flash; boot Change-Id: I817e22c24dd205f09ef62a2a7ff85b2a970f6d3a
* bpf_connectivity_headers -> bpf_headers -> bpf_syscall_wrappersMaciej Żenczykowski2021-12-281-1/+5
| | | | | | Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Idf158fa33670522b43e34c67a77087648b8b97a4
* [NETD-BPF#23] Move a few headers to frameworks/libs/netKen Chen2021-12-232-0/+393
| | | | | | | | | | BPF headers used by both platform and mainline modules should be in frameworks/libs/net. Bug: 202086915 Test: build and boot Test: cd packages/modules/Connectivity/netd; atest Change-Id: Ie6f257b022cdea6bab3389a9fa41791f893e54c3
* Rename bpf_map_utils to bpf_headersKen Chen2021-12-216-0/+779
Use a generic name so that it can contain more bpf related headers. Bug: 202086915 Test: build Change-Id: I5a76948db394d8d7bb6eaedb570a2ca5bc99a289