mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00: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: 29db4bea1d
("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:
parent
0bf40542c0
commit
78c1f8d063
4 changed files with 61 additions and 46 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue