diff options
| author | Andrii Nakryiko <[email protected]> | 2020-09-26 01:13:50 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-09-29 00:27:31 +0000 |
| commit | b86042478fa083d87f1b67047e788d70b8c81eef (patch) | |
| tree | 82167c015e3fea50f2c09210bbfa5cfa7f47017e /tools/lib/bpf/bpf.c | |
| parent | libbpf: Refactor internals of BTF type index (diff) | |
| download | kernel-b86042478fa083d87f1b67047e788d70b8c81eef.tar.gz kernel-b86042478fa083d87f1b67047e788d70b8c81eef.zip | |
libbpf: Remove assumption of single contiguous memory for BTF data
Refactor internals of struct btf to remove assumptions that BTF header, type
data, and string data are layed out contiguously in a memory in a single
memory allocation. Now we have three separate pointers pointing to the start
of each respective are: header, types, strings. In the next patches, these
pointers will be re-assigned to point to independently allocated memory areas,
if BTF needs to be modified.
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: John Fastabend <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/bpf.c')
| -rw-r--r-- | tools/lib/bpf/bpf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index c5a4d8444bf6..70575a37aa14 100644 --- a/tools/lib/bpf/bpf.c +++ b/tools/lib/bpf/bpf.c @@ -846,7 +846,7 @@ int bpf_raw_tracepoint_open(const char *name, int prog_fd) return sys_bpf(BPF_RAW_TRACEPOINT_OPEN, &attr, sizeof(attr)); } -int bpf_load_btf(void *btf, __u32 btf_size, char *log_buf, __u32 log_buf_size, +int bpf_load_btf(const void *btf, __u32 btf_size, char *log_buf, __u32 log_buf_size, bool do_log) { union bpf_attr attr = {}; |
