From: Adrian Hunter Date: Wed, 15 Dec 2021 08:06:34 +0000 (+0200) Subject: perf intel-pt: Fix parsing of VM time correlation arguments X-Git-Tag: accepted/tizen/unified/20230118.172025~3858 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90d273381bfbaa34ca5bc650b3cdf4ded78c1025;p=platform%2Fkernel%2Flinux-rpi.git perf intel-pt: Fix parsing of VM time correlation arguments commit a78abde220243d6f44a265fe36c49957f6fa9851 upstream. Parser did not take ':' into account. Example: Before: $ perf record -e intel_pt//u uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.026 MB perf.data ] $ perf inject -i perf.data --vm-time-correlation="dry-run 123" $ perf inject -i perf.data --vm-time-correlation="dry-run 123:456" Failed to parse VM Time Correlation options 0x620 [0x98]: failed to process type: 70 [Invalid argument] $ After: $ perf inject -i perf.data --vm-time-correlation="dry-run 123:456" $ Fixes: e3ff42bdebcfeb5f ("perf intel-pt: Parse VM Time Correlation options and set up decoding") Signed-off-by: Adrian Hunter Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Riccardo Mancini Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20211215080636.149562-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index 824bceb..c3ceac1 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -3540,6 +3540,7 @@ static int intel_pt_parse_vm_tm_corr_arg(struct intel_pt *pt, char **args) *args = p; return 0; } + p += 1; while (1) { vmcs = strtoull(p, &p, 0); if (errno)