aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-28 15:57:22 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-28 15:57:22 +0000
commit90d0e43b8dbda9ee56b3afc77d7ef14626e7088d (patch)
tree91a1f8a4374f4eba7a4487d24faf4757daed7e76
parent477398c8596869c3d76f54c9cbeba034ee5884c3 (diff)
parentf60dce0e55842ac7acfedb4a9a14dee74c803245 (diff)
downloadlibbpf-android13-frc-media-release.tar.gz
Snap for 8512216 from f60dce0e55842ac7acfedb4a9a14dee74c803245 to tm-frc-media-releaset_frc_med_330443030android13-frc-media-release
Change-Id: I2d1d4ade8bf1a27deba28d11089fada17a30e261
-rw-r--r--Android.bp4
-rw-r--r--TEST_MAPPING12
-rw-r--r--android/btfloader.cpp2
-rw-r--r--src/skel_internal.h4
4 files changed, 17 insertions, 5 deletions
diff --git a/Android.bp b/Android.bp
index 75ca2ba..7b368a1 100644
--- a/Android.bp
+++ b/Android.bp
@@ -45,10 +45,12 @@ genrule {
"bpf/bpf_helpers.h",
"bpf/bpf_tracing.h",
"bpf/btf.h",
+ "bpf/hashmap.h",
"bpf/libbpf_common.h",
"bpf/libbpf.h",
"bpf/libbpf_legacy.h",
"bpf/libbpf_version.h",
+ "bpf/nlattr.h",
"bpf/skel_internal.h",
"bpf/xsk.h",
],
@@ -82,6 +84,8 @@ cc_library_static {
"libz",
],
visibility: [
+ "//external/bpftool",
+ "//external/bcc/libbpf-tools",
"//external/dwarves",
"//external/stg",
],
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..b6a940b
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,12 @@
+{
+ "presubmit": [
+ {
+ "name": "libbpf_load_test"
+ }
+ ],
+ "hwasan-postsubmit": [
+ {
+ "name": "libbpf_load_test"
+ }
+ ]
+}
diff --git a/android/btfloader.cpp b/android/btfloader.cpp
index 24df4d6..cd82262 100644
--- a/android/btfloader.cpp
+++ b/android/btfloader.cpp
@@ -72,8 +72,8 @@ int main(int argc, char **argv) {
bt->info = (BTF_INFO_KIND(bt->info)) << 24;
}
}
+ if (btf__load_into_kernel(btf)) return kERROR_LOAD_BTF;
}
- if (btf__load_into_kernel(btf)) return kERROR_LOAD_BTF;
btfFd = btf__fd(btf);
if (sendBtfFd(socketFd, btf__fd(btf))) return kERROR_SEND_BTF_FD;
diff --git a/src/skel_internal.h b/src/skel_internal.h
index 2761970..dcd3336 100644
--- a/src/skel_internal.h
+++ b/src/skel_internal.h
@@ -57,9 +57,6 @@ struct bpf_load_and_run_opts {
const char *errstr;
};
-// ANDROID: Since the glibc stub we have does not know about __NR_bpf, this
-// fails to compile. For now, just do not provide this functionality.
-#if 0
static inline int skel_sys_bpf(enum bpf_cmd cmd, union bpf_attr *attr,
unsigned int size)
{
@@ -199,6 +196,5 @@ out:
close(prog_fd);
return err;
}
-#endif
#endif