bpf: show main program address and length in bpf_prog_info
authorSong Liu <songliubraving@fb.com>
Fri, 2 Nov 2018 17:16:17 +0000 (10:16 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 2 Nov 2018 20:39:01 +0000 (21:39 +0100)
commitff1889fc531f582f902175c0acc80321af540b24
tree83330b3be066e445313c856462efc8e11cdb71b8
parentde57e99ceb65d0d7775cc14a8ba5931d7de1d708
bpf: show main program address and length in bpf_prog_info

Currently, when there is no subprog (prog->aux->func_cnt == 0),
bpf_prog_info does not return any jited_ksyms or jited_func_lens. This
patch adds main program address (prog->bpf_func) and main program
length (prog->jited_len) to bpf_prog_info.

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/syscall.c