no need for the complexity, as it is only for vendor now
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia807f7ee8aeca25d92e60e46f180ffe536eef87c
Maciej Żenczykowskicommited 2025-06-17 04:18:41 -07:00
These directories are not populated on real devices
and are not part of the test suite.
This change removes them from the BPF loader.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I719d0feb9ef1a6f0a1e41265af47916410590ac7
Maciej Żenczykowskicommited 2025-06-16 01:28:45 -07:00
this has moved to mainline via apex
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I77e6ae3248ce1aa1ee20c9ab834516053cac5d16
Maciej Żenczykowskicommited 2025-03-10 18:24:05 -07:00
With the addition of aosp/3294153, we no longer need the c logging
functionality exposed to rust, so remove them
Bug: 359646531
Test: Manual
Change-Id: Ia6f61263f3315fe7dd3533556d9a5fdd2726a2b3
Signed-off-by: Neill Kapron <nkapron@google.com>
Create new memevents subdirectory to contain bpf related files for
libmemevents. Memevents-bpf are used to listen to kernel tracepoints
(BPF_PROG_TYPE_TRACEPOINT), and skfilter bpf progrs to inject mock data
for testing purposes (BPF_PROG_TYPE_SOCKET_FILTER).
Test: Verified memevents-bpf files are loaded in new subdir
Bug: 330396528
Change-Id: I57f7738f6a9eb18293cf9c51e0d1da2b2c1ebfe4
Signed-off-by: Carlos Galo <carlosgalo@google.com>
Needs to be before program loading, this should eventually allow loading programs in parallel.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I95933a5ffbe2230c19d0f91c167e1256ea2f3713
Maciej Żenczykowskicommited 2024-08-13 20:04:18 +00:00
Should make integration with BpfLoader written in rust easier.
While at it add simple wrappers around ALOG{V,D,I,W,E}(),
which may come in handy as bpfloader runs early enough that
logging must be to the kernel dmesg ringbuffer instead...
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia49c605bae63241b74d04e2e0f58fd089c23993d
Maciej Żenczykowskiauthored and Neill Kaproncommited 2024-08-07 21:20:02 +00:00
Prep work to make legacy BpfLoader usable as a library from rust.
Note: fixups to make this actually build will be in the next commit.
Generated via:
cd //system/bpf/loader
echo >> Loader.cpp
cat BpfLoader.cpp >> Loader.cpp
rm BpfLoader.cpp
Test: will not build, requires followup
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id3a942bd0d217f3b689f165666b73e1f2834d33f
Maciej Żenczykowskicommited 2024-08-06 15:25:56 -07:00
The only non-test use of the library is the BpfLoader,
so it makes sense for everything to use the same tag.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iddc0472a39db292fef31b2e195b3ab919d884f7d
Maciej Żenczykowskicommited 2024-05-01 05:17:05 -07:00
Move setting 'bpf.progs_loaded' property to 1 into mainline.
This doesn't terribly matter, but it gives mainline bpf loading
code a chance to run after platform and perform any required
finalization.
While at it also use distinctive error return values,
as these are often the only thing that init reports about
a bpfloader failure.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If502cf07c8ceed306c18821075a92f99437da4dd
Maciej Żenczykowskicommited 2024-04-30 23:53:07 -07:00
Should speed up boot time - especially if serial console is enabled.
There's probably still enough information available to debug issues,
as any errors (which basically shouldn't happen) are still all
extensively logged.
Either way, as this now only loads platform bpf .o files, anyone seeing
boot time problems can simply flash a custom build with changes to the
platform BpfLoader to enable any extra logging as needed.
(Note that AFAICT normally ALOGV() is basically ignored)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5e404ae14c33ee319c07be42defdc270b15a54fe
Maciej Żenczykowskicommited 2024-04-30 22:37:04 -07:00
I've *never* ended up using this information...
Test: builds
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I621d32fb235e9cd88989e99536485674c74fa884
Maciej Żenczykowskicommited 2024-03-11 04:01:21 +00:00
For platform bpf .o files per-map/prog selinux context can simply
be added by genfscon selinux policy modifications.
(while per-map/prog pin dir really only exists to support the selinux context)
Test: TreeHugger
Both before and after this patch 'adb shell find /sys/fs/bpf | wc -l' returns 103
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic700db2870c16a04c9498e529519051a672a28c8
Maciej Żenczykowskicommited 2024-03-11 04:01:07 +00:00
The only (real) user is the platform bpfloader binary.
This is a library purely to facilitate testing.
It's easier to develop / code-search if everything is in the same directory.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iebe8a5c4f8bb9ada220acec6ed8c1be0fc9d438c
Maciej Żenczykowskicommited 2024-03-11 04:00:13 +00:00