]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arm64: amu: Delay allocating cpumask for AMU FIE support
authorBeata Michalska <beata.michalska@arm.com>
Fri, 31 Jan 2025 15:58:42 +0000 (15:58 +0000)
committerWill Deacon <will@kernel.org>
Thu, 13 Feb 2025 11:06:22 +0000 (11:06 +0000)
commitd923782b041218ef3804b2fed87619b5b1a497f3
tree0d7ae430529e1ff32d81d145c8eff2cc55994e83
parent875d742cf5327c93cba1f11e12b08d3cce7a88d2
arm64: amu: Delay allocating cpumask for AMU FIE support

For the time being, the amu_fie_cpus cpumask is being exclusively used
by the AMU-related internals of FIE support and is guaranteed to be
valid on every access currently made. Still the mask is not being
invalidated on one of the error handling code paths, which leaves
a soft spot with theoretical risk of UAF for CPUMASK_OFFSTACK cases.
To make things sound, delay allocating said cpumask
(for CPUMASK_OFFSTACK) avoiding otherwise nasty sanitising case failing
to register the cpufreq policy notifications.

Signed-off-by: Beata Michalska <beata.michalska@arm.com>
Reviewed-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com>
Reviewed-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20250131155842.3839098-1-beata.michalska@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/topology.c