Re: [PATCH] arm64: cpufeature: Check the override in __read_sysreg_by_encoding()

From: Catalin Marinas

Date: Wed Nov 18 2026 - 13:21:11 EST


On Fri, Nov 13, 2026 at 09:57:01AM +0000, Fuad Tabba wrote:
> __read_sysreg_by_encoding() backs the capability checks a secondary
> runs before its cpuinfo is stored, and folds an ID register override
> into the value it reads without checking it against that CPU. A
> secondary whose field is below an override the boot CPU accepted
> passes verification and comes online without the feature.
>
> Apply the override through arm64_ftr_reg_override(), as the cpuinfo
> store does, so that it only applies where it is safe against that CPU's
> value.
>
> Fixes: b3341ae0efa2 ("arm64: cpufeature: Use IDreg override in __read_sysreg_by_encoding()")
> Reported-by: Catalin Marinas <catalin.marinas@xxxxxxx>
> Link: https://lore.kernel.org/all/abwXl35xQ2ze1XwJ@xxxxxxx/
> Suggested-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
> Signed-off-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>

Patch looks fine but I don't think it's worth adding Fixes tag (or, if
we do, we shouldn't add cc stable; my commit hook does this
automatically).

I'd leave it for 7.5, so:

Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>