Ken Chen
a7d95946ef
Merge "[NETD_BPF#8] Move BpfUtils.cpp to BpfUtils.h" am: edfca8b548
am: eb3273cd75
am: 9f3e43abb6
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1869327
Change-Id: I46ecac9bbda4a674d82421bf04c8e8ae752a1c45
2021-12-03 09:50:47 +00:00
Ken Chen
9f3e43abb6
Merge "[NETD_BPF#8] Move BpfUtils.cpp to BpfUtils.h" am: edfca8b548
am: eb3273cd75
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1869327
Change-Id: I90537fbab5aaa70a29a28b84fe664451af727818
2021-12-03 09:33:48 +00:00
Ken Chen
eb3273cd75
Merge "[NETD_BPF#8] Move BpfUtils.cpp to BpfUtils.h" am: edfca8b548
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1869327
Change-Id: Ie5613d2a86e8b32866b3a4dd91a1d64e6d9b0ee9
2021-12-03 09:20:00 +00:00
Ken Chen
5b0fbc192e
[NETD-BPF#10] Add WaitForProgsLoaded.h
...
Move waitForProgsLoaded() from libbpf_android.h to a single header file.
A transitional commit of separating headers, utilities from bfploader.
Bug: 202086915
Test: build; flash; cd system/netd; atest
Change-Id: Ief1bcd09e973f952c29859a7a8fba92c8626e32d
2021-12-03 08:16:24 +00:00
Ken Chen
edfca8b548
Merge "[NETD_BPF#8] Move BpfUtils.cpp to BpfUtils.h"
2021-12-03 08:15:06 +00:00
Android Build Coastguard Worker
f0f8df244e
Snap for 7953399 from 705b1ec89e
to tm-release
...
Change-Id: I89f4b7f6b4861b5f5e917e52483c6b737e16cae7
2021-11-30 02:10:38 +00:00
Paul Lawrence
705b1ec89e
Support fuse prog types am: 9548f9fbed
am: f691bedf1d
am: 3c639df877
am: 848edf331f
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1894086
Change-Id: I1ccad4b88b6848ceada5f7669add3ed9ba6050b1
2021-11-29 17:14:40 +00:00
Paul Lawrence
848edf331f
Support fuse prog types am: 9548f9fbed
am: f691bedf1d
am: 3c639df877
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1894086
Change-Id: I88f01738e70527c69f3fe1e82dba86c728447e02
2021-11-29 16:58:46 +00:00
Paul Lawrence
3c639df877
Support fuse prog types am: 9548f9fbed
am: f691bedf1d
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1894086
Change-Id: I169e46cf1a07dc9330dd5346a0b5f1cd690b004a
2021-11-29 16:45:04 +00:00
Paul Lawrence
f691bedf1d
Support fuse prog types am: 9548f9fbed
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1894086
Change-Id: I87b30e592b2104c302aa09721b7683eed08f096b
2021-11-29 16:33:04 +00:00
Paul Lawrence
9548f9fbed
Support fuse prog types
...
When fuse-bpf lands in the kernel, support reading its bpf program type
from /sys/fs/fuse/bpf_prog_type_fuse and load such programs.
This is to allow development of fuse-bpf to continue, and is needed
until such time as fuse-bpf is upstreamed and this value is fixed.
Bug: 202785178
Test: Along with change to bpfprogs, prog_fuse_media_fuse_media appears
in /sys/fs/bpf
Change-Id: I83636f25b0a0c678b3ee48c6450d9c8dc157387b
2021-11-23 00:28:12 +00:00
Ken Chen
02c2536103
[NETD_BPF#8] Move BpfUtils.cpp to BpfUtils.h
...
Functions in BpfUtils.cpp are trivial, they can be static inlined
in BpfUtils.h.
Bug: 202086915
Test: m; flash; boot; cd system/netd && atest
Test: m gpuservice_unittest libtimeinstate_test bpf_module_test
CtsAppOpsTestCases libmeminfo_test VtsBootconfigTest
vts_test_binary_bpf_module
Change-Id: Ie1ece23b6fc9a4db5fc95930209a10da1e528cb5
2021-11-21 10:59:39 +08:00
Android Build Coastguard Worker
6506790316
Snap for 7933753 from 9258fd40ae
to tm-release
...
Change-Id: I007bfc76bd4366646e57bff503a2ec4a9bad837a
2021-11-20 04:10:19 +00:00
Maciej Żenczykowski
9258fd40ae
fix 'cgroupsockaddr' support am: 2b203138cb
am: cb9d56d7f8
am: ef6a079d07
am: f4858cf090
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1897227
Change-Id: I5e56a302c2261fcf9295fac45ae1ee6313f5c97f
2021-11-19 13:37:29 +00:00
Maciej Żenczykowski
f4858cf090
fix 'cgroupsockaddr' support am: 2b203138cb
am: cb9d56d7f8
am: ef6a079d07
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1897227
Change-Id: Ic93093c9b16b516b524b2373da5d2dd3e2a5e1a3
2021-11-19 13:23:50 +00:00
Maciej Żenczykowski
ef6a079d07
fix 'cgroupsockaddr' support am: 2b203138cb
am: cb9d56d7f8
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1897227
Change-Id: I335cb59b41867cfece23d064de071eb1fed007ff
2021-11-19 13:07:42 +00:00
Maciej Żenczykowski
cb9d56d7f8
fix 'cgroupsockaddr' support am: 2b203138cb
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1897227
Change-Id: Ie824bebe88bd9edd4a958060a1aa0bdb7422fe78
2021-11-19 12:56:41 +00:00
Maciej Żenczykowski
2b203138cb
fix 'cgroupsockaddr' support
...
... it does prefix matching - and first match wins.
By appending / to the strings this no longer matters.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I54f41fbccd2632334adb9d1ae4fcc44cd1b0141f
2021-11-19 11:18:57 +00:00
Maciej Żenczykowski
82e4d04640
document how to debug bpfloader failures am: e49e0c60cd
am: cd132dc1fc
am: 298d16e28c
am: 70b2d210eb
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1896605
Change-Id: I673ea45fb1323e705b8874c48b4077f975b5768f
2021-11-19 02:16:11 +00:00
Android Build Coastguard Worker
fa0108820c
Snap for 7930058 from feecc6d2b9
to tm-release
...
Change-Id: I86e3ae122e1afe4cfca5e7ebe57b3c1942ed81b0
2021-11-19 02:09:47 +00:00
Maciej Żenczykowski
70b2d210eb
document how to debug bpfloader failures am: e49e0c60cd
am: cd132dc1fc
am: 298d16e28c
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1896605
Change-Id: I40bc752c4384e93c0d70f15724668ea1571c1e1a
2021-11-19 02:02:58 +00:00
Maciej Żenczykowski
298d16e28c
document how to debug bpfloader failures am: e49e0c60cd
am: cd132dc1fc
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1896605
Change-Id: I0ea803dd88b137dab3803783343f9931bdf2bb6f
2021-11-19 01:50:29 +00:00
Maciej Żenczykowski
cd132dc1fc
document how to debug bpfloader failures am: e49e0c60cd
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1896605
Change-Id: Ib243829d791547f7680ca0c78111616e6c6377c6
2021-11-19 01:33:46 +00:00
Maciej Żenczykowski
e49e0c60cd
document how to debug bpfloader failures
...
Test: N/A
Bug: 204131517
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia6a8ca026f3ab403443e130dceb2aca0ce0f2343
2021-11-19 01:18:12 +00:00
Maciej Żenczykowski
feecc6d2b9
Merge "add mainline module support for targetting only newer bpfloader versions" am: 210d6be5ac
am: c50acfa7b9
am: d87a5be05f
am: e7f7b4907e
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895608
Change-Id: Ie34f4b666ebcd607f8b3d8ec0841c567e3583016
2021-11-18 08:18:26 +00:00
Treehugger Robot
d0b6b9f571
Merge "rename SEC() to SECTION()" am: bc8df444d1
am: bab48348a4
am: 453f93e9db
am: 458b630552
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895607
Change-Id: Ic282866c1f0f8bb068d434685b975af3bf07aab3
2021-11-18 08:17:18 +00:00
Maciej Żenczykowski
e7f7b4907e
Merge "add mainline module support for targetting only newer bpfloader versions" am: 210d6be5ac
am: c50acfa7b9
am: d87a5be05f
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895608
Change-Id: Ib8387ebcfbf6ae436db7a36b23c466d08119a7a2
2021-11-18 07:58:43 +00:00
Treehugger Robot
458b630552
Merge "rename SEC() to SECTION()" am: bc8df444d1
am: bab48348a4
am: 453f93e9db
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895607
Change-Id: Ic84ea528924826a79c7e885eb73041b415c658bc
2021-11-18 07:58:35 +00:00
Maciej Żenczykowski
d87a5be05f
Merge "add mainline module support for targetting only newer bpfloader versions" am: 210d6be5ac
am: c50acfa7b9
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895608
Change-Id: I36b582d3e23283373b0fbdf9db9ff79b029210b0
2021-11-18 07:47:04 +00:00
Treehugger Robot
453f93e9db
Merge "rename SEC() to SECTION()" am: bc8df444d1
am: bab48348a4
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895607
Change-Id: If4ebb24ddb95a5178d1386bdf961c87d9652b365
2021-11-18 07:47:00 +00:00
Maciej Żenczykowski
c50acfa7b9
Merge "add mainline module support for targetting only newer bpfloader versions" am: 210d6be5ac
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895608
Change-Id: I8cc973f23b777f39fa399db2ed345c066ee15d3f
2021-11-18 07:31:03 +00:00
Treehugger Robot
bab48348a4
Merge "rename SEC() to SECTION()" am: bc8df444d1
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895607
Change-Id: I0f8bd3f270c5988e90c941c1cd3b507149a17a43
2021-11-18 07:30:54 +00:00
Maciej Żenczykowski
210d6be5ac
Merge "add mainline module support for targetting only newer bpfloader versions"
2021-11-18 07:19:28 +00:00
Treehugger Robot
bc8df444d1
Merge "rename SEC() to SECTION()"
2021-11-18 07:18:54 +00:00
Maciej Żenczykowski
1a03d8bf6b
Always use OWNERS from master branch. am: fbe8caf45a
am: d392956d00
am: 20f6dd2d3a
am: e623916e71
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895601
Change-Id: I36ba45a54c32a8adf339525dbe0d6d5b1977a5bb
2021-11-18 06:23:09 +00:00
Maciej Żenczykowski
e623916e71
Always use OWNERS from master branch. am: fbe8caf45a
am: d392956d00
am: 20f6dd2d3a
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895601
Change-Id: I88c80df52e768455bfdf44577713c0a215f044ae
2021-11-18 06:10:44 +00:00
Maciej Żenczykowski
20f6dd2d3a
Always use OWNERS from master branch. am: fbe8caf45a
am: d392956d00
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895601
Change-Id: Ib40966a155bf2ac2e65f849e3803ba3ca70d3ad2
2021-11-18 05:52:54 +00:00
Maciej Żenczykowski
41661a10e3
add mainline module support for targetting only newer bpfloader versions
...
This will allow shipping .o's targetting only T and not S devices.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I651b4442625df9011ff7c5ad283943caae579565
2021-11-18 05:47:24 +00:00
Maciej Żenczykowski
3adb1d5569
rename SEC() to SECTION()
...
The only purpose of this is to break cut-and-paste of examples
that use SEC() causing people to think things through, look
at Android bpf program examples and use a better macro.
In particular programs with SEC("license") / SEC("maps") need to be
changed to use LICENSE("license") and the map helpers or the map
section is wrong and cannot be correctly parsed by the bpfloader.
Generated via:
git grep 'SEC\(' | cut -d: -f1-2 | while read i; do mcedit $i; done
and manually editting found locations
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Idb333967e054e096fe74f910a5f8aaf1d6c5dc81
2021-11-18 05:45:21 +00:00
Maciej Żenczykowski
d392956d00
Always use OWNERS from master branch. am: fbe8caf45a
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1895601
Change-Id: I6ef20684debb86f7c4b736193804ab01a8c78b6a
2021-11-18 05:42:29 +00:00
Maciej Żenczykowski
fbe8caf45a
Always use OWNERS from master branch.
...
Since you cannot include yourself we need an extra level of indirection,
to make sure that OWNERS remains current even in historical branches.
Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie3a4903cd4b115eddb60c75b00534e9a4fdcedda
2021-11-17 10:51:28 -08:00
Android Build Coastguard Worker
ad204119a8
Snap for 7912506 from de273ee1b7
to tm-release
...
Change-Id: I8fad6eef248cecaace3283fe874aab6723da924a
2021-11-13 04:09:49 +00:00
Maciej Żenczykowski
de273ee1b7
BpfUtils.h - switch to GTEST_SKIP in all 4 SKIP macros am: 5460527c74
am: 4273296e72
am: 959ccaba1d
am: f9704b7868
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1888239
Change-Id: I1203298688941642ed2e4bd9c79b5b8b4785f168
2021-11-12 10:07:26 +00:00
Maciej Żenczykowski
f9704b7868
BpfUtils.h - switch to GTEST_SKIP in all 4 SKIP macros am: 5460527c74
am: 4273296e72
am: 959ccaba1d
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1888239
Change-Id: Ib833a7647e36c29ca5aefeff3d494fa76d409abb
2021-11-12 09:54:38 +00:00
Maciej Żenczykowski
959ccaba1d
BpfUtils.h - switch to GTEST_SKIP in all 4 SKIP macros am: 5460527c74
am: 4273296e72
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1888239
Change-Id: I4afcf1529820587e2ee79991a877d2034643ef59
2021-11-12 09:44:26 +00:00
Maciej Żenczykowski
4273296e72
BpfUtils.h - switch to GTEST_SKIP in all 4 SKIP macros am: 5460527c74
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1888239
Change-Id: Icd8bffdbfbc141d21d269d9ccc993b620d7bfbf9
2021-11-12 09:26:36 +00:00
Android Build Coastguard Worker
5a0bc2b583
Snap for 7908497 from 08ccb120f6
to tm-release
...
Change-Id: I2e70ff6e67bdb8dc3f01d1ff4f6b6bc3e06382a9
2021-11-12 02:10:23 +00:00
Maciej Żenczykowski
5460527c74
BpfUtils.h - switch to GTEST_SKIP in all 4 SKIP macros
...
Test: TreeHugger, atest libbpf_android_test netd_unit_test netd_integration_test
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I3acb47a432378f257418f81b26516e18d6ff3780
2021-11-11 11:54:02 -08:00
Maciej Żenczykowski
08ccb120f6
bpfloader.rc: set /proc/sys/kernel/unprivileged_bpf_disabled to 0 am: fa03239a81
am: 04a70b8dda
am: 7e399c7847
am: 6ce5b01775
am: e083936b1f
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1887534
Change-Id: I3cc0acfca798918b053109614a9ec6007aa912cb
2021-11-11 13:41:13 +00:00
Maciej Żenczykowski
e083936b1f
bpfloader.rc: set /proc/sys/kernel/unprivileged_bpf_disabled to 0 am: fa03239a81
am: 04a70b8dda
am: 7e399c7847
am: 6ce5b01775
...
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/1887534
Change-Id: Ic7d252f988f096bc07e6966b8eeeaf70f8f2822a
2021-11-11 13:18:54 +00:00