summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2021-01-24 20:23:38 -0800
committerLorenzo Colitti <lorenzo@google.com>2021-02-24 09:31:02 +0900
commit8c794ee2e5cdaeab0ee5f935865f0e8610b58e76 (patch)
tree326209a84a196cca2dc06501fee067aa3f0a9c4a
parentf87f9a3031c766712beabd7531e83dcfd5be3cd2 (diff)
downloadbpf-8c794ee2e5cdaeab0ee5f935865f0e8610b58e76.tar.gz
bpf_helpers - hardcode declaration of bpf_ktime_get_boot_ns()
This is a temporary hack that is needed only in mainline-prod, where the kernel headers are not new enough to define it. Test: m com.android.tethering Signed-off-by: Maciej Żenczykowski <maze@google.com> Merged-In: I87f344c779d89cebe9a0d09dc466966ca7fda1a6 Change-Id: I281a25d0a2f3d1c265599c78c58c47b6f234425f
-rw-r--r--progs/include/bpf_helpers.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/progs/include/bpf_helpers.h b/progs/include/bpf_helpers.h
index 6538221..f09ec83 100644
--- a/progs/include/bpf_helpers.h
+++ b/progs/include/bpf_helpers.h
@@ -102,7 +102,8 @@ static int (*bpf_map_delete_elem_unsafe)(const void* map,
static int (*bpf_probe_read)(void* dst, int size, void* unsafe_ptr) = (void*) BPF_FUNC_probe_read;
static int (*bpf_probe_read_str)(void* dst, int size, void* unsafe_ptr) = (void*) BPF_FUNC_probe_read_str;
static unsigned long long (*bpf_ktime_get_ns)(void) = (void*) BPF_FUNC_ktime_get_ns;
-static unsigned long long (*bpf_ktime_get_boot_ns)(void) = (void*)BPF_FUNC_ktime_get_boot_ns;
+// TODO: change to BPF_FUNC_ktime_get_boot_ns in sc-mainline-prod.
+static unsigned long long (*bpf_ktime_get_boot_ns)(void) = (void*)125;
static int (*bpf_trace_printk)(const char* fmt, int fmt_size, ...) = (void*) BPF_FUNC_trace_printk;
static unsigned long long (*bpf_get_current_pid_tgid)(void) = (void*) BPF_FUNC_get_current_pid_tgid;
static unsigned long long (*bpf_get_current_uid_gid)(void) = (void*) BPF_FUNC_get_current_uid_gid;