mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-01 06:09:06 +08:00
libbpf: Reduce bpf_core_apply_relo_insn() stack usage.
Reduce bpf_core_apply_relo_insn() stack usage and bump
BPF_CORE_SPEC_MAX_LEN limit back to 64.
Fixes: 29db4bea1d10 ("bpf: Prepare relo_core.c for kernel duty.")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211203182836.16646-1-alexei.starovoitov@gmail.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
b633ace366
commit
c3c540b402
@@ -5515,6 +5515,7 @@ static int bpf_core_apply_relo(struct bpf_program *prog,
|
||||
const struct btf *local_btf,
|
||||
struct hashmap *cand_cache)
|
||||
{
|
||||
struct bpf_core_spec specs_scratch[3] = {};
|
||||
const void *type_key = u32_as_hash_key(relo->type_id);
|
||||
struct bpf_core_cand_list *cands = NULL;
|
||||
const char *prog_name = prog->name;
|
||||
@@ -5569,7 +5570,8 @@ static int bpf_core_apply_relo(struct bpf_program *prog,
|
||||
}
|
||||
}
|
||||
|
||||
return bpf_core_apply_relo_insn(prog_name, insn, insn_idx, relo, relo_idx, local_btf, cands);
|
||||
return bpf_core_apply_relo_insn(prog_name, insn, insn_idx, relo,
|
||||
relo_idx, local_btf, cands, specs_scratch);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user