bpf: Append prog->aux->name in bpf_get_prog_name()
authorMartin KaFai Lau <kafai@fb.com>
Fri, 6 Oct 2017 04:52:13 +0000 (21:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Oct 2017 22:29:39 +0000 (23:29 +0100)
commit368211fb920a0b789c238942c6af0414539f79d6
treec2bccb6962e725d691b9529445f5436e385b3bf7
parent067cae47771c864604969fd902efe10916e0d79c
bpf: Append prog->aux->name in bpf_get_prog_name()

This patch makes the bpf_prog's name available
in kallsyms.

The new format is bpf_prog_tag[_name].

Sample kallsyms from running selftests/bpf/test_progs:
[root@arch-fb-vm1 ~]# egrep ' bpf_prog_[0-9a-fA-F]{16}' /proc/kallsyms
ffffffffa0048000 t bpf_prog_dabf0207d1992486_test_obj_id
ffffffffa0038000 t bpf_prog_a04f5eef06a7f555__123456789ABCDE
ffffffffa0050000 t bpf_prog_a04f5eef06a7f555

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/core.c