linux/arch/arm64
Sergey Shtylyov 904f881b57 arm64: topology: fix possible overflow in amu_fie_setup()
commit d4955c0ad7 upstream.

cpufreq_get_hw_max_freq() returns max frequency in kHz as *unsigned int*,
while freq_inv_set_max_ratio() gets passed this frequency in Hz as 'u64'.
Multiplying max frequency by 1000 can potentially result in overflow --
multiplying by 1000ULL instead should avoid that...

Found by Linux Verification Center (linuxtesting.org) with the SVACE static
analysis tool.

Fixes: cd0ed03a89 ("arm64: use activity monitors for frequency invariance")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Link: https://lore.kernel.org/r/01493d64-2bce-d968-86dc-11a122a9c07d@omp.ru
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-26 13:25:55 +02:00
..
boot arm64: dts: imx8mq-librem5: Add bq25895 as max17055's power supply 2022-10-26 13:25:51 +02:00
configs arm64: defconfig: build imx-sdma as a module 2022-04-08 14:40:34 +02:00
crypto crypto: arm64/gcm - Select AEAD for GHASH_ARM64_CE 2022-08-21 15:15:44 +02:00
include arm64: errata: add detection for AMEVCNTR01 incrementing incorrectly 2022-09-15 11:32:06 +02:00
kernel arm64: topology: fix possible overflow in amu_fie_setup() 2022-10-26 13:25:55 +02:00
kvm KVM: arm64: Don't return from void function 2022-08-21 15:15:57 +02:00
lib arm64: clear_page() shouldn't use DC ZVA when DCZID_EL0.DZP == 1 2022-01-27 10:53:54 +01:00
mm arm64: mm: Don't invalidate FROM_DEVICE buffers at start of DMA transfer 2022-06-25 15:16:09 +02:00
net bpf, arm64: Clear prog->jited_len along prog->jited 2022-06-14 18:32:40 +02:00
xen arm64: xen: Use modern annotations for assembly functions 2020-01-09 16:09:42 +00:00
Kbuild arm64: add arch/arm64/Kbuild 2019-08-21 18:47:15 +01:00
Kconfig arm64/bti: Disable in kernel BTI when cross section thunks are broken 2022-09-28 11:10:24 +02:00
Kconfig.debug arm64: remove TEXT_OFFSET randomization 2020-06-15 13:10:59 +01:00
Kconfig.platforms irqchip/exiu: Fix acknowledgment of edge triggered interrupts 2022-06-09 10:21:05 +02:00
Makefile arm64: link with -z norelro for LLD or aarch64-elf 2021-01-12 20:18:24 +01:00