mirror of
https://github.com/crash-utility/crash
synced 2025-02-23 00:46:48 +00:00
Fix for the "bpf -t" option. Although highly unlikely, without the
patch, the target function name of a BPF bytecode call instruction may fail to be resolved correctly. (anderson@redhat.com)
This commit is contained in:
parent
9446958fe2
commit
95daa11b82
3
bpf.c
3
bpf.c
@ -1060,8 +1060,7 @@ static char *__func_get_name(const struct bpf_insn *insn,
|
||||
return buff;
|
||||
|
||||
if (insn->src_reg != BPF_PSEUDO_CALL &&
|
||||
insn->imm >= 0 && insn->imm < __BPF_FUNC_MAX_ID &&
|
||||
func_id_str[insn->imm]) {
|
||||
insn->imm >= 0 && insn->imm < __BPF_FUNC_MAX_ID) {
|
||||
// return func_id_str[insn->imm];
|
||||
if (!readmem(symbol_value("func_id_str") + (insn->imm * sizeof(void *)),
|
||||
KVADDR, &func_id_ptr, sizeof(void *), "func_id_str pointer",
|
||||
|
Loading…
Reference in New Issue
Block a user