diff options
author | Sandipan Das | 2018-05-24 08:56:52 +0200 |
---|---|---|
committer | Daniel Borkmann | 2018-05-24 09:20:49 +0200 |
commit | 815581c11cc29f74af252b6306ea1ec94160231a (patch) | |
tree | a629bc3d3b0ffdc7e8a76d75568cc763cb6effde /include/uapi | |
parent | bpf: fix multi-function JITed dump obtained via syscall (diff) | |
download | kernel-qcow2-linux-815581c11cc29f74af252b6306ea1ec94160231a.tar.gz kernel-qcow2-linux-815581c11cc29f74af252b6306ea1ec94160231a.tar.xz kernel-qcow2-linux-815581c11cc29f74af252b6306ea1ec94160231a.zip |
bpf: get JITed image lengths of functions via syscall
This adds new two new fields to struct bpf_prog_info. For
multi-function programs, these fields can be used to pass
a list of the JITed image lengths of each function for a
given program to userspace using the bpf system call with
the BPF_OBJ_GET_INFO_BY_FD command.
This can be used by userspace applications like bpftool
to split up the contiguous JITed dump, also obtained via
the system call, into more relatable chunks corresponding
to each function.
Signed-off-by: Sandipan Das <sandipan@linux.vnet.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/bpf.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 0be90965867d..344d2ddcef49 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -2206,7 +2206,9 @@ struct bpf_prog_info { __u64 netns_dev; __u64 netns_ino; __u32 nr_jited_ksyms; + __u32 nr_jited_func_lens; __aligned_u64 jited_ksyms; + __aligned_u64 jited_func_lens; } __attribute__((aligned(8))); struct bpf_map_info { |