Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'perf-tools-fixes-for-v5.12-2020-04-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tool fixes from Arnaldo Carvalho de Melo:

- Fix wrong LBR block sorting in 'perf report'

- Fix 'perf inject' repipe usage when consuming perf.data files

- Avoid potential buffer overrun when decoding ARM SPE hardware tracing
packets, bug found using a fuzzer

* tag 'perf-tools-fixes-for-v5.12-2020-04-09' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
perf arm-spe: Avoid potential buffer overrun
perf report: Fix wrong LBR block sorting
perf inject: Fix repipe usage

+7 -5
+1 -1
tools/perf/builtin-inject.c
··· 906 906 } 907 907 908 908 data.path = inject.input_name; 909 - inject.session = perf_session__new(&data, true, &inject.tool); 909 + inject.session = perf_session__new(&data, inject.output.is_pipe, &inject.tool); 910 910 if (IS_ERR(inject.session)) 911 911 return PTR_ERR(inject.session); 912 912
+3 -1
tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
··· 210 210 211 211 if ((hdr & SPE_HEADER0_MASK2) == SPE_HEADER0_EXTENDED) { 212 212 /* 16-bit extended format header */ 213 - ext_hdr = 1; 213 + if (len == 1) 214 + return ARM_SPE_BAD_PACKET; 214 215 216 + ext_hdr = 1; 215 217 hdr = buf[1]; 216 218 if (hdr == SPE_HEADER1_ALIGNMENT) 217 219 return arm_spe_get_alignment(buf, len, packet);
+3 -3
tools/perf/util/block-info.c
··· 201 201 double ratio = 0.0; 202 202 203 203 if (block_fmt->total_cycles) 204 - ratio = (double)bi->cycles / (double)block_fmt->total_cycles; 204 + ratio = (double)bi->cycles_aggr / (double)block_fmt->total_cycles; 205 205 206 206 return color_pct(hpp, block_fmt->width, 100.0 * ratio); 207 207 } ··· 216 216 double l, r; 217 217 218 218 if (block_fmt->total_cycles) { 219 - l = ((double)bi_l->cycles / 219 + l = ((double)bi_l->cycles_aggr / 220 220 (double)block_fmt->total_cycles) * 100000.0; 221 - r = ((double)bi_r->cycles / 221 + r = ((double)bi_r->cycles_aggr / 222 222 (double)block_fmt->total_cycles) * 100000.0; 223 223 return (int64_t)l - (int64_t)r; 224 224 }