bpf: Move stack_map_get_build_id into lib
authorJiri Olsa <jolsa@kernel.org>
Thu, 14 Jan 2021 13:40:42 +0000 (14:40 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 15 Jan 2021 03:29:58 +0000 (19:29 -0800)
commitbd7525dacd7e204f8cae061941fb9001c89d6988
treed7e8e96b7b606ffb8cf40f5ac9572cdd5f098ca3
parent7064a7341a0d2fcfeff56be7e3917421fbb8b024
bpf: Move stack_map_get_build_id into lib

Moving stack_map_get_build_id into lib with
declaration in linux/buildid.h header:

  int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id);

This function returns build id for given struct vm_area_struct.
There is no functional change to stack_map_get_build_id function.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20210114134044.1418404-2-jolsa@kernel.org
include/linux/buildid.h [new file with mode: 0644]
kernel/bpf/stackmap.c
lib/Makefile
lib/buildid.c [new file with mode: 0644]