linux-stable/arch/x86/events
Colin Ian King 08245672cd perf/x86/amd: fix potential integer overflow on shift of a int
The left shift of int 32 bit integer constant 1 is evaluated using 32 bit
arithmetic and then passed as a 64 bit function argument. In the case where
i is 32 or more this can lead to an overflow.  Avoid this by shifting
using the BIT_ULL macro instead.

Fixes: 471af006a7 ("perf/x86/amd: Constrain Large Increment per Cycle events")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Ian Rogers <irogers@google.com>
Acked-by: Kim Phillips <kim.phillips@amd.com>
Link: https://lore.kernel.org/r/20221202135149.1797974-1-colin.i.king@gmail.com
2022-12-27 12:44:00 +01:00
..
amd perf/x86/amd: fix potential integer overflow on shift of a int 2022-12-27 12:44:00 +01:00
intel ARM64: 2022-12-15 11:12:21 -08:00
zhaoxin x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
core.c perf/x86: Remove unused variable 'cpu_type' 2022-11-15 22:30:11 +01:00
Kconfig perf/x86/Kconfig: Fix indentation in the Kconfig file 2022-05-25 15:54:26 +02:00
Makefile perf/x86: Move branch classifier 2022-08-27 00:05:44 +02:00
msr.c perf/x86/msr: Add new Raptor Lake S support 2022-09-29 12:20:53 +02:00
perf_event.h perf/x86/amd: Remove the repeated declaration 2022-11-24 11:09:18 +01:00
perf_event_flags.h x86/perf: Assert all platform event flags are within PERF_EVENT_FLAG_ARCH 2022-09-07 21:54:01 +02:00
probe.c perf/x86/rapl: Add msr mask support 2021-02-10 14:44:54 +01:00
probe.h perf/x86/rapl: Add msr mask support 2021-02-10 14:44:54 +01:00
rapl.c perf/x86/rapl: Use standard Energy Unit for SPR Dram RAPL domain 2022-11-02 12:22:05 +01:00
utils.c perf/x86/utils: Fix uninitialized var in get_branch_type() 2022-09-29 12:20:56 +02:00