diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp
index 01c02cc..c9bed5e 100644
--- a/bpfloader/BpfLoader.cpp
+++ b/bpfloader/BpfLoader.cpp
@@ -86,12 +86,6 @@
 }
 
 int main() {
-    std::string value = android::base::GetProperty("bpf.progs_loaded", "");
-    if (value == "1") {
-        ALOGI("Property bpf.progs_loaded is set, progs already loaded.\n");
-        return 0;
-    }
-
     if (android::bpf::getBpfSupportLevel() != android::bpf::BpfLevel::NONE) {
         // Load all ELF objects, create programs and maps, and pin them
         loadAllElfObjects();
diff --git a/progs/include/bpf_helpers.h b/progs/include/bpf_helpers.h
index 408a981..3ab68af 100644
--- a/progs/include/bpf_helpers.h
+++ b/progs/include/bpf_helpers.h
@@ -18,7 +18,7 @@
  * Type-unsafe bpf map functions - avoid if possible.
  *
  * Using these it is possible to pass in keys/values of the wrong type/size,
- * or, for 'unsafe_bpf_map_lookup_elem' receive into a pointer to the wrong type.
+ * or, for 'bpf_map_lookup_elem_unsafe' receive into a pointer to the wrong type.
  * You will not get a compile time failure, and for certain types of errors you
  * might not even get a failure from the kernel's ebpf verifier during program load,
  * instead stuff might just not work right at runtime.
@@ -36,11 +36,11 @@
  * This will make sure that if you change the type of a map you'll get compile
  * errors at any spots you forget to update with the new type.
  */
-static void* (*unsafe_bpf_map_lookup_elem)(void* map, void* key) = (void*)BPF_FUNC_map_lookup_elem;
-static int (*unsafe_bpf_map_update_elem)(void* map, void* key, void* value,
+static void* (*bpf_map_lookup_elem_unsafe)(void* map, void* key) = (void*)BPF_FUNC_map_lookup_elem;
+static int (*bpf_map_update_elem_unsafe)(void* map, void* key, void* value,
                                          unsigned long long flags) = (void*)
         BPF_FUNC_map_update_elem;
-static int (*unsafe_bpf_map_delete_elem)(void* map, void* key) = (void*)BPF_FUNC_map_delete_elem;
+static int (*bpf_map_delete_elem_unsafe)(void* map, void* key) = (void*)BPF_FUNC_map_delete_elem;
 
 /* type safe macro to declare a map and related accessor functions */
 #define DEFINE_BPF_MAP_NO_ACCESSORS(the_map, TYPE, TypeOfKey, TypeOfValue, num_entries) \
@@ -56,19 +56,20 @@
                                                                                            \
     static inline __always_inline __unused TypeOfValue* bpf_##the_map##_lookup_elem(       \
             TypeOfKey* k) {                                                                \
-        return unsafe_bpf_map_lookup_elem(&the_map, k);                                    \
+        return bpf_map_lookup_elem_unsafe(&the_map, k);                                    \
     };                                                                                     \
                                                                                            \
     static inline __always_inline __unused int bpf_##the_map##_update_elem(                \
             TypeOfKey* k, TypeOfValue* v, unsigned long long flags) {                      \
-        return unsafe_bpf_map_update_elem(&the_map, k, v, flags);                          \
+        return bpf_map_update_elem_unsafe(&the_map, k, v, flags);                          \
     };                                                                                     \
                                                                                            \
     static inline __always_inline __unused int bpf_##the_map##_delete_elem(TypeOfKey* k) { \
-        return unsafe_bpf_map_delete_elem(&the_map, k);                                    \
+        return bpf_map_delete_elem_unsafe(&the_map, k);                                    \
     };
 
 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 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;
