]> git.baikalelectronics.ru Git - kernel.git/commit
perf util: Fix bad memory access in trace info.
authorChris Phlipot <cphlipot0@gmail.com>
Wed, 29 Aug 2018 06:19:54 +0000 (23:19 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 30 Aug 2018 17:50:50 +0000 (14:50 -0300)
commit793e0cab4b249f3f7ad8679ca9907b96dae81955
treec949ef4467a0aeee58d78975fadc7b821d9f728c
parente805941ccd7f32e39c3fd9f641a7709c116df415
perf util: Fix bad memory access in trace info.

In the write to the output_fd in the error condition of
record_saved_cmdline(), we are writing 8 bytes from a memory location on
the stack that contains a primitive that is only 4 bytes in size.
Change the primitive to 8 bytes in size to match the size of the write
in order to avoid reading unknown memory from the stack.

Signed-off-by: Chris Phlipot <cphlipot0@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180829061954.18871-1-cphlipot0@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/trace-event-info.c