]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: get JITed image lengths of functions via syscall
authorSandipan Das <sandipan@linux.vnet.ibm.com>
Thu, 24 May 2018 06:56:52 +0000 (12:26 +0530)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 24 May 2018 07:20:49 +0000 (09:20 +0200)
commitef51a459315a3806974f79967e66c4d774c60ec7
treea629bc3d3b0ffdc7e8a76d75568cc763cb6effde
parentfd9fa2c302c2241c56e48db79442531c5a87b0d2
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>
include/uapi/linux/bpf.h
kernel/bpf/syscall.c