The data_loc field (defined as __string in kernel source) should
be treated as string NOT a fixed-size array, add a new macro
TP_DATA_LOC_READ_STR which use bpf_probe_read_str to reflect this.
Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
bpf_probe_read((void *)dst, __length, (char *)args + __offset); \
} while (0);
+#define TP_DATA_LOC_READ_STR(dst, field, length) \
+ do { \
+ unsigned short __offset = args->data_loc_##field & 0xFFFF; \
+ bpf_probe_read_str((void *)dst, length, (char *)args + __offset); \
+ } while (0);
+
#endif
)********"