mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
bpf: Add size arg to build_id_parse function
It's possible to have other build id types (other than default SHA1). Currently there's also ld support for MD5 build id. Adding size argument to build_id_parse function, that returns (if defined) size of the parsed build id, so we can recognize the build id type. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210114134044.1418404-3-jolsa@kernel.org
This commit is contained in:
committed by
Alexei Starovoitov
parent
bd7525dacd
commit
921f88fc89
@@ -189,7 +189,7 @@ static void stack_map_get_build_id_offset(struct bpf_stack_build_id *id_offs,
|
||||
|
||||
for (i = 0; i < trace_nr; i++) {
|
||||
vma = find_vma(current->mm, ips[i]);
|
||||
if (!vma || build_id_parse(vma, id_offs[i].build_id)) {
|
||||
if (!vma || build_id_parse(vma, id_offs[i].build_id, NULL)) {
|
||||
/* per entry fall back to ips */
|
||||
id_offs[i].status = BPF_STACK_BUILD_ID_IP;
|
||||
id_offs[i].ip = ips[i];
|
||||
|
Reference in New Issue
Block a user