(instead of in platform bpfloader)
Better to do it earlier so we can use it for
auto/permanently pinned/attached networking programs.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I202e150e6d48e63ba643c1bd2247cefcdebc07a5
should never fail, since we now have M-2024-1 module prebuilts:
$ adb shell ls -d /apex/com.android.tethering*
/apex/com.android.tethering
/apex/com.android.tethering@341310230
Test: TreeHugger, manually on a Pixel device
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib145fba8e3c47bc300f4589723d9c80749770a19
(this will land in M-2024-05 ie. May mainline tethering module)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I250b691eb03751da05ce10d41d6721f4964dd1d5
(super useful for debugging)
Sample output:
I NetBpfLoad: NetBpfLoad '/apex/com.android.tethering/bin/netbpfload' starting...
I NetBpfLoad: NetBpfLoad api:10000/34 kver:6010019 platform:0 mainline:1
D NetBpfLoad: Found Tethering Apex mounted from blockdev /dev/block/dm-55
I NetBpfLoad: Tethering APEX version 340090000
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iaf1bc22b02913ea21ff9368abd9933e6ef4017f1
netbpfload.mainline.rc is derived from:
initrc-doc/bpfloader-sdk34-14-U.rc,
except that it is 'override' instead of 'updatable' and uses
the apex netbpfload instead of the platform bpfloader.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1ecf14e3d927ece136a0669a9b209be7112e55b5
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.
For more details please refer to the link below,
<add g3 doc link>
Bug: 304529413
Test: N/A
Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5
Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5
proc file writes were only moved from .rc into bpfloader binary in U.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I20eda71d4f4e16130401d1cfff239c7cd8ea9bf6
I think it's better to just put this in bpfloader.rc,
where we can guarantee the correct ordering.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie2c5ab1cb1de015397ac54867ae6bb0c4321d207
No need for this, as we simply only support those selinux
contexts (and directories) which are available to networking.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I35b134c57411f82514b9f7148411f83d3aee1927
(it's already created by the platform bpfloader)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie22f585cab17fd2bded3d97a9cfe1019b792b69d
No need for this, as we simply only support network
program types in the first place.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I163e21fd4d4089882cf37fc68bc4299003b514d7
We are unlikely to ever be willing to load these
program types from mainline, as it is simply too dangerous.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1b0943d39b8131699f4606e8d165f3c944d453ed
These are unmodified files, without history.
Getting these to do something useful will come later.
Generated via:
cp //system/bpf/bpfloader/bpfloader.rc netbpfload.rc
cp //system/bpf/bpfloader/BpfLoader.cpp NetBpfLoad.cpp
cp //system/bpf/libbpf_android/include/libbpf_android.h loader.h
cp //system/bpf/libbpf_android/Loader.cpp loader.cpp
Change-Id: I1677b899a51e1289a7a9806d6f5c34450b9e7c47