]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: show real jited address in bpf_prog_info->jited_ksyms
authorSong Liu <songliubraving@fb.com>
Fri, 2 Nov 2018 17:16:16 +0000 (10:16 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 2 Nov 2018 20:39:01 +0000 (21:39 +0100)
commit6c7c31eda6438faa46baa0cb828a184d1662e512
tree9c45547a04bce09403e85d8c3f046d9bbc7950da
parent999495cbd32b175d5f89cec96bb63dd9a2305a21
bpf: show real jited address in bpf_prog_info->jited_ksyms

Currently, jited_ksyms in bpf_prog_info shows page addresses of jited
bpf program. The main reason here is to not expose randomized start
address. However, this is not ideal for detailed profiling (find hot
instructions from stack traces). This patch replaces the page address
with real prog start address.

This change is OK because bpf_prog_get_info_by_fd() is only available
to root.

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