]> git.ipfire.org Git - thirdparty/linux.git/commit
perf tools: Fix proper buffer size for feature processing
authorJiri Olsa <jolsa@kernel.org>
Mon, 15 Jul 2019 14:04:26 +0000 (16:04 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 23 Jul 2019 11:59:49 +0000 (08:59 -0300)
commit79b2fe5e756163897175a8f57d66b26cd9befd59
treea6a246656604e4d724cedc7d69d81fbfbe71084f
parentdde4e732a5b02fa5599c2c0e6c48a0c11789afc4
perf tools: Fix proper buffer size for feature processing

After Song Liu's segfault fix for pipe mode, Arnaldo reported following
error:

  # perf record -o - | perf script
  0x514 [0x1ac]: failed to process type: 80

It's caused by wrong buffer size setup in feature processing, which
makes cpu topology feature fail, because it's using buffer size to
recognize its header version.

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Carrillo-Cisneros <davidcc@google.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Fixes: e9def1b2e74e ("perf tools: Add feature header record to pipe-mode")
Link: http://lkml.kernel.org/r/20190715140426.32509-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c