linux/arch/arm64
Sergey Shtylyov 3c3edb82d6 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-09-28 11:11:45 +02:00
..
boot arm64: dts: juno: Add missing MHU secure-irq 2022-09-23 14:15:49 +02:00
configs arm64: defconfig: build imx-sdma as a module 2022-04-08 14:24:00 +02:00
crypto crypto: arm64/gcm - Select AEAD for GHASH_ARM64_CE 2022-08-17 14:23:26 +02:00
hyperv arm64: hyperv: Initialize hypervisor on boot 2021-08-04 16:54:36 +00:00
include KVM: arm64: Treat PMCR_EL1.LC as RES1 on asymmetric systems 2022-08-25 11:40:29 +02:00
kernel arm64: topology: fix possible overflow in amu_fie_setup() 2022-09-28 11:11:45 +02:00
kvm KVM: arm64: Reject 32bit user PSTATE on asymmetric systems 2022-08-25 11:40:29 +02:00
lib arm64: mte: DC {GVA,GZVA} shouldn't be used when DCZID_EL0.DZP == 1 2022-01-27 11:03:28 +01:00
mm Revert "arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags"" 2022-09-15 11:30:07 +02:00
net bpf, arm64: Use emit_addr_mov_i64() for BPF_PSEUDO_FUNC 2022-07-12 16:34:54 +02:00
tools arm64: errata: add detection for AMEVCNTR01 incrementing incorrectly 2022-09-15 11:30:08 +02:00
xen
Kbuild arm64: hyperv: Add Hyper-V hypercall and register access utilities 2021-08-04 16:54:36 +00:00
Kconfig arm64: errata: add detection for AMEVCNTR01 incrementing incorrectly 2022-09-15 11:30:08 +02:00
Kconfig.debug
Kconfig.platforms irqchip/exiu: Fix acknowledgment of edge triggered interrupts 2022-06-09 10:22:54 +02:00
Makefile arm64 updates for 5.15: 2021-09-01 15:04:29 -07:00