mbox series

[bpf,0/3] show more accurrate bpf program address

Message ID 20181101070058.2760251-1-songliubraving@fb.com
Headers show
Series show more accurrate bpf program address | expand

Message

Song Liu Nov. 1, 2018, 7 a.m. UTC
This set improves bpf program address showed in /proc/kallsyms and in
bpf_prog_info. First, real program address is showed instead of page
address. Second, when there is no subprogram, bpf_prog_info->jited_ksyms
returns the main prog address.

Song Liu (3):
  bpf: show real jited prog address in /proc/kallsyms
  bpf: show real jited address in bpf_prog_info->jited_ksyms
  bpf: show main program address in bpf_prog_info->jited_ksyms

 kernel/bpf/core.c    |  4 +---
 kernel/bpf/syscall.c | 17 ++++++++++++-----
 2 files changed, 13 insertions(+), 8 deletions(-)

--
2.17.1

Comments

Alexei Starovoitov Nov. 1, 2018, 11:15 p.m. UTC | #1
On Thu, Nov 01, 2018 at 12:00:55AM -0700, Song Liu wrote:
> This set improves bpf program address showed in /proc/kallsyms and in
> bpf_prog_info. First, real program address is showed instead of page
> address. Second, when there is no subprogram, bpf_prog_info->jited_ksyms
> returns the main prog address.

For the set:
Acked-by: Alexei Starovoitov <ast@kernel.org>

I think we have to make the whole thing consistent like this set does
and send it to stable.
The only other alternative is to invent new cmd and prog_info fields to return
proper jited_ksyms and keep this one buggy forever.
My preference is to fix it.