Commit d923782b authored by Beata Michalska's avatar Beata Michalska Committed by Will Deacon
Browse files

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: default avatarBeata Michalska <beata.michalska@arm.com>
Reviewed-by: default avatarPrasanna Kumar T S M <ptsm@linux.microsoft.com>
Reviewed-by: default avatarSumit Gupta <sumitg@nvidia.com>
Reviewed-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20250131155842.3839098-1-beata.michalska@arm.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 875d742c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment