crash/SOURCES/github_95daa11b.patch

24 lines
901 B
Diff

commit 95daa11b82dfa6aa3e68ffc92e1282abc1b2b62a
Author: Dave Anderson <anderson@redhat.com>
Date: Fri Jun 1 15:28:55 2018 -0400
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)
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",