Snap for 12327203 from ce4d3e8f2af77218a8c22246646b43d8e1d7a5dc to 24Q4-release
Change-Id: I771f8ff7e951184360958e9e2c84b8edc0ee8966
diff --git a/loader/Loader.cpp b/loader/Loader.cpp
index 3eac78d..cf6bf36 100644
--- a/loader/Loader.cpp
+++ b/loader/Loader.cpp
@@ -877,6 +877,11 @@
BPF_PROG_TYPE_UNSPEC, // Will be replaced with fuse bpf program type
};
+constexpr bpf_prog_type kMemEventsAllowedProgTypes[] = {
+ BPF_PROG_TYPE_TRACEPOINT,
+ BPF_PROG_TYPE_SOCKET_FILTER,
+};
+
constexpr bpf_prog_type kUprobestatsAllowedProgTypes[] = {
BPF_PROG_TYPE_KPROBE,
};
@@ -897,6 +902,13 @@
.allowedProgTypes = kPlatformAllowedProgTypes,
.allowedProgTypesLength = arraysize(kPlatformAllowedProgTypes),
},
+ // memevents
+ {
+ .dir = "/system/etc/bpf/memevents/",
+ .prefix = "memevents/",
+ .allowedProgTypes = kMemEventsAllowedProgTypes,
+ .allowedProgTypesLength = arraysize(kMemEventsAllowedProgTypes),
+ },
// uprobestats
{
.dir = "/system/etc/bpf/uprobestats/",
diff --git a/progs/bpfRingbufProg.c b/progs/bpfRingbufProg.c
index c189e6c..4f268bf 100644
--- a/progs/bpfRingbufProg.c
+++ b/progs/bpfRingbufProg.c
@@ -21,9 +21,7 @@
#define TEST_RINGBUF_MAGIC_NUM 12345
// This ring buffer is for testing purposes only.
-DEFINE_BPF_RINGBUF_EXT(test_ringbuf, __u64, 4096, AID_ROOT, AID_ROOT, 0660, "", "", PRIVATE,
- BPFLOADER_MIN_VER, BPFLOADER_MAX_VER,
- LOAD_ON_ENG, LOAD_ON_USER, LOAD_ON_USERDEBUG);
+DEFINE_BPF_RINGBUF(test_ringbuf, __u64, 4096, AID_ROOT, AID_ROOT, 0660);
// This program is for test purposes only - it should never be attached to a
// socket, only executed manually with BPF_PROG_RUN.