libbpf: Allow decimal offset for kprobes
authorJiri Olsa <jolsa@redhat.com>
Wed, 21 Jul 2021 21:58:09 +0000 (23:58 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 23 Jul 2021 03:09:16 +0000 (20:09 -0700)
commite3f9bc35ea7e9871667d7f769cf0079211828e89
treead75453ffd707488d850db04610ec0a7fc79844f
parent1f71a468a75ff4f13c55966c74284aa4a6bcc334
libbpf: Allow decimal offset for kprobes

Allow to specify decimal offset in SEC macro, like:
  SEC("kprobe/bpf_fentry_test7+5")

Add selftest for that.

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/20210721215810.889975-3-jolsa@kernel.org
tools/lib/bpf/libbpf.c
tools/testing/selftests/bpf/prog_tests/get_func_ip_test.c
tools/testing/selftests/bpf/progs/get_func_ip_test.c