[PATCH 0/3] bpf: Store/dump license string for loaded program

Jiri Olsa
2018-04-23T06:59:31Z

hi,
sending the change to store and dump the license
info for loaded BPF programs. It's important for
us get the license info, when investigating on
screwed up machine.

Adding change to bpftool to dump the license via:

# bpftool prog list
1: kprobe name func_begin tag 59bef35a42fda602 license GPL
loaded_at Apr 22/15:46 uid 0
xlated 272B not jited memlock 4096B map_ids 1

# bpftool prog show --json
[{"id":1,"type":"kprobe","name":"fun ... ,"license":"GPL", ... ]

Also available at:
https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
bpf/license

thanks,
jirka

---
Jiri Olsa (3):
bpf: Store license string for loaded program
tools bpf: Sync bpf.h uapi header
tools bpftool: Display license in prog show/list

include/linux/bpf.h | 1 +
include/uapi/linux/bpf.h | 3 +++
kernel/bpf/core.c | 1 +
kernel/bpf/syscall.c | 7 ++++++-
tools/bpf/bpftool/prog.c | 4 ++++
tools/include/uapi/linux/bpf.h | 4 ++++
6 files changed, 19 insertions(+), 1 deletion(-)