android_kernel_xiaomi_sm8350/arch/x86/events/amd
Colin Ian King fbf7b0e4ce perf/x86/amd: fix potential integer overflow on shift of a int
commit 08245672cdc6505550d1a5020603b0a8d4a6dcc7 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: 471af006a747 ("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
..
core.c perf/x86/amd: fix potential integer overflow on shift of a int 2023-02-06 07:52:47 +01:00
ibs.c perf/amd/ibs: Use interrupt regs ip for stack unwinding 2022-06-14 18:11:36 +02:00
iommu.c x86/events/amd/iommu: Fix invalid Perf result due to IOMMU PMC power-gating 2021-09-12 08:56:41 +02:00
iommu.h
Makefile
power.c perf/x86/amd/power: Assign pmu.module 2021-09-12 08:56:40 +02:00
uncore.c