linux-stable/arch/x86/events
Colin Ian King fbf7b0e4ce perf/x86/amd: fix potential integer overflow on shift of a int
commit 08245672cd upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-06 07:52:47 +01:00
..
amd perf/x86/amd: fix potential integer overflow on shift of a int 2023-02-06 07:52:47 +01:00
intel perf/x86/intel/uncore: Fix reference count leak in hswep_has_limit_sbox() 2023-01-18 11:40:54 +01:00
core.c perf: Protect perf_guest_cbs with RCU 2022-01-20 09:19:18 +01:00
Kconfig perf/x86/rapl: Move RAPL support to common x86 code 2020-07-16 08:16:32 +02:00
Makefile perf/x86/rapl: Fix RAPL config variable bug 2020-07-16 08:16:32 +02:00
msr.c perf/x86/msr: Add Tremont support 2020-03-05 16:43:38 +01:00
perf_event.h perf/x86/amd: Don't touch the AMD64_EVENTSEL_HOSTONLY bit inside the guest 2021-08-12 13:21:04 +02:00
probe.c perf/x86: Add MSR probe interface 2019-06-24 19:28:31 +02:00
probe.h perf/x86: Add MSR probe interface 2019-06-24 19:28:31 +02:00
rapl.c perf/x86: fix sysfs type mismatches 2020-12-02 08:49:49 +01:00