Skip to content

Prerequisite commit for Add support for AArch64 AMUv1-based average freq - #155

Open
hbrobin wants to merge 1 commit into
openvelinux:opensource-lts_upgrade_6.6.151-2026-08-21_20-50-15from
hbrobin:AMUv1-based-avg-freq-prerequisite
Open

hbrobin wants to merge 1 commit into
openvelinux:opensource-lts_upgrade_6.6.151-2026-08-21_20-50-15from
hbrobin:AMUv1-based-avg-freq-prerequisite

Conversation

@hbrobin

@hbrobin hbrobin commented Sep 21, 2026

Copy link
Copy Markdown

Patch List

d923782b0412  arm64: amu: Delay allocating cpumask for AMU FIE support

ByteDance ci-checker Results

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/1:[----] [--] 'arm64: amu: Delay allocating cpumask for AMU FIE support'

============================================
 Summary
============================================

 Total checks: 5
 Passed:       5
 Failed:       0

  downstream-format-validator    PASS
  upstream-format-validator      PASS
  upstream-fix-tag-validator     PASS
  upstream-fix-scanner           PASS
  upstream-variance-viewer       PASS

Unit Test Results 

TC0 Build and boot:
Built baseline and candidate arm64 Images with CPUMASK_OFFSTACK=y and CPUMASK_OFFSTACK=n. Kernel boots completed without panic, Oops, BUG, or abnormal termination.

TC1 Kernel interfaces:
Exercised the changed init_amu_fie() path with controlled notifier results. The candidate registers CPUFREQ_POLICY_NOTIFIER without preallocating or freeing amu_fie_cpus.

commit d923782b041218ef3804b2fed87619b5b1a497f3 upstream.

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>
Signed-off-by: Bin Huang <bin.huang2@arm.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants