aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMao Han <han_mao@c-sky.com>2019-04-10 16:16:43 +0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-04-16 11:27:53 -0300
commit3a5b64f05d7fe36dea0dde26423e3044fbacd482 (patch)
tree2544042bb5009ace4a8887975f436b0f9632b106 /arch
parenttools lib traceevent: Fix missing equality check for strcmp (diff)
downloadlinux-dev-3a5b64f05d7fe36dea0dde26423e3044fbacd482.tar.xz
linux-dev-3a5b64f05d7fe36dea0dde26423e3044fbacd482.zip
perf evsel: Use hweight64() instead of hweight_long(attr.sample_regs_user)
On 32-bits platform with more than 32 registers, the 64 bits mask is truncate to the lower 32 bits and the return value of hweight_long will always smaller than 32. When kernel outputs more than 32 registers, but the user perf program only counts 32, there will be a data mismatch result to overflow check fail. Signed-off-by: Mao Han <han_mao@c-sky.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Fixes: 6a21c0b5c2ab ("perf tools: Add core support for sampling intr machine state regs") Fixes: d03f2170546d ("perf tools: Expand perf_event__synthesize_sample()") Fixes: 0f6a30150ca2 ("perf tools: Support user regs and stack in sample parsing") Link: http://lkml.kernel.org/r/29ad7947dc8fd1ff0abd2093a72cc27a2446be9f.1554883878.git.han_mao@c-sky.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions