Blame SOURCES/github_9446958f_95daa11b_bpf_covscan.patch

01fc30
commit 9446958fe211825ed5524317b05d5ea020bb00d6
01fc30
Author: Dave Anderson <anderson@redhat.com>
01fc30
Date:   Fri Jun 1 14:01:01 2018 -0400
01fc30
01fc30
    Fix to address a "__builtin___snprintf_chk" compiler warning if bpf.c
01fc30
    is compiled with -D_FORTIFY_SOURCE=2.
01fc30
    (anderson@redhat.com)
01fc30
01fc30
diff --git a/bpf.c b/bpf.c
01fc30
index 305d49f..ee1986f 100644
01fc30
--- a/bpf.c
01fc30
+++ b/bpf.c
01fc30
@@ -362,7 +362,7 @@ do_bpf(ulong flags, ulong prog_id, ulong map_id, int radix)
01fc30
 			fprintf(fp, "     LOAD_TIME: ");
01fc30
 			if (VALID_MEMBER(bpf_prog_aux_load_time)) {
01fc30
 				load_time = ULONGLONG(bpf->bpf_prog_aux_buf + OFFSET(bpf_prog_aux_load_time));
01fc30
-				print_boot_time(load_time, buf5, BUFSIZE);
01fc30
+				print_boot_time(load_time, buf5, BUFSIZE/2);
01fc30
 				fprintf(fp, "%s\n", buf5);
01fc30
 			} else
01fc30
 				fprintf(fp, "(unknown)\n");
01fc30
01fc30
commit 95daa11b82dfa6aa3e68ffc92e1282abc1b2b62a
01fc30
Author: Dave Anderson <anderson@redhat.com>
01fc30
Date:   Fri Jun 1 15:28:55 2018 -0400
01fc30
01fc30
    Fix for the "bpf -t" option.  Although highly unlikely, without the
01fc30
    patch, the target function name of a BPF bytecode call instruction
01fc30
    may fail to be resolved correctly.
01fc30
    (anderson@redhat.com)
01fc30
01fc30
diff --git a/bpf.c b/bpf.c
01fc30
index ee1986f..427263d 100644
01fc30
--- a/bpf.c
01fc30
+++ b/bpf.c
01fc30
@@ -1060,8 +1060,7 @@ static char *__func_get_name(const struct bpf_insn *insn,
01fc30
 		return buff;
01fc30
 
01fc30
 	if (insn->src_reg != BPF_PSEUDO_CALL &&
01fc30
-	    insn->imm >= 0 && insn->imm < __BPF_FUNC_MAX_ID &&
01fc30
-	    func_id_str[insn->imm]) {
01fc30
+	    insn->imm >= 0 && insn->imm < __BPF_FUNC_MAX_ID) {
01fc30
 //              return func_id_str[insn->imm];
01fc30
 		if (!readmem(symbol_value("func_id_str") + (insn->imm * sizeof(void *)), 
01fc30
 		    KVADDR, &func_id_ptr, sizeof(void *), "func_id_str pointer",