Skip to content

Commit 8c15ef8

Browse files
committed
msg-filter: tweak path substitution for RHIVOS kernels
... that use the `el9_6iv` dist tag. The regex we have been using did not accept the `iv` suffix. Reported-by: Erico Nunes Closes: #224
1 parent 2ee9132 commit 8c15ef8

8 files changed

+532
-1
lines changed

src/lib/msg-filter.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ std::string MsgFilter::filterPath(
298298

299299
// try to kill the multiple version strings in paths (kernel, OpenLDAP, ...)
300300
static const std::string strKrn = "^[a-zA-Z+]+";
301-
static const RE reKrn(strKrn + /* convert el8_9 -> el8 */ "|_[0-9]+$");
301+
static const RE reKrn(strKrn + /* convert el8_9 -> el8 */ "|_[0-9](?:iv)?+$");
302302
const std::string ver = boost::regex_replace(nvr, reKrn, "");
303303
const std::string krnPattern = strKrn + ver + "[^/]*/";
304304

tests/csdiff/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,6 @@ test_csdiff(diff-misc 24-shellcheck-line-content)
9292
test_csdiff(diff-misc 25-llvm-17-path-filter)
9393
test_csdiff(diff-misc 26-too-many-events-filter)
9494
test_csdiff(diff-misc 27-cov-builtin-model)
95+
test_csdiff(diff-misc 28-kernel-iv-dist-tag)
9596

9697
add_subdirectory(filter-file)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Error: CPPCHECK_WARNING (CWE-562):
2+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/tools/testing/selftests/bpf/progs/cgrp_kfunc_common.h:39: error[returnDanglingLifetime]: Returning pointer to local variable 'id' that will be invalid when returning.
3+
# 37| return NULL;
4+
# 38|
5+
# 39|-> return bpf_map_lookup_elem(&__cgrps_kfunc_map, &id);
6+
# 40| }
7+
# 41|
8+
9+
Error: CPPCHECK_WARNING (CWE-562):
10+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/tools/testing/selftests/bpf/progs/cpumask_common.h:96: error[returnDanglingLifetime]: Returning pointer to local variable 'key' that will be invalid when returning.
11+
# 94| u32 key = 0;
12+
# 95|
13+
# 96|-> return bpf_map_lookup_elem(&__cpumask_map, &key);
14+
# 97| }
15+
# 98|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Error: CPPCHECK_WARNING (CWE-562):
2+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/tools/testing/selftests/bpf/progs/cgrp_kfunc_common.h:39: error[returnDanglingLifetime]: Returning pointer to local variable 'id' that will be invalid when returning.
3+
# 37| return NULL;
4+
# 38|
5+
# 39|-> return bpf_map_lookup_elem(&__cgrps_kfunc_map, &id);
6+
# 40| }
7+
# 41|
8+
9+
Error: CPPCHECK_WARNING (CWE-562):
10+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/tools/testing/selftests/bpf/progs/cpumask_common.h:96: error[returnDanglingLifetime]: Returning pointer to local variable 'key' that will be invalid when returning.
11+
# 94| u32 key = 0;
12+
# 95|
13+
# 96|-> return bpf_map_lookup_elem(&__cpumask_map, &key);
14+
# 97| }
15+
# 98|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Error: CPPCHECK_WARNING (CWE-415):
2+
kernel-5.14.0-570.10.1.el9_6/linux-5.14.0-570.10.1.el9.x86_64/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:656: error[doubleFree]: Resource handle 'cpuinfo' freed twice.
3+
# 654|
4+
# 655| if (!fread(buffer, 1024, 1, cpuinfo)) {
5+
# 656|-> fclose(cpuinfo);
6+
# 657| free(buffer);
7+
# 658| err(1, "Reading /proc/cpuinfo failed");
8+
9+
Error: CPPCHECK_WARNING (CWE-415):
10+
kernel-5.14.0-570.10.1.el9_6/linux-5.14.0-570.10.1.el9.x86_64/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:665: error[doubleFree]: Resource handle 'cpuinfo' freed twice.
11+
# 663| fseek(cpuinfo, flags - buffer, SEEK_SET);
12+
# 664| if (!fgets(buffer, 4096, cpuinfo)) {
13+
# 665|-> fclose(cpuinfo);
14+
# 666| free(buffer);
15+
# 667| err(1, "Reading /proc/cpuinfo failed");
16+
17+
Error: CPPCHECK_WARNING (CWE-415):
18+
kernel-5.14.0-570.10.1.el9_6/linux-5.14.0-570.10.1.el9.x86_64/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:666: error[doubleFree]: Memory pointed to by 'buffer' is freed twice.
19+
# 664| if (!fgets(buffer, 4096, cpuinfo)) {
20+
# 665| fclose(cpuinfo);
21+
# 666|-> free(buffer);
22+
# 667| err(1, "Reading /proc/cpuinfo failed");
23+
# 668| }
24+
25+
Error: CPPCHECK_WARNING (CWE-415):
26+
kernel-5.14.0-570.10.1.el9_6/linux-5.14.0-570.10.1.el9.x86_64/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:669: error[doubleFree]: Resource handle 'cpuinfo' freed twice.
27+
# 667| err(1, "Reading /proc/cpuinfo failed");
28+
# 668| }
29+
# 669|-> fclose(cpuinfo);
30+
# 670|
31+
# 671| hypervisor = strstr(buffer, "hypervisor");
32+
33+
Error: CPPCHECK_WARNING (CWE-415):
34+
kernel-5.14.0-570.10.1.el9_6/linux-5.14.0-570.10.1.el9.x86_64/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:673: error[doubleFree]: Memory pointed to by 'buffer' is freed twice.
35+
# 671| hypervisor = strstr(buffer, "hypervisor");
36+
# 672|
37+
# 673|-> free(buffer);
38+
# 674|
39+
# 675| if (hypervisor)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Error: CPPCHECK_WARNING (CWE-415):
2+
kernel-5.14.0-570.10.1.el9_6/linux-5.14.0-570.10.1.el9.x86_64/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:656: error[doubleFree]: Resource handle 'cpuinfo' freed twice.
3+
# 654|
4+
# 655| if (!fread(buffer, 1024, 1, cpuinfo)) {
5+
# 656|-> fclose(cpuinfo);
6+
# 657| free(buffer);
7+
# 658| err(1, "Reading /proc/cpuinfo failed");
8+
9+
Error: CPPCHECK_WARNING (CWE-415):
10+
kernel-5.14.0-570.10.1.el9_6/linux-5.14.0-570.10.1.el9.x86_64/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:665: error[doubleFree]: Resource handle 'cpuinfo' freed twice.
11+
# 663| fseek(cpuinfo, flags - buffer, SEEK_SET);
12+
# 664| if (!fgets(buffer, 4096, cpuinfo)) {
13+
# 665|-> fclose(cpuinfo);
14+
# 666| free(buffer);
15+
# 667| err(1, "Reading /proc/cpuinfo failed");
16+
17+
Error: CPPCHECK_WARNING (CWE-415):
18+
kernel-5.14.0-570.10.1.el9_6/linux-5.14.0-570.10.1.el9.x86_64/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:666: error[doubleFree]: Memory pointed to by 'buffer' is freed twice.
19+
# 664| if (!fgets(buffer, 4096, cpuinfo)) {
20+
# 665| fclose(cpuinfo);
21+
# 666|-> free(buffer);
22+
# 667| err(1, "Reading /proc/cpuinfo failed");
23+
# 668| }
24+
25+
Error: CPPCHECK_WARNING (CWE-415):
26+
kernel-5.14.0-570.10.1.el9_6/linux-5.14.0-570.10.1.el9.x86_64/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:669: error[doubleFree]: Resource handle 'cpuinfo' freed twice.
27+
# 667| err(1, "Reading /proc/cpuinfo failed");
28+
# 668| }
29+
# 669|-> fclose(cpuinfo);
30+
# 670|
31+
# 671| hypervisor = strstr(buffer, "hypervisor");
32+
33+
Error: CPPCHECK_WARNING (CWE-415):
34+
kernel-5.14.0-570.10.1.el9_6/linux-5.14.0-570.10.1.el9.x86_64/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c:673: error[doubleFree]: Memory pointed to by 'buffer' is freed twice.
35+
# 671| hypervisor = strstr(buffer, "hypervisor");
36+
# 672|
37+
# 673|-> free(buffer);
38+
# 674|
39+
# 675| if (hypervisor)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
Error: CPPCHECK_WARNING (CWE-685):
2+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:672: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 4 are given.
3+
# 670|
4+
# 671| snprintf(str, sizeof(str), "cpu:%d", i);
5+
# 672|-> print_default(" %-18s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf
6+
# 673| "\n",
7+
# 674| str, PPS(pps), DROP(drop), ERR(err));
8+
9+
Error: CPPCHECK_WARNING (CWE-685):
10+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:717: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 5 are given.
11+
# 715| err = pps / err; /* calc average bulk size */
12+
# 716|
13+
# 717|-> print_err(drop,
14+
# 718| " %-20s " FMT_COLUMNf FMT_COLUMNf __COLUMN(
15+
# 719| ".2f") "\n",
16+
17+
Error: CPPCHECK_WARNING (CWE-685):
18+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:737: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 5 are given.
19+
# 735| if (err > 0)
20+
# 736| err = pps / err; /* calc average bulk size */
21+
# 737|-> print_default(
22+
# 738| " %-18s " FMT_COLUMNf FMT_COLUMNf __COLUMN(
23+
# 739| ".2f") "\n",
24+
25+
Error: CPPCHECK_WARNING (CWE-685):
26+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:761: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 4 are given.
27+
# 759| &xdp_redirect, t);
28+
# 760| if (xdp_pass || xdp_drop || xdp_redirect) {
29+
# 761|-> print_err(xdp_drop,
30+
# 762| " %-18s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf "\n",
31+
# 763| "xdp_stats", PASS(xdp_pass), DROP(xdp_drop),
32+
33+
Error: CPPCHECK_WARNING (CWE-685):
34+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:777: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 4 are given.
35+
# 775|
36+
# 776| snprintf(str, sizeof(str), "cpu:%d", i);
37+
# 777|-> print_default(" %-16s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf
38+
# 778| "\n",
39+
# 779| str, PASS(xdp_pass), DROP(xdp_drop),
40+
41+
Error: CPPCHECK_WARNING (CWE-685):
42+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:800: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 5 are given.
43+
# 798| err = calc_errs_pps(&rec->total, &prev->total, t);
44+
# 799|
45+
# 800|-> print_err(drop, " %-20s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf "\n",
46+
# 801| pps ? "kthread total" : "kthread", PPS(pps), DROP(drop), err,
47+
# 802| "sched");
48+
49+
Error: CPPCHECK_WARNING (CWE-685):
50+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:816: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 5 are given.
51+
# 814|
52+
# 815| snprintf(str, sizeof(str), "cpu:%d", i);
53+
# 816|-> print_default(" %-18s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf
54+
# 817| "\n",
55+
# 818| str, PPS(pps), DROP(drop), err, "sched");
56+
57+
Error: CPPCHECK_WARNING (CWE-685):
58+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:844: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.
59+
# 842|
60+
# 843| snprintf(str, sizeof(str), "cpu:%d", i);
61+
# 844|-> print_default(" %-18s " FMT_COLUMNf "\n", str, REDIR(pps));
62+
# 845| }
63+
# 846|
64+
65+
Error: CPPCHECK_WARNING (CWE-685):
66+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:876: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.
67+
# 874| "%s",
68+
# 875| xdp_redirect_err_names[rec_i]);
69+
# 876|-> print_err(drop, " %-18s " FMT_COLUMNf "\n", str,
70+
# 877| ERR(drop));
71+
# 878| }
72+
73+
Error: CPPCHECK_WARNING (CWE-685):
74+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:890: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.
75+
# 888|
76+
# 889| snprintf(str, sizeof(str), "cpu:%d", i);
77+
# 890|-> print_default(" %-16s" FMT_COLUMNf "\n", str,
78+
# 891| ERR(drop));
79+
# 892| }
80+
81+
Error: CPPCHECK_WARNING (CWE-685):
82+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:922: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.
83+
# 920|
84+
# 921| if (drop > 0 && !out) {
85+
# 922|-> print_always(" %-18s " FMT_COLUMNf "\n",
86+
# 923| action2str(rec_i), ERR(drop));
87+
# 924|
88+
89+
Error: CPPCHECK_WARNING (CWE-685):
90+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:936: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.
91+
# 934|
92+
# 935| snprintf(str, sizeof(str), "cpu:%d", i);
93+
# 936|-> print_default(" %-16s" FMT_COLUMNf "\n",
94+
# 937| str, ERR(drop));
95+
# 938| }
96+
97+
Error: CPPCHECK_WARNING (CWE-685):
98+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:977: error[wrongPrintfScanfArgNum]: printf format string requires 9 parameters but only 7 are given.
99+
# 975| if (info > 0)
100+
# 976| info = (pps + drop) / info; /* calc avg bulk */
101+
# 977|-> print_default(" %-18s" FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf
102+
# 978| __COLUMN(".2f") "\n",
103+
# 979| str, XMIT(pps), DROP(drop), err, "drv_err/s",
104+
105+
Error: CPPCHECK_WARNING (CWE-685):
106+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1070: error[wrongPrintfScanfArgNum]: printf format string requires 9 parameters but only 7 are given.
107+
# 1068| /* Skip idle streams of redirection */
108+
# 1069| if (pps || drop || err) {
109+
# 1070|-> print_err(drop,
110+
# 1071| " %-20s " FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf
111+
# 1072| __COLUMN(".2f") "\n", str, XMIT(pps), DROP(drop),
112+
113+
Error: CPPCHECK_WARNING (CWE-685):
114+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1095: error[wrongPrintfScanfArgNum]: printf format string requires 9 parameters but only 7 are given.
115+
# 1093| info = (pps + drop) / info; /* calc avg bulk */
116+
# 1094|
117+
# 1095|-> print_default(" %-18s" FMT_COLUMNf FMT_COLUMNf FMT_COLUMNf
118+
# 1096| __COLUMN(".2f") "\n", str, XMIT(pps),
119+
# 1097| DROP(drop), err, "drv_err/s", info, "bulk-avg");
120+
121+
Error: CPPCHECK_WARNING (CWE-685):
122+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1110: error[wrongPrintfScanfArgNum]: printf format string requires 2 parameters but only 1 is given.
123+
# 1108| print_always("%-23s", prefix ?: "Summary");
124+
# 1109| if (mask & SAMPLE_RX_CNT)
125+
# 1110|-> print_always(FMT_COLUMNl, RX(out->totals.rx));
126+
# 1111| if (mask & SAMPLE_REDIRECT_CNT)
127+
# 1112| print_always(FMT_COLUMNl, REDIR(out->totals.redir));
128+
129+
Error: CPPCHECK_WARNING (CWE-685):
130+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1112: error[wrongPrintfScanfArgNum]: printf format string requires 2 parameters but only 1 is given.
131+
# 1110| print_always(FMT_COLUMNl, RX(out->totals.rx));
132+
# 1111| if (mask & SAMPLE_REDIRECT_CNT)
133+
# 1112|-> print_always(FMT_COLUMNl, REDIR(out->totals.redir));
134+
# 1113| printf(FMT_COLUMNl,
135+
# 1114| out->totals.err + out->totals.drop + out->totals.drop_xmit,
136+
137+
Error: CPPCHECK_WARNING (CWE-685):
138+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1125: error[wrongPrintfScanfArgNum]: printf format string requires 7 parameters but only 4 are given.
139+
# 1123| "receive total" :
140+
# 1124| "receive";
141+
# 1125|-> print_err((out->rx_cnt.err || out->rx_cnt.drop),
142+
# 1126| " %-20s " FMT_COLUMNl FMT_COLUMNl FMT_COLUMNl "\n",
143+
# 1127| str, PPS(out->rx_cnt.pps), DROP(out->rx_cnt.drop),
144+
145+
Error: CPPCHECK_WARNING (CWE-685):
146+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1143: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.
147+
# 1141| if (mask & SAMPLE_REDIRECT_CNT) {
148+
# 1142| str = out->redir_cnt.suc ? "redirect total" : "redirect";
149+
# 1143|-> print_default(" %-20s " FMT_COLUMNl "\n", str,
150+
# 1144| REDIR(out->redir_cnt.suc));
151+
# 1145|
152+
153+
Error: CPPCHECK_WARNING (CWE-685):
154+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1153: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.
155+
# 1151| "redirect_err total" :
156+
# 1152| "redirect_err";
157+
# 1153|-> print_err(out->redir_cnt.err, " %-20s " FMT_COLUMNl "\n", str,
158+
# 1154| ERR(out->redir_cnt.err));
159+
# 1155|
160+
161+
Error: CPPCHECK_WARNING (CWE-685):
162+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1163: error[wrongPrintfScanfArgNum]: printf format string requires 3 parameters but only 2 are given.
163+
# 1161| "xdp_exception";
164+
# 1162|
165+
# 1163|-> print_err(out->except_cnt.hits, " %-20s " FMT_COLUMNl "\n", str,
166+
# 1164| HITS(out->except_cnt.hits));
167+
# 1165|
168+
169+
Error: CPPCHECK_WARNING (CWE-685):
170+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/samples/bpf/xdp_sample_user.c:1174: error[wrongPrintfScanfArgNum]: printf format string requires 9 parameters but only 7 are given.
171+
# 1172| "devmap_xmit";
172+
# 1173|
173+
# 1174|-> print_err(out->xmit_cnt.err || out->xmit_cnt.drop,
174+
# 1175| " %-20s " FMT_COLUMNl FMT_COLUMNl FMT_COLUMNl
175+
# 1176| __COLUMN(".2f") "\n",
176+
177+
Error: CPPCHECK_WARNING (CWE-562):
178+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/tools/testing/selftests/bpf/progs/cgrp_kfunc_common.h:39: error[returnDanglingLifetime]: Returning pointer to local variable 'id' that will be invalid when returning.
179+
# 37| return NULL;
180+
# 38|
181+
# 39|-> return bpf_map_lookup_elem(&__cgrps_kfunc_map, &id);
182+
# 40| }
183+
# 41|
184+
185+
Error: CPPCHECK_WARNING (CWE-562):
186+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/tools/testing/selftests/bpf/progs/cpumask_common.h:96: error[returnDanglingLifetime]: Returning pointer to local variable 'key' that will be invalid when returning.
187+
# 94| u32 key = 0;
188+
# 95|
189+
# 96|-> return bpf_map_lookup_elem(&__cpumask_map, &key);
190+
# 97| }
191+
# 98|
192+
193+
Error: CPPCHECK_WARNING (CWE-562):
194+
kernel-5.14.0-570.518.1.1.1.el9_6iv/linux-5.14.0-570.518.1.1.1.el9.x86_64/tools/testing/selftests/bpf/progs/task_kfunc_common.h:38: error[returnDanglingLifetime]: Returning pointer to local variable 'pid' that will be invalid when returning.
195+
# 36| return NULL;
196+
# 37|
197+
# 38|-> return bpf_map_lookup_elem(&__tasks_kfunc_map, &pid);
198+
# 39| }
199+
# 40|

0 commit comments

Comments
 (0)