From 95daa11b82dfa6aa3e68ffc92e1282abc1b2b62a Mon Sep 17 00:00:00 2001 From: Dave Anderson Date: Fri, 1 Jun 2018 15:28:55 -0400 Subject: [PATCH] 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) --- bpf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bpf.c b/bpf.c index ee1986f..427263d 100644 --- a/bpf.c +++ b/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",